coding-agent-context
v0.1.0
Published
CLI tool bridging Linear issues to git worktrees and Claude Code sessions
Maintainers
Readme
cac
Coding Agent Context — Bridge your task management, code hosting, and AI coding agents into a seamless workflow.
What is cac?
cac pulls context from your task management (Linear) and code hosting (GitHub), then makes it easy to work with AI coding agents (Claude Code) by providing rich, structured context.
Current integrations:
- Task Management: Linear
- Code Hosting: GitHub
- AI Agent: Claude Code
Features
- Issue Selection — Search and select issues from Linear with hierarchical filtering (team, status, search)
- Spec Generation — Fetch issue details, comments, and project context into a structured spec file
- Git Worktrees — Automatically create isolated worktrees for each issue
- Claude Code Integration — Start Claude sessions pre-loaded with issue context
- PR Comment Handling — View PR comments and spin up Claude sessions to address them
- Worktree Management — Commit changes and clean up merged worktrees
Installation
npm install -g coding-agent-contextOr install from source:
git clone https://github.com/yourusername/cac.git
cd cac
npm install
npm run build
npm linkQuick Start
# 1. Initialize cac in your repo
cac init
# 2. Search and select an issue
cac issues
# 3. Generate a spec file with context
cac refine
# 4. Start a Claude Code session in an isolated worktree
cac sessionCommands
cac init
Initialize cac configuration for the current repository.
cac initCreates .cac/config.json with your Linear API key and adds .cac/ to .gitignore.
cac issues
Search and select a Linear issue interactively.
cac issuesFeatures hierarchical filtering: Team → Status → Search term → Select issue.
cac refine [issueId]
Fetch issue details and write a spec file.
cac refine # Uses cached issue from `cac issues`
cac refine LIN-123 # Specify issue directlyCreates cac/plan/{issueId}-spec-v{N}.md with:
- Issue details (title, description, priority, labels)
- Comments from the issue
- Project context
- Optional: your own notes (opens in editor)
cac session [issueId]
Create a git worktree and start a Claude Code session.
cac session # Uses cached issue
cac session LIN-123 # Specify issue directly
cac session -b develop # Base worktree on specific branch- Creates worktree at
.cac/worktrees/{issueId} - Creates branch
{issueId}(lowercase) - Starts Claude Code with the spec file pre-loaded
cac commit
Commit changes in the current worktree.
cac commit
cac commit -m "Your commit message"Auto-stages all changes and prompts for commit message if not provided.
cac clean
Clean up stale worktrees.
cac cleanShows all worktrees with merged/unmerged status. Multi-select which to remove.
cac comments
View and address PR comments.
cac comments- Lists all open PRs in the repo
- Shows comments for selected PR
- Multi-select comments to address
- Options: Copy to clipboard or start Claude Code session in isolated worktree
Configuration
Configuration is stored in .cac/config.json:
{
"linear": {
"apiKey": "lin_api_...",
"defaultFilters": {
"teamId": "optional-team-id",
"assignee": "me"
}
},
"worktree": {
"baseBranch": "main",
"dir": ".cac/worktrees"
},
"claude": {
"bin": "claude"
}
}Roadmap
Multi-provider support:
- [ ] Jira
- [ ] GitHub Issues
- [ ] Asana
- [ ] Notion
AI-agnostic:
- [ ] OpenAI Codex
- [ ] Other coding agents
License
MIT
