A small CLI that automates two things for any project:
- Git setup — global git config, SSH/GPG keys,
ghCLI auth, repo init/clone. - Local setup — detects a project's type from its files and installs its dependencies.
- macOS with Homebrew (installed automatically if missing, with confirmation)
- bash
./setup <command> [args]
./setup git config # set global user.name/user.email, defaults, aliases
./setup git keys # generate/check an SSH key, optionally set up GPG signing
./setup git auth # install gh (GitHub CLI) if needed and log in
./setup git init [path] # git init + .gitignore + first commit (default: cwd)
./setup git clone <url> [dir] # clone a repo
./setup local [path] # detect project type and install dependencies (default: cwd)
Detects and handles:
| Files | Type | Install command |
|---|---|---|
package.json |
Node | npm / yarn / pnpm install (based on lockfile) |
requirements.txt, pyproject.toml |
Python | pip in a .venv, or poetry install |
Gemfile |
Ruby | bundle install |
go.mod |
Go | go mod download |
Cargo.toml |
Rust | cargo build |
composer.json |
PHP | composer install |
./setup all [path] # git config + keys + auth, then local setup for path
setup entrypoint, dispatches to subcommands
lib/common.sh logging, brew helpers, project-type detection
lib/git-config.sh global git identity/defaults/aliases
lib/git-keys.sh SSH key + optional GPG signing key
lib/git-auth.sh gh CLI install + login
lib/git-repo.sh git init / git clone
lib/local-deps.sh per-language dependency install
templates/ .gitignore templates used by `git init`
Add this to your shell profile to call it without a path:
alias devsetup="~/devsetup/setup"