dash-git
v1.7.0
Published
AI-powered Git CLI for commit messages, PRs, and issues
Maintainers
Readme
Dash CLI
AI-powered Git CLI for commit messages, PRs, and GitHub workflows.
Install
npm install -g dash-gitThen run:
dash setupNote: If you have the system shell
dashinstalled (common on Debian/Ubuntu), usedash-cliinstead ofdashfor all commands.
Requirements
- Node.js 18+
- Git
- Groq API Key from console.groq.com/keys
- GitHub CLI (optional) - for PR/issue commands. Get it at cli.github.com
Quick start
dash config set GROQ_API_KEY=gsk_your_key_here
dash setup
dash
dash commit
dash c -m "chore: hide testimonials"
dash prCommands
dash commit / dash c
dash commit [-g <n>] [-x <files>] [-a] [-t <type>] [-m <context>]| Flag | Description |
| ----------------------- | ---------------------------- |
| -g, --generate <n> | Generate n messages (max: 5) |
| -x, --exclude <files> | Exclude files |
| -a, --all | Stage all changed files |
| -t, --type <type> | Use conventional format |
| -m, --message <text> | Extra AI context for message |
Examples:
dash
dash commit
dash c
dash commit -m "chore: hide testimonials"
dash commit --all
dash commit --exclude dist/ --generate 3
dash commit --type conventionaldash opens a staging selector before it commits. "Stage all changed files" is selected by default, and you can switch to manual mode with the arrow keys to choose files with Space and submit with Enter.
dash commit uses your current staged changes. If nothing is staged, it now asks whether you want to stage everything or select files manually before generating the commit message.
For larger diffs, dash can generate a multi-line commit message with a conventional subject line plus - bullet points for the major changes.
dash pr
dash pr [create|list|view|merge] [flags]| Subcommand | Description |
| ---------- | ---------------- |
| create | Create/edit PR |
| list | List open PRs |
| view | View current PR |
| merge | Merge current PR |
Create flags:
| Flag | Description |
| --------------------- | --------------- |
| -b, --base <branch> | Base branch |
| -d, --draft | Create as draft |
Merge flags:
| Flag | Description |
| -------------- | ------------ |
| -s, --squash | Squash merge |
| -m, --merge | Merge commit |
| -r, --rebase | Rebase merge |
Examples:
dash pr
dash pr --draft --base develop
dash pr list
dash pr merge --squashdash issue
dash issue list [-s <state>] [-l <n>]| Flag | Description |
| --------------------- | ------------------------ |
| -s, --state <state> | open, closed, all |
| -l, --limit <n> | Max issues (default: 20) |
Examples:
dash issue list
dash issue list --state all --limit 10dash config
dash config <get|set> <key=value...>Examples:
dash config set GROQ_API_KEY=gsk_xxx
dash config set model=openai/gpt-oss-120b
dash config get GROQ_API_KEY modeldash hook
dash hook <install|uninstall>Installs git hook for auto-message generation.
dash setup
dash setupChecks dependencies and configures GitHub CLI integration.
Configuration
Config stored in ~/.dash:
| Option | Default | Description |
| -------------- | ------------------ | ------------------ |
| GROQ_API_KEY | - | API key (required) |
| model | openai/gpt-oss-20b | AI model |
| generate | 1 | Commit suggestions |
| type | - | Use conventional |
| max-length | 100 | Max message length |
| locale | en | Message language |
| timeout | 10000 | API timeout (ms) |
| gh_enabled | true | Enable gh features |
Custom prompts
Create a .dash folder in your repository:
.dash/commit.md- Overrides commit prompt.dash/pr.md- Overrides PR prompt
When these files exist, dash uses them instead of the built-in prompts.
Monorepo support: Dash searches up the directory tree, so you can have:
monorepo/
├── .dash/commit.md # Root rules
└── packages/
├── api/.dash/commit.md # API rules
└── web/.dash/commit.md # Web rulesEach package can have its own prompts.
Environment variables
| Variable | Description |
| -------------- | ----------- |
| GROQ_API_KEY | API key |
| HTTPS_PROXY | HTTP proxy |
GitHub CLI
Requires gh:
dash prdash issue
Works without gh:
dash commitdash hookdash configdash setup
Troubleshooting
"dash" runs the system shell instead of the CLI
Many Linux systems (Debian, Ubuntu, etc.) have /usr/bin/dash (the Debian Almquist Shell) installed. If your npm bin directory is lower in PATH priority, the system shell runs instead.
Solution: Use dash-cli instead of dash:
dash-cli setup
dash-cli commit
dash-cli prBoth dash and dash-cli are provided as binary names. Use whichever works on your system.
Alternative: Fix your PATH to prioritize npm globals:
# Check where dash resolves to
which dash
# Check npm global bin location
npm bin -g
# Add npm bin to PATH (in .bashrc/.zshrc)
export PATH="$(npm bin -g):$PATH"Development
git clone https://github.com/koushikxd/dash-git.git
cd dash/packages/cli
pnpm install
pnpm build
pnpm dev
pnpm testStructure
packages/cli/
├── src/
│ ├── commands/ # Command implementations
│ ├── utils/ # Git, config, API helpers
│ ├── errors.ts
│ └── index.ts
├── tests/
└── dist/Contributing
- Fork it
- Create a feature branch
- Make changes
- Run tests:
pnpm test - Use dash to commit:
dash commit - Use dash for PR:
dash pr
Acknowledgments
Inspired by noto by Sithija Nelusha Silva.
License
MIT
