git-codex
v1.1.1
Published
Git subcommand for task-oriented worktrees and multi-agent parallel workflows.
Downloads
471
Maintainers
Readme
git-codex
git-codex is a TypeScript CLI that adds a git codex subcommand for running tasks in parallel with Git worktrees.
It helps you:
- create a task worktree fast
- work in a separate VS Code window
- merge and clean up safely when done
Quick Start
Install globally:
pnpm add -g git-codex
git codex --helpOr run without installing:
pnpm dlx git-codex --helpTypical flow:
# 1) Create task worktree + branch
git codex add auth-fix
# 2) Work in that window/branch
# 3) Merge task into current branch and clean up
git codex finish auth-fixDemo
Quick walkthrough:
Commands
Global flags:
-q, --quietless output--jsonmachine-readable output
Core commands:
git codex add <task>create task branch/worktreegit codex finish <task>merge task branch into current branch, then clean upgit codex rm <task>remove task worktree (optionally delete folder)git codex listshow worktreesgit codex open <task>open an existing task worktreegit codex prompt <task> <message>generate a task prompt
Run git codex <command> --help for full flags.
Most-used flags
For add:
--base <ref>--branch-prefix <prefix>--dir <path>--reuse--rm-first--template --template-type <default|bugfix|feature>--no-open
For finish:
--no-cleanup--keep-branch--no-force-delete
finish behavior summary:
- checks current branch is clean
- warns if task worktree has uncommitted changes
- pauses on merge conflicts until resolved/aborted
- cleans up only after merge is actually complete
Configuration
You can configure defaults via:
- repo file:
.git-codexrc.json - global file:
~/.config/git-codex/config.json - git config keys (
codex.*)
Precedence (highest to lowest):
- CLI flags
- Repo config file
- Repo git config
- Global config file
- Global git config
- Built-in defaults
Example .git-codexrc.json:
{
"base": "origin/main",
"branchPrefix": "codex/",
"fetch": false,
"copyEnv": true,
"envScope": "packages",
"template": true,
"templateType": "feature",
"open": true
}Contributing
pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm buildProject notes:
- TypeScript + pnpm
- tests are run with Vitest
- CI runs lint, typecheck, test, and build on Linux/macOS/Windows
Releases
git-codex uses Changesets.
pnpm changeset
pnpm version-packages
pnpm release:check
pnpm releaseDetailed guides:
docs/release-checklist.mddocs/parallel-codex-workflows.md
Troubleshooting (Windows locks)
If rm fails because files are locked:
- close VS Code windows in that worktree
- stop watchers/dev servers
- make sure no terminal is inside that folder
- retry with
git codex rm <task> --force-delete
