mkproj lets you start a clean, reproducible research project with one command.
It creates a standardized project structure, initializes Git safely, and synchronizes with GitHub without uploading data.
Run mkproj <project_name> and start working—no Git setup, no folder chaos.
- Why this workflow matters
- What this tool is (and is not)
- Repository contents
- Requirements
- Platform compatibility
- Installation (one-time)
- First-time GitHub authentication
- Everyday usage
- Project folder structure
- Recommended daily workflow
- Lab ownership and collaboration
- Safety guarantees
- Who should use this?
- License
- Acknowledgements
Many reproducibility problems begin before analysis even starts—unclear folder structures, mixed data and code, or missing documentation. This workflow enforces a clean separation between data, code, results, and logs from day one, making reproducibility a default rather than an afterthought.
Git errors, merge conflicts, and accidental data uploads are common pain points, especially for new lab members.
mkproj automates best practices (correct .gitignore, safe merges, license handling), allowing users to focus on scientific reasoning instead of version-control mechanics.
By standardizing how projects are created, this workflow creates a shared structure and mental model across the lab. Students, postdocs, and collaborators can move between projects without relearning conventions, simplifying onboarding and long-term maintenance.
- standardizes project setup
- enforces good Git hygiene
- keeps data out of GitHub
- works with private or public repositories
- supports later transfer to a lab organization
- upload raw data
- track results or generated files
- modify existing projects
- rewrite Git history
GitHub is used only for code, documentation, and logs.
mkproj/
├── README.md
├── mkproj.sh # project creation logic
└── install.sh # installs mkproj into your shell
mkproj.shcontains themkprojfunctioninstall.shinstalls that function into~/.zshrcor~/.bashrc
-
Git
git --version
-
GitHub CLI (
gh)gh --version
- GitHub Desktop
- SSH keys (HTTPS is used)
This workflow is cross-platform and works on all major operating systems as long as a POSIX-compatible shell is available.
-
macOS
- Default shell:
zsh - Fully supported
- Default shell:
-
Linux (Ubuntu, Debian, Fedora, CentOS, Arch, HPC systems)
- Default shell:
bash - Fully supported
- Default shell:
-
Windows (with a Linux-like shell)
- WSL (Windows Subsystem for Linux) — recommended
- Git Bash — supported
- Windows PowerShell
- Windows CMD
git clone https://github.com/<your-username>/mkproj.git
cd mkprojchmod +x install.sh
./install.shThis appends the mkproj function to your shell configuration file:
~/.zshrc(zsh)~/.bashrc(bash)
source ~/.zshrc # or ~/.bashrcRun:
gh auth loginWhen prompted, choose:
- GitHub.com
- HTTPS
- Authenticate Git with your GitHub credentials → Yes
- Login with a web browser
Verify:
gh auth statusTo start a new project:
mkproj my_new_projectThat’s it.
my_new_project/
├── README.md
├── .gitignore
├── data/
│ ├── raw/
│ ├── intermediate/
│ └── processed/
├── scripts/
├── notebooks/
├── metadata/
├── results/
└── logs/
-
README.md— project overview and usage -
.gitignore— prevents tracking large or derived files -
data/— local data only (never uploaded)raw/— original input dataintermediate/— temporary processing filesprocessed/— cleaned, analysis-ready data
-
scripts/— reusable analysis and processing code -
notebooks/— exploratory Jupyter notebooks -
metadata/— data dictionaries and mappings -
results/— derived outputs (not tracked) -
logs/— daily analysis notes (run_log.md)
git status
git add scripts notebooks metadata logs README.md
git commit -m "Describe what changed today"
git pushYou generally do not commit data or results.
- Projects can start under a personal GitHub account
- Repositories can later be transferred to a lab organization
- Commit history and license are preserved
- no force-push
- no data uploads
- no history rewriting
- license-safe merges
- works offline until GitHub sync
- computational research labs
- graduate students and postdocs
- undergraduate research groups
- instructors teaching reproducible research
MIT License — free to use, modify, and share.
This project was developed with the assistance of ChatGPT (OpenAI) for workflow design and documentation refinement. The overview image at the top was generated by Gemini (Google).
