cohors
v0.9.11Every git repo on your machine for your agent: status, cross-repo search, tasks, opt-in git actions
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_repos List repositories
The raw git state of many repos in one call: each repo's branch, upstream (ahead/behind), worktree counts, stashes, last commit, an attention assessment, any linked worktree that holds uncommitted or unpushed work (`worktrees`, each with its path) and (with a GitHub token) its CI state and open pull requests, plus a fleet summary. Use this (or fleet_summary, or overview for what to do about it) whenever the user asks about their repos, projects, or fleet, or what is dirty/unpushed/behind/needs attention; do NOT enumerate repos yourself with find or per-repo git. Omit selector for the whole fle…
| Parameter | Type | Description |
|---|---|---|
detail | string | brief (default) keeps the answer small; full returns every field and is several times larger. |
fields | array | Return exactly these top-level keys for each repo (id and name are always kept), each whole. Valid keys: branch, branches (every local branch with its own ahead/behind), upstream, worktree, worktrees… |
limit | integer | Return at most this many repos (after sorting). Default 50 for a brief answer; no limit with fields or detail: "full". |
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
sort | string | Order of the returned repos (default dirty-first). |
get_repo Repository status
Full status of ONE repository, found by id, name, path or a unique prefix of its name — branch, upstream ahead/behind, worktree counts, stashes, recent activity, last commit, plus a local drill-in `detail` (recent commits, per-branch sync, changed files, stash list). Adds remote_detail (open PRs, contributors, open issues, latest release) when the repo has a GitHub remote and a token. Use when the user names a single repo; for several repos call list_repos with a selector instead.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repo id, name/alias, path, or a unique prefix of a name (an exact match wins; a name several repos share is an error listing their paths). |
fleet_summary Fleet summary
The cheapest "is anything on fire?" call: fleet-wide counts only — total, needs-attention, risk (the "drop everything" bucket), unpushed, behind, dirty, conflicted, stashed, errors. Use it first to gauge overall state, then drill in with list_repos. Takes no arguments.
overview What to do next
The briefing: what to DO NEXT across the fleet and why, in one call. Returns `headline`, `actions` (most urgent first — each with a title, the reason, the registry verb that carries it out when there is one, and the ids of the repos it applies to), `figures` (the key numbers: work not backed up, stashes, uncommitted files, stale fetches, open tasks, commits this week, clean repos), `repos` (the 20 most urgent repos that have a reason, each with its reasons in plain words and `at_risk` marking where local work could be lost; `repos_omitted` counts the rest), `focus` (the focus board), `work`…
| Parameter | Type | Description |
|---|---|---|
detail | string | brief (default) keeps the answer small; full returns every field and is several times larger. |
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
next Where you left off
What to do NOW, as one ranked list, each item with the cohors command that carries it out: coding-agent conversations to resume (Claude Code and Codex sessions held in each repo, the likeliest first, with their `cohors agent --resume …` command), the fleet's do-next steps, the focus board's items, then up to two setup tips (parts of cohors this machine is not using yet). The same list `cohors next --json` prints; `sessions` lists more conversations, each with its resume command (8, or 20 with detail: "full"). Use for "where did I leave off", "what should I pick up", "what was I doing in X".…
| Parameter | Type | Description |
|---|---|---|
detail | string | brief (default) keeps the answer small; full returns every field and is several times larger. |
here | string | The repo you are working in (id, name, path, or a folder inside it); its work ranks first. Default: the folder this server was started in. |
limit | integer | How many suggestions before the tips (default 6). |
standup Standup
What the user committed across every repo, for a standup or a status update: their commits (matched by git user.email) in the window as a ready-to-paste markdown digest, grouped by repo with the most active first. Use for "what did I do today / this week", "write my standup", or a weekly summary; do NOT run git log in each repo. window is "today" or "week" (default week). detail: "full" adds the same commits as records (`groups`).
| Parameter | Type | Description |
|---|---|---|
detail | string | brief (default) keeps the answer small; full returns every field and is several times larger. |
window | string | Which window to report (default week). |
search Search across repositories
Find code or repos ACROSS the whole fleet without cd-ing into each one. kind=content greps file contents (ripgrep/git grep/fallback, fixed-string — the default); kind=path|name|branch matches repo metadata (case-insensitive substring). Sensitive paths (.env, keys, credential stores) never appear in content results. An optional selector limits which repos are searched. This is the entry point for cross-repo audits and refactors — use it instead of running grep/rg in each repo yourself.
| Parameter | Type | Description |
|---|---|---|
query * | string | What to look for (fixed string for content; substring/glob for path/name/branch). |
kind | string | What to match (default content). |
max_results | integer | Cap on total hits (default 200). |
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
changes Uncommitted changes
What is actually uncommitted in each selected repo: the changed-file list (each path with its git porcelain status) and, with include_patch:true, a size-capped unified diff of the working tree (diffs of sensitive files like .env or key material are withheld; the file list still names them). Use this to summarize or review uncommitted work — e.g. "what's the work sitting in payments?" — instead of cd-ing in and running git status / git diff. Clean repos are omitted. Omit the selector to cover every dirty repo, or scope it (e.g. {"name": "payments"}) to one.
| Parameter | Type | Description |
|---|---|---|
include_patch | boolean | Also return a unified diff of the working tree per repo (default false; can be large). |
max_bytes | integer | Cap each repo's patch in bytes (default 20000); the patch is flagged `truncated` when cut. |
max_files | integer | Cap each repo's file list (default 100); `files_omitted` counts the rest. |
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
discover Find repositories
Which repositories cohors finds, and where, without reading them: every repo under the configured roots, each nested repo marked with the repo around it (`nested_in`). With deep: true it also searches inside every repo at any depth, marks the repos only that deep search reaches (`deep_only`), and says which of those the fleet does not show yet (`in_fleet: false`). The same rows `cohors discover --json` prints. Read-only: it never changes the config or what cohors remembers. When deep-only repos are missing from the fleet, `add` is the command for the USER to run (`cohors discover --deep`, whic…
| Parameter | Type | Description |
|---|---|---|
deep | boolean | Also search inside every repo, at any depth (default false). Slower on a big tree. |
repo_path Repository path
Resolve a repo (by id, name, path or a unique prefix of its name) to its absolute path so you can operate in it directly. Prefer this over searching the filesystem for where a repo lives.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repo id, name/alias, path, or a unique prefix of a name (an exact match wins; a name several repos share is an error listing their paths). |
list_prs Open pull requests
Open pull requests per repo (GitHub-enriched). Use for "any open PRs across my repos / waiting on me?". Needs a token (gh auth or GITHUB_TOKEN) — meta says so when absent — and repos without a GitHub remote are omitted. An optional selector scopes the set.
| Parameter | Type | Description |
|---|---|---|
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
state | string | Which PRs to count (default open). |
ci_status CI status
CI / checks status per repo (GitHub-enriched: passing | failing | pending). Use for "which repos have red/failing CI?"; to then act on them, pass {"ci": "failing"} as a selector to another tool. Needs a token; repos without a GitHub remote are omitted. An optional selector scopes the set.
| Parameter | Type | Description |
|---|---|---|
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
launchpad Launchpad
What each repo OFFERS and what work is WAITING in it: its committed .cohors/ contribution (summary, group, declared flows, repo-shipped agents, tasks) plus flows auto-detected from npm/cargo/uv/Makefile/gradle manifests. Use for "what should I work on", "what's on my plate across repos", "how do I run/test X", or to see which repos are not set up yet (configured: false). Omit selector for the whole fleet. Open tasks come back most-urgent first.
| Parameter | Type | Description |
|---|---|---|
include_done | boolean | Also return finished tasks (default false). |
only_configured | boolean | Skip repos without a .cohors/ contribution (default false). |
selector | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
read_contract Launchpad file rules
The exact rules a .cohors/repo.json must satisfy, plus the judgement calls that make a contribution good rather than merely valid. Call this before write_repo_contribution so you do not guess the schema. Takes no arguments.
write_repo_contribution Write a repo's launchpad file
Validate and write one repo's .cohors/repo.json (its flows, agents, tasks). REPLACES the whole document: read the current one with `launchpad` first and pass back everything you mean to keep, especially tasks the user is part-way through. Writes nothing when invalid and returns every error at once. Declare a flow only when it adds what detection cannot infer (a label, port, primary, composite command, cwd) — an empty flows array is a correct answer. Never set a task done without evidence. Nothing machine-specific: this file is committed. Also gitignores .cohors/local.json. Requires --allow-l…
| Parameter | Type | Description |
|---|---|---|
name * | string | Display name. |
repo * | string | Repo id, name/alias, or path, named exactly (no prefixes: this write replaces the file), and inside the fleet. |
agents | array | |
dry_run | boolean | Validate and report without writing (works without --allow-launchpad). |
flows | array | |
generatedFrom | string | Short SHA of the commit you read, so staleness can be shown. |
group | string | Free text; groups repos on the launchpad. |
icon | string | |
links | array | |
summary | string | One line: what this repo IS. |
tasks | array |
read_board Focus board
The user's cross-repo focus board: the short list of things they are working on across every repo, plus recent agent activity. Use with `launchpad` when planning a day or picking up where they left off. Takes no arguments.
write_board Write the focus board
Validate and REPLACE the cross-repo focus board. Match `repo` by name (as `launchpad` reports it), never by path, so the board stays valid across machines. Never set status done without evidence. Requires --allow-launchpad; dry_run validates without it.
| Parameter | Type | Description |
|---|---|---|
focus * | array | |
dry_run | boolean | Validate and report without writing (works without --allow-launchpad). |
record_activity Record agent activity
Append one event to the agent activity log so the launchpad's timeline shows this session. Requires --allow-launchpad.
| Parameter | Type | Description |
|---|---|---|
phase * | string | |
runner * | string | |
agent | string | |
branch | string | |
repo | string | Repo id, name, or path. |
fetch Fetch
git fetch across the selected repos — non-destructive (updates remote-tracking refs only). Use to refresh remote state before checking what is behind. Requires a selector. Executing needs the server launched with --allow-writes; without it (or with dry_run:true) the call just previews the resolved target set.
| Parameter | Type | Description |
|---|---|---|
selector * | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
dry_run | boolean | Preview the resolved target set without acting. |
pull Pull (fast-forward only)
git pull --ff-only across the selected repos — fast-forward only, so it never merges, rebases, or loses work. Typical flow: find what is behind with {"behind": true}, then pull those. Requires a selector. Executing needs --allow-writes; dry_run:true (or a read-only server) previews the targets.
| Parameter | Type | Description |
|---|---|---|
selector * | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
dry_run | boolean | Preview the resolved target set without acting. |
mode | string | Only fast-forward is supported (the default). |
push Push
git push the current branch to its upstream across the selected repos; a branch that was never pushed is published (git push -u origin HEAD) so it starts tracking. Never force-pushes (git rejects non-fast-forward pushes), so it can't overwrite remote history. Pair after commit to land a cross-repo change. Pushes the main checkout only; add worktrees: true to also push the branches of linked worktrees, where coding agents leave commits (the dry run names them). Requires a selector. Executing needs --allow-writes; dry_run:true previews the targets.
| Parameter | Type | Description |
|---|---|---|
selector * | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
dry_run | boolean | Preview the resolved target set without acting. |
worktrees | boolean | Also act in each selected repo's linked worktrees, where coding agents leave work: push their branches to origin (publishing a new one) or commit their files on their own branches. Off by default; wit… |
commit Commit
git add -A + git commit -m <message> across the selected repos (stages tracked AND untracked; "nothing to commit" is a no-op). Never amends or rewrites history, and never records another checkout (an agent's worktree) as a gitlink. Commits the main checkout only; add worktrees: true to also commit linked worktrees' files on their own branches. Pair with push to finish a cross-repo change. Requires selector and message. Executing needs --allow-writes AND confirm:true; dry_run:true previews the target set with neither.
| Parameter | Type | Description |
|---|---|---|
message * | string | Commit message, applied to every selected repo (required). |
selector * | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
confirm | boolean | Must be true to actually act; preview first with dry_run. |
dry_run | boolean | Preview the resolved target set without acting. |
worktrees | boolean | Also act in each selected repo's linked worktrees, where coding agents leave work: push their branches to origin (publishing a new one) or commit their files on their own branches. Off by default; wit… |
stash Stash
git stash push (tracked changes) across the selected repos — a safe way to park work, e.g. before a bulk pull or run on dirty repos. Requires a selector. Executing needs --allow-writes AND confirm:true; dry_run:true previews the target set with neither.
| Parameter | Type | Description |
|---|---|---|
selector * | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
confirm | boolean | Must be true to actually act; preview first with dry_run. |
dry_run | boolean | Preview the resolved target set without acting. |
run Run a command in each repository
Run one shell command in each selected repo and collect per-repo {exit_code, stdout, stderr, truncated, timed_out} — the fleet codemod/audit/test primitive (e.g. "cargo fmt --check", "rg TODO", "npm test"). The command runs in each repo's own directory. Requires command and selector. Executing needs --allow-run AND confirm:true; dry_run:true previews the target set with neither. Each repo is bounded by timeout_secs (default 120).
| Parameter | Type | Description |
|---|---|---|
command * | string | Shell command run in each selected repo's directory. |
selector * | object | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (*… |
confirm | boolean | Must be true to actually act; preview first with dry_run. |
dry_run | boolean | Preview the resolved target set without acting. |
timeout_secs | integer | Per-repo timeout in seconds (default 120). |