gitcli
v3.0.2
Published
A next-gen Git productivity CLI with AI helpers, plugins, and automation.
Readme
gitcli
A next-gen Git productivity CLI with AI helpers, plugins, and automation. Built with TypeScript, Commander.js, and simple-git.
Install
npm install
npm run build
npm linkTesting
Run Jest tests (ESM + ts-jest):
npm testCommands
gitcli commit [--ai --style conventional|casual|emoji --note "..." --all]gitcli reviewAI review of staged changesgitcli resolve --aiAI merge conflict resolvergitcli branch create "task" [--ai]gitcli pr summarize [--notify]gitcli uiBlessed dashboardgitcli history stats|list|cleargitcli clean [--prune-remote]gitcli impactChange impact analysis + dirty file warningsgitcli plugin install <url> | listgitcli pair start <ws-url> | stopgitcli remote <ssh-url> <git-command...>gitcli scanSecret scanner on staged filesgitcli stash --secure [-p password]AES-256 stashgitcli release create [--publish --repo owner/repo --draft]Changelog, version advice, release manifest + optional GitHub publishgitcli fun streak|art|healthgitcli hooks run|installRun Prettier/ESLint/tests or install git pre-commit hookgitcli syncCloud sync for history/aliases (POSTs to configured endpoint)
Config
Stored at ~/.gitcli/config.json:
{
"aiProvider": "openai",
"aiModel": "gpt-3.5-turbo",
"aiBaseUrl": "https://api.openai.com/v1",
"tokens": {"openai": "sk-..."},
"linkedRepos": ["../other-repo"],
"pluginPolicies": { "allow": ["my-plugin.js"], "deny": [] },
"notifications": {"slackWebhook": "", "discordWebhook": ""},
"cloudSync": {"enabled": false, "endpoint": "https://api.example.com/gitcli/sync", "apiKey": "token"}
}AI setup: set OPENAI_API_KEY env var (or tokens.openai in config). Optional: OPENAI_BASE_URL to point at a proxy-compatible OpenAI API.
Cloud sync: set cloudSync.enabled: true, provide endpoint, and optionally apiKey/headers. gitcli sync will POST {history, timestamp, machine, platform, version} to that endpoint.
Plugins: optional allow/deny lists via pluginPolicies to avoid loading unknown plugins.
Secret scan: add allowlist entries in .gitcli-scan-allowlist (one per line) to suppress known false positives.
Hooks: gitcli hooks run executes Prettier/ESLint/tests; gitcli hooks install writes a git pre-commit hook that runs npm test.
Release publishing: gitcli release create --publish uses GITHUB_TOKEN (or tokens.github) and infers repo from origin; override with --repo owner/repo. Always writes release-manifest.json.
Platform notes: hooks install writes both pre-commit (sh) and pre-commit.ps1 (PowerShell) so Git for Windows and macOS/Linux users are covered. Use Git for Windows (with sh) or point core.hooksPath to prefer PowerShell if desired.
Plugins live in ~/.gitcli/plugins (ES module exporting default function(program)).
Sandboxing: plugins run in a VM context without require or fs access; only Command and console are exposed. Allow/deny lists via pluginPolicies.
