Automation & git
ka ships the pieces for unattended runs and git-heavy workflows: a ready GitHub Actions workflow, cron scheduling, prompt recipes, and isolated worktrees. See the CLI reference for the full flag grammar.
GitHub Actions
Section titled “GitHub Actions”ka action init [--force]Writes ka’s vendored GitHub workflow into the repository. The workflow:
- triggers on manual dispatch and on PRs labeled
ka - checks out at a SHA-pinned action version
- installs a release binary with sha256 verification
- runs ka in
readonlymode and posts its result as a PR comment
It only needs KA_MODEL and the provider KA_*_API_KEY secrets; nothing else is exposed. --force overwrites an existing workflow file.
Cron schedules
Section titled “Cron schedules”ka schedule add # print the crontab line(s) to addka schedule list # show current ka schedule entrieska schedule remove # print the removalEntries are ordinary crontab lines marked with a # ka-schedule comment. By default the commands print the lines; --install writes them into your crontab directly.
Recipes
Section titled “Recipes”ka recipe triage --var branch=mainka recipe nightly --dry-runA recipe is a strict TOML file in .ka/recipes/ with vars and steps; each step is one prompt, and the recipe runs as sequential prompts inside a single session. --var K=V supplies variables, --dry-run prints the prompts without sending them.
Worktrees
Section titled “Worktrees”ka worktree addka worktree listka worktree remove [--delete-branch]Gives each agent task its own git worktree, so concurrent runs never touch the same checkout. Removal can also delete the branch the worktree was on.
Git in the TUI
Section titled “Git in the TUI”/propens the pull-request flow with review and fix presets./gitopens a staging panel.[git] commit_rolehas a role write the commit subject from the staged diff plus the turn; if it cannot, the fallback fires silently.[git] trailersadds configured trailers to commits.
Caps for unattended runs
Section titled “Caps for unattended runs”| Mechanism | Effect |
|---|---|
--max-budget-usd $ |
Asks to stop past a spend ceiling |
--max-cost $ / --max-time SECS |
Hard caps; ka run exits with code 3 when crossed |
--mode dont_ask |
Never block on a permission question |
[permissions] prompt_policy = "deny" |
Deny (rather than ask) when a rule does not allow an action |
Combine these with the headless interface for scripts, and read the safety model before pointing ka at shared state.