CLI: Command Reference

The production CLI command groups are:

keito auth <command>
keito clients <command>
keito projects <command>
keito time <command>
keito skill <command>

Every command supports --help. Every command can output JSON with --json.

Global Flags

FlagDescription
--jsonForce JSON output
--workspace <id>Override the Company ID for one invocation
--quietSuppress non-essential output
--verboseEnable debug logging
--helpShow help
--versionShow version

When stdout is piped, JSON output is enabled automatically.

Auth Commands

CommandDescription
keito auth loginPrompt for API key and Company ID, validate them, and save config
keito auth logoutRemove saved config credentials
keito auth statusShow whether credentials are configured and valid
keito auth whoamiShow the current user and company from the API

keito auth login

keito auth login

Prompts for a kto_... API key and Company ID. The key is saved in the config file, not in a system keychain.

keito auth status

keito auth status --json

Configured credentials:

{
  "authenticated": true,
  "api_key_source": "config file",
  "account_id": "company_id_here",
  "workspace_id": "company_id_here",
  "api_key_valid": true
}

No credentials:

{"authenticated": false}

keito auth logout

keito auth logout --json
{
  "status": "logged_out",
  "config_credentials_removed": true
}

Projects and Tasks

CommandDescription
keito projects listList active projects
keito projects show <project>Show project details by name, code, or ID
keito projects tasksList workspace-global tasks

Clients

CommandDescription
keito clients listList active clients
keito clients create <name>Create a client if the authenticated user has permission

keito projects list

keito projects list
keito projects list --limit 20 --json
FlagDescription
--limit <number>Max results to return

keito projects show <project>

keito projects show "Acme Website"
keito projects show ACME --json
keito projects show project_id_here --json

The <project> argument accepts a project ID, name, or code. Resolution is case-insensitive.

keito projects tasks

keito projects tasks
keito projects tasks --limit 20 --json

Tasks are workspace-global, not project-specific.

Time Commands

CommandDescription
keito time startStart a running timer
keito time stopStop or discard the running timer
keito time logLog a completed time entry
keito time listList time entries
keito time runningShow the currently running timer
keito time session-recordCreate or update a completed agent session entry

keito time start

keito time start --project "Acme Website" --task "Development" \
  --notes "Working on auth" \
  --json
FlagDescriptionRequired
--project <value>Project name, code, or IDYes
--task <value>Task name or IDYes
--notes <text>Initial notesNo
`—billable <truefalse>`Override billable status

Only one timer may be active. If a timer is already running, the command exits with code 3.

keito time session-record

keito time session-record \
  --project "Acme Website" \
  --task "Development" \
  --session-id "codex-123" \
  --duration-seconds 5400 \
  --source agent \
  --metadata '{"integration":"keito_skill","agent_type":"codex"}' \
  --json
FlagDescriptionRequired
--project <value>Project name, code, or IDYes
--task <value>Task name or IDYes
--session-id <value>Stable session ID for idempotent updatesYes
--duration-seconds <number>Duration in whole secondsYes
--started-at <RFC3339>Session start timestampNo
--ended-at <RFC3339>Session end timestampNo
`—source <webcliapi
--metadata <json>Metadata object stored on the time entryNo
--agent-id <value>Stores metadata.agent_idNo
--agent-type <value>Stores metadata.agent_typeNo
--skill <value>Stores metadata.skillNo

If a matching session entry already exists for the same date and source, the CLI updates it instead of creating a duplicate.

keito time running

keito time running
keito time running --json

Returns {"running": false} when no timer is active, or an array of running timer objects when a timer exists.

keito time stop

keito time stop --notes "Finished auth work" --json
keito time stop --discard --json
FlagDescription
--notes <text>Replace notes on the entry
--discardDelete the running timer instead of saving it

keito time log

keito time log --project "Acme Website" --task "Development" \
  --duration 1:30 \
  --date 2026-05-06 \
  --notes "Implemented OAuth flow" \
  --json
FlagDescriptionRequired
--project <value>Project name, code, or IDYes
--task <value>Task name or IDYes
--duration <value>Decimal hours or HH:MMYes
--date <YYYY-MM-DD>Work date; defaults to todayNo
--notes <text>Description of workNo
`—billable <truefalse>`Override billable status

keito time list

keito time list --from 2026-05-01 --to 2026-05-31 --json
keito time list --project "Acme Website" --limit 10 --page 2 --json
FlagDescription
--from <YYYY-MM-DD>Start date
--to <YYYY-MM-DD>End date
--project <value>Filter by project name, code, or ID
--task <value>Filter by task name or ID
--limit <number>Entries per page; default 50
--page <number>Page number; default 1

Skill Commands

CommandDescription
keito skill installInstall the Keito Agent Skill and configure Codex and Claude Code hooks
keito skill statusShow CLI, auth, skill, and hook status
keito skill doctorShow readiness checks and next actions
keito skill install
keito skill install --agent codex
keito --json skill status
keito skill doctor

Environment Variables

VariableDescription
KEITO_API_KEYAPI key; highest-priority credential source
KEITO_ACCOUNT_IDCompany ID sent as Keito-Account-Id
KEITO_WORKSPACE_IDLegacy alias for KEITO_ACCOUNT_ID

Config File

OSPath
macOS~/Library/Application Support/keito/config.toml
Linux~/.config/keito/config.toml
Windows%APPDATA%\keito\config.toml
api_key = "kto_xxxxx"
account_id = "company_id_here"
workspace_id = "company_id_here" # legacy alias
api_url = "https://app.keito.ai"

Exit Codes

CodeMeaning
0Success
1Authentication error
2Invalid input
3Conflict, such as a timer already running
4Not found
5Rate limited
6Server error
7Network error
8Configuration error

keito auth status is a health-check command. When credentials are missing, JSON output is {"authenticated": false}.

JSON Error Shape

In JSON mode, errors are written to stderr:

{
  "error": true,
  "code": 4,
  "message": "Not found: Project 'demo' not found.",
  "suggestion": "keito projects list --json"
}

Agents should branch on the exit code and use suggestion as the recovery hint.