____ _ __ _ _ __
/ __ `/(_) /_(_)___ (_) /_
/ /_/ // / __/ / __ \/ / __/
\__, // / /_/ / / / / / /_
/____//_/\__/_/_/ /_/_/\__/
Project Bootstrapper & Automator
Gitinit is a zero-dependency, highly customizable CLI wizard designed to eliminate the repetitive tasks of starting a new project. It automates directory creation, metadata generation (README, dynamic LICENSE, .gitignore, .gitattributes), NPM versioning setups, and local/remote repository initialization via GitHub CLI. It also features a persistent, self-contained ecosystem to remember your preferences and custom templates.
- ✨ Features
- 🚀 Installation & Quick Start
- 📖 Documentation & Usage
- ⚙️ Under the Hood (Architecture)
- 🧹 Cleanup & Uninstall
- 📄 License
- 🤝 Contributing
- 📬 Contact
- 🧠 Persistent Memory: Automatically learns and saves your preferred directories, license owners, and default branch names to speed up future setups.
- 📄 Template Engine: Import your own custom
LICENSEand.gitignorefiles. Custom licenses automatically dynamically populate{{YEAR}}and{{OWNER}}placeholders upon creation. - 🛠️ GitHub CLI Integration: Detects
ghon your system to automatically create public/private remote repositories and push your initial commit without opening a browser. - 🛡️ Cross-Platform Safety: Automatically generates
.gitattributesto enforce consistentLFline endings, preventingCRLFgit diff nightmares. - 📦 NPM Versioning: Seamlessly initializes
package.jsonand silently injectscommit-and-tag-versionfor standardized release management. - 🎛️ Configuration Manager: A built-in CRUD interface to easily manage your saved templates and default configurations.
You can download and run gitinit using a single curl command. For the best experience, move it to your system's bin folder so you can use it globally.
curl -O https://raw.githubusercontent.com/wd006/gitinit/main/gitinit.sh && chmod +x gitinit.sh && sudo mv gitinit.sh /usr/local/bin/gitinit- Bash (macOS or Linux)
gh(Optional, required for automatic remote GitHub repository creation. Install viabrew install ghorapt install gh).npm(Optional, required forcommit-and-tag-versionsetup).
Gitinit supports multiple execution modes via CLI arguments to fit your workflow:
Just type gitinit in your terminal. The CLI wizard will guide you through:
- Selecting or adding a base directory.
- Providing project metadata (Name, Description).
- Selecting an owner and a license (Built-in or imported).
- Generating a
.gitignoreand enforcing.gitattributes. - Configuring NPM versioning.
- Pushing to a remote URL or generating one via GitHub CLI.
gitinitOpen the interactive Configuration Manager to add, remove, or modify your saved preferences, directories, owners, and custom templates.
gitinit --configRun in an isolated state. gitinit will not read from or write to your saved memory. Perfect for one-off projects where you do not want to alter your defaults.
gitinit --no-configGitinit does not clutter your global dotfiles. Instead, it creates a self-contained, portable ecosystem in your home directory (~/.gitinit/).
~/.gitinit/
├── config.env # Stores your preferences, arrays, and behavior flags
├── gitignores/ # Copies of your imported custom .gitignore files
└── licenses/ # Copies of your imported custom LICENSE files
Because your custom templates are physically copied into this ecosystem, you can safely delete the original source files without breaking your workflow.
Want to reset your preferences or completely remove the tool's memory? You can purge the entire ecosystem safely:
gitinit --reset(Note: This only deletes the ~/.gitinit directory and its contents. It does not affect any projects you have previously created).
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are greatly appreciated. Please fork the repository and create a pull request, or open an issue for major changes.
E-Mail: github@wd006.pp.ua
Project Link: https://github.com/wd006/gitinit
For questions, bug reports, or support, please open an issue on the GitHub repository.