This directory contains project scripts used for automation and development tasks. It is intentionally tracked in the repository so collaborators can run and maintain these utilities.
Rules:
*.sh, *.py, and *.zsh scripts in this folder should be executable and useful..gitignore rather than keeping them in this folder.A comprehensive collection of powerful command-line utilities for project initialization, GitHub repository management, and development workflows.
project-init.sh)A powerful, interactive command-line wizard for initializing new software projects with best practices, automated setup, and GitHub integration.
forkme.sh)Advanced GitHub repository forking and cloning utility with 10 distinct strategies optimized for analysis, review, testing, and research. See ForkMe Documentation โ
rename-directory.sh)Safely rename directories with optional backup, Docker container management, and git repository integrity checks. Perfect for rebranding projects or reorganizing workspace structures.
ForkMe provides flexible forking and cloning options for GitHub repositories, going beyond simple git clone:
# Full repository documentation
./forkme.sh --help
# Quick shallow clone for review
./forkme.sh --strategy shallow --depth 1 owner/repo
# Extract documentation only
./forkme.sh --strategy filetype --file-types "md,txt" owner/repo
# Security configuration audit
./forkme.sh --strategy sparse --sparse-paths "src/,*.config" owner/repo
# Get repository metadata without cloning
./forkme.sh --analyze-only owner/repo
โ Full ForkMe Documentation
โ Quick Reference Card
A safe and reliable tool for renaming directories with intelligent handling of git repositories, Docker containers, and automatic backups.
# Basic directory rename
./rename-directory.sh ~/projects/old-name ~/projects/new-name
# Rename with full paths
./rename-directory.sh /Users/username/github/posthog /Users/username/github/bashog
# Get help
./rename-directory.sh --help
.env files for automated configurationClone or download the scripts:
git clone https://github.com/bamr87/scripts.git
cd scripts
Make the script executable:
chmod +x project-init.sh
(Optional) Add to PATH for global access:
echo 'export PATH="$PATH:~/github/scripts"' >> ~/.bashrc
source ~/.bashrc
./project-init.sh
The wizard will guide you through:
# Using environment variables
PROJECT_TYPE=django PROJECT_NAME=myapp ./project-init.sh --non-interactive
# Using command-line arguments
./project-init.sh --type react --name my-react-app --dir ~/projects/my-react-app
Copy env.example to .env and customize:
cp env.example .env
# Edit .env with your preferred settings
Key configuration options:
| Variable | Description | Options |
|---|---|---|
PROJECT_TYPE |
Type of project to create | django, react, node, python, rust, go, custom |
PROJECT_NAME |
Name of your project | Any valid directory name |
GITHUB_USERNAME |
Your GitHub username | Your GitHub handle |
LICENSE |
License type | MIT, Apache-2.0, GPL-3.0, BSD-3-Clause, None |
SETUP_DOCKER |
Create Docker configuration | true, false |
SETUP_CI |
Setup GitHub Actions | true, false |
See env.example for the complete list of available options.
Usage: project-init.sh [OPTIONS]
OPTIONS:
--config FILE Use specific configuration file
--type TYPE Set project type (django, react, node, python, rust, go, custom)
--name NAME Set project name
--dir DIRECTORY Set project directory
--non-interactive Run in non-interactive mode (uses env vars)
--help Show help message
venv.env file support with python-decoupleThree sub-types available:
When Docker support is enabled, the wizard creates:
Dockerfile optimized for your project typedocker-compose.yml for local development.dockerignore with sensible defaultsGitHub Actions workflows are tailored to each project type:
The wizard creates a complete project structure:
my-project/
โโโ src/ # Source code
โโโ tests/ # Test files
โโโ docs/ # Documentation
โโโ .github/
โ โโโ workflows/
โ โโโ ci.yml # GitHub Actions workflow
โโโ Dockerfile # Docker configuration
โโโ docker-compose.yml # Docker Compose setup
โโโ README.md # Project documentation
โโโ LICENSE # License file
โโโ .gitignore # Git ignore rules
โโโ [Type-specific files]
gh) for automatic repository creationCreate your own project templates by:
The wizard supports custom initialization scripts:
RUN_CUSTOM_SCRIPT=true
CUSTOM_SCRIPT_PATH=./my-custom-init.sh
For VS Code users, enable workspace settings generation:
SETUP_VSCODE=true
PROJECT_TYPE=django \
PROJECT_NAME=my-api \
SETUP_DOCKER=true \
SETUP_CI=true \
./project-init.sh --non-interactive
./project-init.sh --type react --name my-app
# Then select TypeScript and Vite options
PROJECT_TYPE=python \
PROJECT_NAME=awesome-package \
LICENSE=MIT \
./project-init.sh --non-interactive
Permission Denied
chmod +x project-init.sh
GitHub CLI Not Found
brew install gh (macOS) or apt install gh (Ubuntu)Python/Node Version Issues
PYTHON_VERSION or NODE_VERSION in .envCheck the wizard log for detailed information:
tail -f ~/.project-wizard/wizard.log
The consolidated project-init.sh provides:
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)For issues, questions, or suggestions:
~/.project-wizard/wizard.logHappy Coding! ๐
Built with โค๏ธ by the developer community
git_init.sh)The git_init.sh script was upgraded to support both interactive and headless modes with improved scaffolding. It uses programmatic template builders where possible (eg. GitHub CLI / degit) rather than storing static template files.
Quick examples:
# Interactive
./git_init.sh
# Headless: create repo with Python scaffold and .gitignore
./git_init.sh --headless -n myrepo -u myuser -d "My new project" --gitignore python,macos --scaffold python
# Use a GitHub template repo (requires gh or npx degit)
./git_init.sh --headless -n myrepo -u myuser -t octocat/template-repo
# Create local repo and do not push
./git_init.sh --headless -n localrepo --no-push
# Preview mode
Use `--dry-run` to preview the actions the script would perform without making changes:
```bash
# Shows created directories, commands, and intended remote actions
./git_init.sh --headless -n previewme --dry-run
Notes:
- `gh` is preferred for repo creation and using GitHub templates.
- If `gh` is not available, but `npx degit` is installed, the script will download templates with degit.
- `.gitignore` is programmatically created using the gitignore.io API (requires curl).