docs / CLI reference

CLI Reference

Full reference for all kodingo-cli commands.

Installation

bashcopy
npm install -g kodingo-cli

Verify:

bashcopy
kodingo --version

Update to the latest version at any time:

bashcopy
kodingo update

Setup commands

`kodingo init`

Initialises Kortex in the current directory. Opens a browser window for one-time authentication, saves credentials to ~/.kodingo/config.json scoped to the current workspace, creates .kortex/context.md for agent context injection, and adds .kortex/ to .gitignore. Also triggers an initial scan-repo automatically.

bashcopy
kodingo init

`kodingo install-hook`

Installs two git hooks in the current repo:

  • pre-commit — runs kodingo check-rules synchronously before every commit. Blocks the commit if any Kortex Guardrail is violated.
  • post-commit — runs kodingo scan-git in the background after every commit to capture memory automatically.
bashcopy
kodingo install-hook

`kodingo doctor`

Checks your Kortex configuration and connectivity — missing token, unreachable API, missing git hook.

bashcopy
kodingo doctor

Capture commands

`kodingo scan-repo`

Bulk scans the entire codebase for functions without memory. Fetches all existing symbols in one API call, shuffles candidates so each run covers different functions, and captures up to 200 per run.

bashcopy
kodingo scan-repo

`kodingo scan-git`

Scans recent git commits and creates memory records for each change detected. Called automatically by the post-commit hook.

bashcopy
kodingo scan-git
kodingo scan-git --limit 20

`kodingo scan-claude`

Ingests a Claude Code session transcript and creates memory records from decisions and context captured during the session.

bashcopy
kodingo scan-claude

Agent SDK commands

These commands are designed for AI agents — they output structured context your agent can use before writing code. All commands support --prompt for prompt-ready output, or return JSON by default.

`kodingo context`

Returns all affirmed memories relevant to a specific file. Call this before an agent touches a file.

bashcopy
kodingo context --file auth/middleware.ts
kodingo context --file auth/middleware.ts --prompt
kodingo context --file auth/middleware.ts --limit 30

`kodingo session-brief`

Returns a compact summary of the most important decisions across the entire project, sorted by confidence. Call this once at the start of an agent coding session.

bashcopy
kodingo session-brief
kodingo session-brief --prompt
kodingo session-brief --limit 50

`kodingo guardrails`

Returns the project's hard rules — denied memories and high-confidence decisions. Call this at session start so your agent understands what patterns to avoid and which constraints to respect.

bashcopy
kodingo guardrails
kodingo guardrails --prompt

`kodingo check-rules`

Checks the staged git diff against all project Guardrails using Kortex inference. Blocks the commit with a plain English explanation if any rule is violated. Called automatically by the pre-commit hook — you rarely need to run this manually.

bashcopy
kodingo check-rules

Memory commands

`kodingo query-memory`

Search your project memory by keyword.

bashcopy
kodingo query-memory "why did we switch to Redis"

`kodingo query-symbol`

Fetch all memory records for a specific symbol.

bashcopy
kodingo query-symbol myFunction

`kodingo explain-symbol`

Generate a natural language explanation of a symbol using its Kortex memory context.

bashcopy
kodingo explain-symbol myFunction

Status commands

`kodingo affirm`

Affirm a proposed memory record by ID.

bashcopy
kodingo affirm <memory-id>

`kodingo deny`

Deny a proposed memory record by ID.

bashcopy
kodingo deny <memory-id>

`kodingo ignore`

Mark a proposed memory record as ignored.

bashcopy
kodingo ignore <memory-id>

Configuration

Credentials are stored per-workspace in ~/.kodingo/config.json:

jsoncopy
{
  "mode": "cloud",
  "apiUrl": "https://kodingo-api.onrender.com",
  "workspaces": {
    "/your/project/path": {
      "mode": "cloud",
      "apiUrl": "https://kodingo-api.onrender.com",
      "token": "your-project-token"
    }
  },
  "machineId": "auto-generated-device-id"
}

Each project gets its own workspace entry. Multiple projects on the same machine are fully isolated. The machineId is generated automatically on kodingo init and is used for knowledge attribution and departure risk analysis.

Current version

PackageVersion
kodingo-cli1.0.27