Git repo project template using Cookiecutter 🍪
This project is inspired by cookiecutter-template by eviweb, and consists of a cookiecutter (project template) that provides the necessary markdown docs and other files to pass GitHub's open source guidelines with an added bonus: remote repos are created for you automagically! 🔮⚡💥
Note: The Beta release introduces breaking changes! Invoke and Requests are now required and the prompts have changed!
- Table of Contents
- Features
- Requirements
- Installation
- Usage
- Documentation
- Resources
- Development
- Credits
- License
- Creates new project directory
- Bare project structure
- For any programming language or codebase
- Useful but not overruling organization
- License customization
- Code of Conduct customization
- Git Ignore customization
- Git repo initialization
- Remote repo creation
- Bitbucket.org using HTTP Basic auth (2FA disabled only)
- GitHub.com using HTTP Basic auth (2FA support coming soon)
- GitLab.com using
git push
(HTTP Basic auth or SSH)
- Cross-platform support
Note: Cookiecutter should be installed with pip, or else invoke
and requests
may not be in $PATH
and/or $PYTHONPATH
!
- ghi
- github-changelog-generator
- pyenv (conda on Windows)
$ pip install --user cookiecutter invoke requests
See Usage
$ git clone https://github.com/NathanUrwin/cookiecutter-git
$ cd cookiecutter-git
See CONTRIBUTING
$ mkdir -p ~/Projects/NathanUrwin
$ cd ~/Projects/NathanUrwin
$ cookiecutter gh:NathanUrwin/cookiecutter-git
See generated README.md
$ tree -a -I .git cookiecutter-git-demo
cookiecutter-git-demo
├── docs
│ └── .gitkeep
├── .editorconfig
├── .github
│ ├── AUTHORS.md
│ ├── CHANGELOG.md
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE
│ │ ├── BUG_REPORT.md
│ │ └── FEATURE_REQUEST.md
│ ├── README.md
│ ├── ROADMAP.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── LICENSE
├── src
│ └── .gitkeep
└── tests
└── .gitkeep
5 directories, 15 files
Cookiecutter prompts explained in-depth. See cookiecutter.json for default values.
Prompt | Explanation |
---|---|
author_name |
Your full name, including first and last names, titles, and possibly even your middle name. This will go under Core Contributor in AUTHORS.md. See git config --global user.name |
author_email |
Your git user email address you want associated with the repository. This will go under Core Contributor in AUTHORS.md. See git config --global user.email |
git_ignore |
A comma-separated values (csv) list of preset templates of paths for git to ignore. See the gitignore.io README for available values. This will be used to generate the .gitignore file. |
repository_slug |
The repository name containing only alphanumeric characters and dashes. This will be the local, top-level directory name, the remote repo endpoint, and the H1 in the README.md. |
repository_tagline |
A short description about the repository in 50 words or less. This will be the remote description setting, and the content under the H1 in the README.md. |
repository_summary |
A long description about the repository in 50 words or more. This will go after the repository_tagline with the content under the H1 in the README.md. |
remote_provider |
A choice between bitbucket.org , github.com , gitlab.com , or none . This option creates a remote repository for you, and is this project's main feature so defaults to github.com . |
remote_username |
Your git remote_provider account username. This will be used for all git remote-based actions. This is accompanied with a remote_password prompt that is never saved. |
remote_namespace |
Where the remote repository will live, which can be a user or organization, group, or team (depending on the remote_provider ). Only used if remote_provider is not none . |
remote_protocol |
A choice between the https and ssh protocols. Defaults to https , since those using ssh qualify as power users and should be able to handle setting up a cookiecutter user config. |
code_of_conduct |
Adopt a code of conduct to define community standards, signal a welcoming and inclusive project, and outline procedures for handling abuse. A choice between the Contributor Covenant or Citizen Code of Conduct. |
copyright_license |
The copyright license for the repository. This will be used to generate the LICENSE and NOTICE files, and determines how end users can ultimately use your source code. |
copyright_holder |
The individual or company that holds the intellectual property copyright. This will be used in the LICENSE file, rather than the author_name . |
make_dirs |
A comma-separated values (csv) list of directory names which are made with .gitkeep files. Nested dirs work if the system path separator is correct! (For example: tests/unit for Mac/Linux or tests\\unit for Windows) |
- GitHub's recommended community standards
- Creating a Cookiecutter
- Using Pre/Post-Generate Hooks
- GitHub Developer Licenses
- mkdir -p functionality in python
- Create empty file using python
- Git Ignore Dot IO Docs
- Bitbucket API Basic auth
- Bitbucket API repos
- GitHub API Basic auth
- GitHub API Create repos
- GitLab Push to create a new project
See CONTRIBUTING
See ROADMAP
See CHANGELOG
See CODE OF CONDUCT
See AUTHORS
See LICENSE