CLI reference

kojo is one binary: the server, the standalone egress proxy and the command line. This page lists every command with its flags, as kojo <command> --help prints them.

Where a command runs

Some commands start or inspect kōjō on the machine they run on and read kojo.yaml. Others are clients of a running server and need its URL and an API token.

Command Runs Needs
kojo serve locally kojo.yaml (-f), Postgres, the sandbox driver
kojo proxy locally kojo.yaml with sandbox.proxy.mode: remote
kojo migrate locally kojo.yaml, Postgres
kojo run against a server --server, --token (role operator)
kojo sessions list, show, logs against a server --server, --token (role viewer)
kojo sessions cancel, message, approve, decline, report against a server --server, --token (role operator; admin for report --revoke)
kojo campaigns list, show against a server --server, --token (role viewer)
kojo campaigns create, continue, cancel, retry against a server --server, --token (role operator)
kojo limits against a server --server, --token (role viewer; people are listed to operator)
kojo limits set, unset against a server --server, --token (role admin; operator for install)
kojo eval against a server --server, --token (role skill:edit)
kojo eval --local locally kojo.yaml; no Postgres, no forge
kojo config export, apply against a server --server, --token (role admin)
kojo config validate locally kojo.yaml only
kojo skills list against a server --server, --token (role viewer)
kojo skills validate locally skill files on disk
kojo skills propose against a server --server, --token (role operator)
kojo skills proposals against a server --server, --token (role viewer)
kojo mcp against a server --server, --token
kojo doctor locally kojo.yaml, Postgres, the sandbox driver
kojo doctor --remote against a server --server, --token (role operator)
kojo setup github locally a browser, and access to GitHub
kojo setup slack locally nothing
kojo setup discord locally the Discord application’s ID
kojo setup teams locally the bot’s Microsoft App ID
kojo setup linear, jira locally nothing
kojo setup asana locally with --project: ASANA_TOKEN, access to Asana, and kōjō serving at its public URL
kojo setup sentry, datadog locally nothing
kojo schema, kojo version, kojo completion locally nothing

The client commands send the token as a Bearer token to the server’s API under /api/v1. Tokens and their roles are set in server.auth.tokens of kojo.yaml; see the kojo.yaml reference and Managing kōjō for roles.

Global flags

Every command accepts these flags. A command that does not need one ignores it.

Flag Default Meaning
-f, --config kojo.yaml Deployment config file.
--server http://localhost:8080 URL of the kōjō server, for the commands that talk to one.
--token empty API token.
--log-level info debug, info, warn or error. An unknown value means info.
--log-format text text or json. Logs go to standard error.
-h, --help Help for the command.
-v, --version On kojo itself: print the version.

Environment variables

The CLI reads these variables as defaults of the global flags. A flag on the command line wins.

Variable Flag Default
KOJO_CONFIG --config kojo.yaml
KOJO_SERVER --server http://localhost:8080
KOJO_TOKEN --token empty
KOJO_LOG_LEVEL --log-level info
KOJO_LOG_FORMAT --log-format text

The commands that load kojo.yaml (serve, proxy, migrate, doctor, eval --local, config validate) also read the environment in these places:

Variable Read by Effect
any ${NAME} in kojo.yaml the config loader Replaced by the variable’s value. See Deploy.
ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, GEMINI_API_KEY, GOOGLE_API_KEY, OPENROUTER_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION, GOOGLE_CLOUD_REGION, AWS_REGION, AWS_DEFAULT_REGION the embedded model gateway Used when models.providers.* in kojo.yaml does not set the value. GEMINI_API_KEY is tried before GOOGLE_API_KEY, GOOGLE_CLOUD_LOCATION before GOOGLE_CLOUD_REGION, AWS_REGION before AWS_DEFAULT_REGION. The Google Cloud, AWS and Azure SDKs read their own credential variables as well; see Models.
KOJO_LIVE_MODELS the model gateway 1 ignores models.recordings and calls the real providers.
KOJO_RECORD the model gateway 1, with live models and models.recordings set, writes each answer under <recordings>/recorded/.
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT kojo serve Turns on trace export when telemetry.otlp_endpoint is not set.
SSL_CERT_FILE the k8s sandbox driver Tried first when the driver looks for the system CA bundle that sandboxes trust.

Models covers the model variables and Observability the telemetry ones.

Exit codes

Code Meaning
0 The command succeeded.
1 The thing asked for failed: a session, an eval below its pass rate, a doctor check, a skill that does not validate. The server refusing a request (an API error below 500) also exits 1.
2 Usage or configuration: an unknown command or flag, a missing argument, a kojo.yaml that does not load or validate.
3 Infrastructure: the server or the database cannot be reached, or the server answered with a 5xx error.

Errors are printed to standard error as kojo: <message>.

kojo sessions list --server http://127.0.0.1:1
echo $?   # 3: the server cannot be reached

kojo serve

Runs kōjō: the dashboard and its API, the forge webhooks, the chat surfaces, the MCP endpoint, the session workers and the scheduler, in one process. Pending database migrations are applied at start. Several replicas can run against one database; see Deploy.

kojo serve [flags]

serve has no flags of its own. It stops on SIGINT or SIGTERM: it stops accepting requests, lets the sessions in flight save their checkpoint, and releases them for another replica or the next start.

kojo serve -f /etc/kojo/kojo.yaml
kojo serve -f kojo.yaml --log-format json --log-level debug

kojo proxy

Runs kojo-proxy as its own process: the egress and credential proxy of the sandboxes. It needs sandbox.proxy.mode: remote with admin_token in kojo.yaml; with embedded, kojo serve runs the proxy itself and this command exits with code 2. It reads the sandbox.proxy section and nothing else, so the file may hold that section alone. The proxy listens on sandbox.proxy.listen (default :3128) and serves its admin API on sandbox.proxy.admin_listen (default :3129). The admin listener also answers GET /readyz: 503 until a kōjō server has sent the proxy the sandbox policies, or until sandbox.proxy.sync_timeout (default 30s) has passed, so that a new replica takes no sandbox traffic before it knows the sandboxes.

kojo proxy [flags]

proxy has no flags of its own.

kojo proxy -f /etc/kojo/kojo.yaml

kojo-proxy explains what the proxy enforces, and Running kojo proxy separately how to run it apart from the server.

kojo migrate

Applies the pending database migrations and exits. It prints how many it applied, and says so when pgvector is not available.

kojo migrate [flags]

migrate has no flags of its own.

kojo migrate -f kojo.yaml
1 migration(s) applied

kojo run

Starts a session on a server and follows it until it ends. The steps are printed to standard error as they happen; the summary, the goal critic’s report, the risk, the pull request URL and the diff are printed to standard output.

kojo run [flags] <what to do>
Flag Default Meaning
--repo empty Repository as forge/owner/name.
--skill empty Run exactly this skill instead of letting the orchestrator choose.
--issue 0 The issue the request is about.
--pr 0 The pull request the request is about.
--dry-run false Do the work but push and post nothing; the diff is printed.
--plan false Write a plan first and wait for the go-ahead before changing code. Cannot be combined with --dry-run.
-d, --detach false Print the session ID and return without following it.
--input none A named value for the skills, as name=value. Repeatable.
--reference none A repository to read next to the workspace, as [name=]forge/owner/name[#pr|@ref|@base..head]. Without a name it is source. Repeatable.
--with none A linked repository the session may also change, as forge/owner/name. Repeatable.

Give the request as text, name a --skill, or both; with neither the command exits with code 2. --issue and --pr cannot be combined. The repository must be enabled, for a dry run too. With --issue or --pr, the session and its pull request take the title of that issue or pull request.

--input hands the session a value before any skill ran: skills see it under “Values recorded so far” and goal checks read it as ${NAME}, as if an earlier skill had recorded it. Names starting with KOJO_ are refused. --reference attaches a reference repository: kōjō clones it into .kojo/refs/<name> of the workspace, where skills read it and from where nothing is published. #412 names a pull request, @v1.5.0 a branch, tag or commit, and @v1.4.0..v1.5.0 a commit range. The repository must be enabled.

--with adds a linked repository to the ones the repository’s entry in the repos object already links: kōjō clones it at its default branch into .kojo/linked/<name> of the workspace, where <name> is its last path segment, and opens a pull request of its own on it when the session changed it. It travels as the input linked.<name>. The repository must be enabled, and two linked repositories with the same last segment are refused. With linked repositories, every pull request the session opened is printed.

run exits 0 when the session succeeded, and also when it stopped to wait for an approval in chat or for the go-ahead on its plan; for a plan it prints the plan and the commands that answer it. It exits 1 when the session failed or was cancelled.

kojo run --repo github/acme/api --issue 412 "fix this"
kojo run --repo github/acme/api --skill build-feature --issue 415
kojo run --repo github/acme/api --plan --issue 416 "add CSV export"
kojo run --repo github/acme/api --skill security-audit --dry-run "audit the auth package"
kojo run --repo github/acme/api --pr 418 --skill review-pr
kojo run --repo github/acme/sdk-go --skill port-sdk --reference github/acme/sdk-python#412
kojo run --repo github/acme/api --with github/acme/web --issue 420 "add the endpoint and its page"

kojo sessions

Lists, shows, follows, messages, approves, cancels and shares sessions on a server.

kojo sessions list

Lists sessions, newest first, as a table with the columns ID, STATUS, REPO, TRIGGER, COST, AGE and TITLE.

kojo sessions list [flags]
Flag Default Meaning
--status empty queued, running, waiting, succeeded, failed or cancelled.
--repo empty Repository as forge/owner/name.
--limit 30 At most this many.
--json false Print JSON.
kojo sessions list --status failed --limit 10
kojo sessions list --repo github/acme/api --json

kojo sessions show

Shows one session: its ID, status, repository and title, then its result as kojo run prints it.

kojo sessions show <session> [flags]
Flag Default Meaning
--json false Print JSON.
kojo sessions show "$SESSION"

$SESSION stands for a session ID, as kojo run and kojo sessions list print it.

kojo sessions logs

Prints a session’s steps: skills started, commands run in the sandbox, tool calls, the goal critic. It is the session replay of the dashboard, in a terminal.

kojo sessions logs <session> [flags]
Flag Default Meaning
--follow false Keep following until the session ends, then print its result.
--json false Print the steps as JSON, inputs and outputs included.

--follow prints lines as they happen and cannot be combined with --json: the two together are a usage error, exit code 2.

kojo sessions logs "$SESSION" --follow
kojo sessions logs "$SESSION" --json

kojo sessions cancel

Asks the server to cancel a session. The worker that runs it notices the request at its next heartbeat and stops.

kojo sessions cancel <session> [flags]

cancel has no flags of its own. It prints cancel requested.

kojo sessions cancel "$SESSION"

kojo sessions message

Sends a message to a queued or running session: a correction or a detail. Its next model step reads it as guidance from a maintainer, which cannot change a skill’s goals, constraints, tools or limits. A message does not stop a session; kojo sessions cancel does. The words after the session ID are the message, joined by spaces. The token needs the operator role.

kojo sessions message <session> <text>... [flags]

message has no flags of its own. It prints the message’s number and the session. A message of more than 4000 characters, a session that already has 20 messages, or a session that takes none (waiting for an approval, over, read-only, a dry run) is refused with the reason and exit code 1.

kojo sessions message "$SESSION" keep the old endpoint working until the next release

Talking to a session at work has the rules. A message to a session that waits on its plan asks for a revised plan, and the message go approves the plan.

kojo sessions approve

Gives the go-ahead on the plan a session wrote before changing code: the work starts. kojo sessions show prints the plan. The token needs the operator role.

kojo sessions approve <session> [flags]

approve has no flags of its own. A session that waits on no plan, a plan already decided, or one whose deadline passed is refused with the reason and exit code 1.

kojo sessions approve "$SESSION"

kojo sessions decline

Declines the plan a session waits on: the session ends and nothing is changed. The token needs the operator role.

kojo sessions decline <session> [flags]

decline has no flags of its own, and is refused as approve is.

kojo sessions decline "$SESSION"

kojo sessions report

Prints a link to a shareable report of a session: a read-only, redacted page that anyone with the link can open without signing in. It shows the session’s tool calls and commands, the goal critic’s verdict, the risk assessment and the change with the step that wrote each block. settings/reports decides which sessions may have one, by default those on public repositories; a confidential session never has one, and the refusal says why. The token needs the operator role; --revoke needs the admin role.

kojo sessions report <session> [flags]
Flag Default Meaning
--html none Write the report page to this file instead of making a link; - writes it to standard output. The page follows the same rules as a link, holds no link and does not expire. The file is created readable by its owner only.
--ttl settings/reports.ttl How long the link works, for example 72h: at least 1h, and no longer than the setting allows.
--revoke false Revoke every link to the session’s report made so far, the ones in pull request descriptions included.

The link alone goes to standard output, and when it expires to standard error. --revoke cannot be combined with --html or --ttl, and --ttl cannot be combined with --html: usage errors, exit code 2.

kojo sessions report "$SESSION"
kojo sessions report "$SESSION" --ttl 72h
kojo sessions report "$SESSION" --html report.html
kojo sessions report "$SESSION" --revoke

kojo campaigns

Runs one task across many repositories, one session per repository, at a bounded pace and within a cost bound a person confirmed. Campaigns explains how repositories are chosen, the bound, the pilot and the pace. Listing and showing need the viewer role; the other subcommands need operator.

kojo campaigns create

Creates a campaign, prints the repositories it will run in, the ones it skipped with the reason, and the most it can cost, then asks before starting it. Nothing runs until the bound is confirmed.

kojo campaigns create [flags]
Flag Default Meaning
--task What every session is asked to do. Required unless --skill is given.
--title the task’s first line, or the skill A name for the campaign: one line, at most 200 characters.
--skill empty Run this skill directly in every repository. Without it, the orchestrator chooses.
--repo A repository as forge/owner/name. Repeatable.
--team empty Every repository the team owns (rbac.teams.<name>.repos).
--match empty Every enabled repository whose ID matches this pattern, such as github/acme/svc-*.
--max-parallel 5 At most this many open sessions, 1 to 50.
--pilot 3 Run this many repositories first, then pause until someone continues; 0 for no pilot.
--input A named value for the skills, as name=value. Repeatable.
--yes, -y false Start without asking.
--json false Print the campaign as JSON instead of the summary.

--repo, --team and --match add up; at least one is needed. Without --yes and without an answer it exits 2, and answering anything but y leaves the campaign pending, to be confirmed in the dashboard. It exits 2, with the campaign pending, when the cost cannot be bounded (no per-session budget, a tier without a price).

kojo campaigns create --title "Logger v3" --task "Move from logger v2 to v3; keep the log format." --match 'github/acme/svc-*'
kojo campaigns create --task "Turn on the race detector in CI." --team platform --pilot 0 --max-parallel 10 --yes

kojo campaigns list

Lists campaigns, newest first, as a table with the columns ID, STATUS, REPOS, OVER, SPENT, BOUND, AGE and TITLE.

kojo campaigns list [flags]
Flag Default Meaning
--status empty pending, running, paused, done or cancelled.
--limit 30 At most this many.
--json false Print JSON.

kojo campaigns show

Shows a campaign’s totals, then one line per repository: the status of its newest session, the session, its cost, the pull request and that pull request’s state.

kojo campaigns show <campaign> [flags]
Flag Default Meaning
--json false Print JSON.
kojo campaigns show "$CAMPAIGN"

kojo campaigns continue

Starts a paused campaign again: after its pilot, or after it reached its bound, with a higher one. A campaign paused because settings/models no longer bounds what a session costs continues once it does again.

kojo campaigns continue <campaign> [flags]
Flag Default Meaning
--max-cost-usd the current bound Raise the bound to this many dollars. A campaign paused at its bound needs it.
kojo campaigns continue "$CAMPAIGN"
kojo campaigns continue "$CAMPAIGN" --max-cost-usd 120

kojo campaigns cancel

Cancels a campaign: no session starts after this, and the open ones are asked to stop. Pull requests already opened stay open. On a cancelled campaign it asks the open sessions again, for when the first cancel could not reach them all.

kojo campaigns cancel <campaign>

kojo campaigns retry

Runs again the repositories whose session failed or could not be started, each as a new session, within the bound.

kojo campaigns retry <campaign>

kojo limits

Prints every limit and what counts against it now: the install’s spend in the last 24 hours and this month with its running, queued and held sessions, then a table each for teams, repositories, skills, people and triggers. A spend cell reads $1.50 of $4.00 and a running cell 1 of 2 when there is a limit. People are listed to the operator role and up; for a viewer the people table is replaced by people: hidden (needs the operator role).

kojo limits [flags]
Flag Default Meaning
--json false Print the server’s JSON (GET /api/v1/limits).

kojo limits set

Sets the limits of one entry. Only the flags given change; the entry’s other limits stay. Teams, repositories, skills, people and triggers are settings/limits (role admin); install is the daily and monthly budget of settings/models (role operator). A person is an email or <surface>:<id> (the command lower-cases it), or default for everyone without an entry of their own; a person’s entry replaces the default as a whole, so a person set with no flag is exempt from it.

kojo limits set <team|repo|skill|person|trigger|install> [name] [flags]
Flag Default Meaning
--per-day unchanged USD over the last 24 hours (0 for no limit). Not for a trigger.
--per-month unchanged USD since the first of the calendar month, UTC (0 for no limit). Not for a trigger.
--max-running unchanged Sessions running at once (0 for no cap). Not for a skill or install.

The command reads the object, changes the entry and writes it back with the revision it read. When another revision was activated in between, nothing is written and it fails with <object> changed since it was read: run the command again.

kojo limits set team platform --per-day 50 --max-running 3
kojo limits set repo github/acme/api --per-month 300
kojo limits set skill fix-bug --per-day 20 --per-month 300
kojo limits set person default --per-day 10 --max-running 2
kojo limits set trigger eval --max-running 2
kojo limits set install --per-month 3000

kojo limits unset

Removes the limits the flags name, or the whole entry when no flag is given. A team, repository or skill entry left with no limit is removed; a trigger is removed whole. A person’s entry left with no limit stays, because it exempts that person from people.default, and the command says so. unset install removes the daily and monthly budgets, never per_session_usd.

kojo limits unset <team|repo|skill|person|trigger|install> [name] [flags]
Flag Default Meaning
--per-day false Remove the daily limit.
--per-month false Remove the monthly limit.
--max-running false Remove the cap on running sessions.
kojo limits unset skill fix-bug --per-day
kojo limits unset person alice@example.com
kojo limits unset install --per-month

kojo eval

Runs a skill against its eval fixtures, or on issues a repository already fixed (--history), and reports the pass rate, the attempts, the cost and how close each diff is to the reference fix. Evals explains fixtures, evals from history and the activation gate.

kojo eval [skill] [flags]
Flag Default Meaning
--all false Evaluate every skill that has fixtures. With --factory, every skill that has cases in that directory’s evals/.
--local false Run in this process from kojo.yaml, with an in-memory store.
--factory With --local: also read skills from this .factory directory’s skills/<name>/, before the built-in ones, and eval cases from its evals/<skill>/<case>/, instead of the built-in fixtures of those skills.
--json false Print one JSON document when the command ends: the runs, the pass-rate bar, whether everything passed, and the error if any. Not with --history.
--min-pass-rate the activation policy’s minimum Fail below this pass rate, 0 to 1. Without the flag, a server-side eval uses min_eval_pass_rate of the server’s activation policy, and --local uses seed.activation.min_eval_pass_rate of kojo.yaml. With --history there is no default bar.
--history Evaluate on issues this repository (forge/owner/name) fixed: merged pull requests replayed at the commit before the fix.
--test-cmd With --history, required: the shell command that runs the repository’s tests. The fix’s test files are in KOJO_HIDDEN_TESTS, one per line.
--limit With --history, required: the most cases to take, 1 to 50.
--since 90 days ago With --history: only pull requests merged since this date (2026-06-01) or this many days (30d).
--validate-only false With --history: mine and check the cases, report the cost bound, run no model.
--yes, -y false With --history: run the valid cases without asking.

Name one skill or pass --all, not both. By default the eval runs on the server named by --server. With --local it runs in the CLI’s own process, with the sandbox driver and the models of kojo.yaml, no database and no forge; a case that needs issues or pull requests seeds its own in-memory one. --factory .factory evaluates a repository’s own skills on its own cases: A repository’s own skills has the rules, and Skills CI a GitHub Action that runs it on pull requests.

eval exits 1 when a skill’s pass rate is below --min-pass-rate or its run did not finish.

With --history the eval runs on the server only and names one skill. It mines and checks the cases in sandboxes without calling a model, prints the valid and invalid cases, the pull requests it left out and the most the model runs can cost, and asks before running them; --yes skips the question, and without an answer it exits 2. Starting and confirming need the operator role. It exits 1 when no case is valid or the run does not finish, and 2 when the cost cannot be bounded (no per-session budget, a tier without a price). Evals from your own history has the details.

kojo eval fix-bug
kojo eval --all --min-pass-rate 0.8
kojo eval fix-bug --local -f kojo.yaml
kojo eval fix-bug --history github/acme/api --test-cmd 'go test ./...' --limit 10 --validate-only
kojo eval fix-bug --history github/acme/api --test-cmd 'go test ./...' --limit 10 --since 30d --yes

kojo config

Exports, applies and validates configuration.

kojo config export

Writes everything that is changed live in the dashboard (skills, repositories, schedules, models, policies, access) as one YAML document. It holds no secrets. The format is described by config-export.schema.json.

kojo config export [flags]

With --factory and --scope it writes one scope as the .factory/ files kōjō reads from git instead: skills/<name>/ for each dashboard-managed skill, and for a repository factory.yaml (its merge policy, without trigger_permission) and schedules.yaml. A file that exists with other content stops it before anything is written, unless --force. It then lists what stays in the dashboard and the next steps. See Moving a scope to git.

With --scope repo:<forge/owner/name> --pr nothing is written here: kōjō opens one pull request on the repository that creates .factory/factory.yaml and .factory/schedules.yaml from its merge policy and schedules, and leaves files that exist alone (a factory.yaml without a merge_policy key gains one). It prints the pull request and each file as created or left alone. --factory may be given too and is not written to. See Moving from the dashboard.

Flag Default Meaning
-o, --output empty Write to this file instead of standard output.
--factory empty Write one scope as .factory/ files into this directory. Not with --output.
--scope empty With --factory, required: org or repo:<forge/owner/name>. With --pr, required: repo:<forge/owner/name>.
--force false With --factory: replace files whose content differs from the export.
--pr false Open a pull request that creates the repository’s .factory/ files instead of writing them. Not with --output or --force.
kojo config export -o kojo-state.yaml
kojo config export --factory .factory --scope repo:github/acme/api
kojo config export --scope repo:github/acme/api --pr

kojo config apply

Applies a document written by kojo config export. Everything is validated before anything is written. Each object that differs from the active one becomes a new active revision; unchanged objects are left alone, so applying the same file twice changes nothing. Objects the document does not list are not touched.

The server applies the same guards as the dashboard. A document that newly enables a repository is refused unless that repository’s default branch is protected; dev: true on the server skips this check.

kojo config apply [flags]
Flag Default Meaning
-i, --input empty The export to apply (- for standard input). Required.
--dry-run false Show what would change without writing.

apply prints one line per object (changed or unchanged, the scope, the object and its revision) and a count. A repository’s merge policy or schedules that the repository keeps in .factory/, and that differs from its active revision, becomes a pull request instead of a revision, printed as opened, updated or unchanged with the object, the pull request’s number and its link (Editing a setting that lives in git).

kojo config apply -i kojo-state.yaml --dry-run
kojo config apply -i kojo-state.yaml

kojo config validate

Loads the kojo.yaml named by -f: it expands the ${NAME} references, rejects unknown keys and validates the values, without starting anything. It prints the driver, the forges and the number of model tiers, and warns when dev: true is set. A file that does not validate exits with code 2 and lists every problem.

kojo config validate [flags]

validate has no flags of its own.

kojo config validate -f deploy/compose/kojo.yaml
deploy/compose/kojo.yaml is valid: driver sbx, forges [], 2 model tier(s)

kojo skills

Lists the skills in use, validates skill files, and asks kōjō for changes to its own skills.

kojo skills list

Lists the skills a repository resolves to, or the org’s skills without --repo, with the layer each comes from, its model tier and whether it writes. Problems found while resolving are printed to standard error.

kojo skills list [flags]
Flag Default Meaning
--repo empty Repository as forge/owner/name. Default: the org’s skills.
kojo skills list --repo github/acme/api

kojo skills validate

Validates skills on disk without a server. Each argument is a skill directory (holding SKILL.md) or a directory of skill directories such as .factory/skills. It parses SKILL.md, goals.yaml and kit.yaml as the server does, prints ok or FAIL per skill, and exits 1 when one does not validate.

kojo skills validate <dir>... [flags]

validate has no flags of its own.

kojo skills validate .factory/skills

Run against the built-in skills of the repository (kojo skills validate skills), it prints:

ok    build-feature (11 tool(s), 3 check(s))
ok    daily-digest (4 tool(s), 0 check(s))
ok    dependency-review (9 tool(s), 1 check(s))
ok    fix-bug (10 tool(s), 2 check(s))

The output continues with one line per skill. Skills describes the files.

kojo skills propose

Asks kōjō to propose a change to one of its skills now, instead of waiting for the periodic check. The skill is the org’s, or with --repo the one that repository resolves. Self-improvement must be on for the skill in that scope’s settings/improvement, and the evidence must reach its min_evidence; otherwise the server refuses and the command exits 1. It prints the proposal’s ID and status and returns: kōjō writes the proposal, measures it with evals, and leaves it for a person to approve or reject in the dashboard. See Self-improvement.

kojo skills propose <skill> [flags]
Flag Default Meaning
--repo empty Propose for this repository’s skill, as forge/owner/name. Default: the org’s.
kojo skills propose fix-bug
prp_01m8w0v2dvn5b0fcrm2zfxg0h2  proposing  org/fix-bug

kojo skills proposals

Lists the changes kōjō proposed to its skills, newest first: status, scope, skill, the eval pass rate of the proposal next to the version in use, how many goals it loosens, and its summary.

kojo skills proposals [flags]
Flag Default Meaning
--repo empty Only the proposals for this repository’s skills, as forge/owner/name
--skill empty Only this skill’s proposals
--open false Only those being written, measured or waiting for a person
--limit 30 At most this many
--json false Print JSON
kojo skills proposals --open

kojo mcp

Runs a Model Context Protocol server on standard input and output, for editors and coding agents. It is a client of the server named by --server and can do what the token’s role allows. Its tools cover sessions, skills and drafts, skill proposals, the runtime config and its history, schedules, evals, memory and the audit log; Manage with MCP lists them.

kojo mcp [flags]

mcp has no flags of its own. An editor’s MCP configuration starts it like this:

{
  "mcpServers": {
    "kojo": {
      "command": "kojo",
      "args": ["mcp"],
      "env": {"KOJO_SERVER": "https://kojo.example.com", "KOJO_TOKEN": "..."}
    }
  }
}

The server also serves MCP over HTTP at /mcp, with the same token as a Bearer token. See Manage with MCP.

kojo doctor

Checks that the deployment is safe and complete: the database and its migrations, the sandbox driver and its isolation level, that egress is blocked, each replica of a remote kojo-proxy, the forges, branch protection and readable user permissions on each enabled repository, the skill activation gate, budgets, each model provider in use and each model tier, chat tokens and sign-in.

kojo doctor [flags]
Flag Default Meaning
--json false Print the report as JSON.
--remote false Ask the running server (--server) instead of checking from the local config.
--skip-probe false Skip the check that creates a test sandbox.

Without --remote, doctor builds kōjō from kojo.yaml in its own process: it connects to the database, creates the driver and, for the egress probe, starts the embedded proxy. It does not apply migrations; it reports pending ones. It writes nothing to the database: on a database that holds no runtime configuration yet, the initial values are left for kojo serve to write on its first start. When a server already runs on the same host, the embedded proxy’s port is taken: use --remote.

Each check prints one line with ok, warn, FAIL or skip, its name and a detail, followed by a count. doctor exits 1 when a check failed. Warnings do not change the exit code. Install lists the checks.

kojo doctor -f kojo.yaml
kojo doctor --remote --json

kojo setup

Creates the GitHub App, prints the manifest of the Slack app, writes the Microsoft Teams app package, prints the Discord invite link, prints what to configure for Linear, Jira, Sentry and Datadog, or creates the Asana webhooks. Install walks through both.

kojo setup github

Registers kōjō as a GitHub App through GitHub’s manifest flow. The command serves a page on a loopback port and prints its address. You open it, confirm the app on GitHub, and GitHub sends the app’s ID, private key and webhook secret back to the command, which writes them to files with mode 0600. No secret is printed. The command waits up to 10 minutes.

kojo setup github [flags]
Flag Default Meaning
--public-url empty kōjō’s public URL (server.public_url), where GitHub sends webhooks. Required.
--org empty Create the app in this organization instead of your user account.
--base-url empty API root of a GitHub Enterprise Server (https://ghe.example.com/api/v3).
--name empty Name of the app. Empty means kojo.
--public false Let other accounts install the app. Default: only its owner.
--out secrets Directory the private key and the env file are written to.

It writes github-app.pem (the private key) and github-app.env (GITHUB_APP_ID and GITHUB_WEBHOOK_SECRET) into the --out directory, which it creates with mode 0700. The paths it prints, and the private_key_file in the kojo.yaml block it prints, are absolute, so they do not depend on where kōjō starts. The command does not open a browser.

kojo setup github --public-url https://kojo.example.com
kojo setup github --public-url https://kojo.example.com --org acme
kojo setup github --public-url https://kojo.example.com --base-url https://ghe.example.com/api/v3

kojo setup slack

Prints the manifest of kōjō’s Slack app: the bot scopes, the events and the interactivity settings. The steps that follow (create the app from the manifest, install it, add chat.slack to kojo.yaml) are printed to standard error, so the manifest can be piped.

kojo setup slack [flags]
Flag Default Meaning
--mode socket socket or http.
--public-url empty kōjō’s public URL. Required in http mode.
-o, --output empty Write the manifest to this file instead of standard output.
kojo setup slack -o slack-manifest.yaml
kojo setup slack --mode http --public-url https://kojo.example.com

kojo setup discord

Prints the URL that adds kōjō’s bot to a Discord server: the bot scope with the permissions kōjō needs (View Channel, Send Messages, Send Messages in Threads, Read Message History). Someone who may manage the server opens it. The steps around it (create the bot, invite it, add chat.discord to kojo.yaml) are printed to standard error, so the URL can be piped. Discord walks through them.

kojo setup discord [flags]
Flag Default Meaning
--application-id empty The Discord application’s ID, from its General Information page. Required.
--guild-id empty Preselect this server on Discord’s page, and do not let it be changed there.
kojo setup discord --application-id 1200000000000000001
kojo setup discord --application-id 1200000000000000001 --guild-id 1100000000000000001

kojo setup teams

Writes the Microsoft Teams app package that kōjō’s bot is installed from: a zip with manifest.json, a 192×192 color icon and a 32×32 outline icon. The manifest names the bot by the Microsoft App ID of its Azure Bot registration, so register the bot first. The steps that remain in Azure and in Teams, and the chat.teams block for kojo.yaml, are printed to standard error. Microsoft Teams walks through the whole setup.

kojo setup teams [flags]
Flag Default Meaning
--app-id empty The Microsoft App ID of the Azure Bot registration, a GUID. Required.
--public-url empty kōjō’s public URL (server.public_url). Teams sends messages to /teams/messages under it. Must be https. Required.
--tenant-id empty The bot’s tenant ID. It only fills in the kojo.yaml block that is printed.
-o, --output kojo-teams.zip Write the package to this file. - writes it to standard output.
--name empty The bot’s name in Teams, at most 30 characters. Empty means kōjō.
--app-version empty The app’s version. Teams wants a higher one to update an installed app. Empty means 1.0.0.
--developer empty The organization shown as the app’s developer, at most 32 characters. Empty means kōjō.
--privacy-url empty Privacy statement linked from the app’s page, https. Empty means the public URL.
--terms-url empty Terms of use linked from the app’s page, https. Empty means the public URL.

A wrong flag value exits with code 2 and writes nothing. The same flags give the same package, byte for byte.

kojo setup teams --app-id 6f9619ff-8b86-4d11-b42d-00c04fc964ff --public-url https://kojo.example.com
kojo setup teams --app-id 6f9619ff-8b86-4d11-b42d-00c04fc964ff --public-url https://kojo.example.com \
  --name "kōjō staging" --app-version 1.1.0 -o kojo-staging.zip

kojo setup linear

Prints the steps that connect kōjō to a Linear workspace: the Linear user kōjō acts as and its API key, the webhook’s address and events, the trackers.linear block for kojo.yaml, and how a team or project maps to a repository. Nothing is sent anywhere. Linear walks through them.

kojo setup linear [flags]
Flag Default Meaning
--public-url empty kōjō’s public URL (server.public_url). Linear sends webhooks to /webhooks/linear under it. Must be https. Required.
kojo setup linear --public-url https://kojo.example.com

kojo setup jira

Prints the steps that connect kōjō to a Jira Cloud site: the Atlassian account kōjō acts as and its API token, the webhook’s address, secret and events, the trackers.jira block for kojo.yaml, how a project maps to a repository, and how people get a role. Nothing is sent anywhere. Jira walks through them.

kojo setup jira [flags]
Flag Default Meaning
--public-url empty kōjō’s public URL (server.public_url). Jira sends webhooks to /webhooks/jira under it. Must be https. Required.
--site empty The Jira Cloud site, such as https://acme.atlassian.net. It fills in the link to the site’s webhooks page and base_url.
kojo setup jira --public-url https://kojo.example.com --site https://acme.atlassian.net

kojo setup asana

Without --project, prints the steps that connect kōjō to an Asana workspace. With --project, creates a webhook on each project that delivers to /webhooks/asana under the public URL, with the token in ASANA_TOKEN: the token kōjō acts with, since a webhook belongs to the token that created it. Asana sends a handshake to that address while it creates a webhook, so kōjō must already be serving there with trackers.asana configured. Asana returns each webhook’s secret once, in its answer; the command writes the secrets to asana-webhooks.env in the --out directory, with mode 0600, and prints the webhook_secrets line that reads them. No secret is printed. Asana walks through the setup.

kojo setup asana [flags]
Flag Default Meaning
--public-url empty kōjō’s public URL (server.public_url). Must be https. Required.
--project none An Asana project’s ID, the number in its address. Repeat it for several projects.
--out secrets Directory the secrets file is written to.

A project ID that is not a number, or a missing ASANA_TOKEN, exits with code 2. When Asana refuses a webhook the command stops there, writes the secrets of the webhooks it created before, and exits with code 1.

kojo setup asana --public-url https://kojo.example.com
ASANA_TOKEN=... kojo setup asana --public-url https://kojo.example.com --project 1209876543210

kojo setup sentry

Prints the steps that connect kōjō to a Sentry organization: the internal integration (its webhook address, the alert rule action, its permissions, its Client Secret and token), the alerts.sentry block for kojo.yaml, how a project maps to a repository, and the alert rule that sends errors to kōjō. Nothing is sent anywhere: an organization owner or manager creates the integration in Sentry’s settings. Sentry walks through them.

kojo setup sentry [flags]
Flag Default Meaning
--public-url empty kōjō’s public URL (server.public_url). Sentry sends webhooks to /webhooks/sentry under it. Must be https. Required.
kojo setup sentry --public-url https://kojo.example.com

kojo setup datadog

Prints the steps that connect kōjō to Datadog Error Tracking: the application key and its error_tracking_read permission, the webhook secret, the webhook (its address, the hidden custom variable that holds the secret, the header that sends it, and the payload), the alerts.datadog block for kojo.yaml with every site, how a service maps to a repository, and the monitor that sends errors to kōjō. Nothing is sent anywhere: someone who may edit Datadog’s integrations and monitors makes the webhook and the monitor. Datadog walks through them.

kojo setup datadog [flags]
Flag Default Meaning
--public-url empty kōjō’s public URL (server.public_url). Datadog sends webhooks to /webhooks/datadog under it. Must be https. Required.
kojo setup datadog --public-url https://kojo.example.com

kojo schema

Prints the JSON Schema of one of kōjō’s files, for editors and CI. Without a name it lists the schemas: config-export, factory, goals, kit, kojo, schedules and skill. The schemas are generated from the structs that load the files, so they match what the binary accepts. An unknown name exits with code 2.

kojo schema [name] [flags]

schema has no flags of its own.

kojo schema
kojo schema kojo > kojo.schema.json

The same schemas are published with this site, for example kojo.schema.json.

kojo version

Prints the version, the commit and the build date, as kojo <version> (<commit>, <date>). A build from source without release flags reports the version dev.

kojo version [flags]

version has no flags of its own. kojo --version prints the same information.

kojo version

kojo completion

Generates a shell completion script. The subcommands are bash, zsh, fish and powershell; each has a --no-descriptions flag that leaves the descriptions out of the completions. The release archives and the Linux packages ship the generated scripts.

kojo completion [command]
source <(kojo completion bash)
kojo completion zsh > "${fpath[1]}/_kojo"
Scroll to move. + - zoom, 0 fit, Esc close.100%