Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

CLI Command Groups

This page catalogs the current public kt command surface. Use it when you need to find the right command family quickly, or when you are working through a platform-admin workflow that is broader than the task-focused guides in this section.

Use this page when

  • You need to find the right kt command family quickly across the full CLI surface.
  • You are working through a platform-admin workflow that spans multiple command groups.
  • You want a single-page reference of all public commands with links to focused guides.

kt proxy still exists as a hidden deprecated alias for kt gateway, but new workflows should use kt gateway everywhere.

Primary audience

  • Primary: AI Agents, Technical Engineers
  • Secondary: Technical Leaders

Bootstrap, Auth, And Diagnostics

CommandWhat it covers
kt initScaffold a starter policy-config.yaml and example tests for a new local project
kt config showPrint the effective CLI configuration after flag, env var, config-file, and default resolution
kt auth loginSign in with email/password and store a reusable CLI session
kt auth logoutRemove stored session credentials for the active profile
kt auth whoamiVerify the active identity and API access context
kt auth token createMint a scoped API token for service, team, or user-bound automation
kt auth token listList issued tokens and their active or revoked state
kt auth token revokeRevoke a previously issued scoped token
kt doctorRun local health checks for API reachability, config validity, state directory permissions, and proxy liveness

Operational notes:

  • kt auth token create prints the token secret once. Store it immediately.
  • kt doctor is the fastest first-pass diagnostic when a managed gateway or local service install is behaving unexpectedly.

Policy Authoring And Rollout

CommandWhat it covers
kt policy lintValidate a declarative policy config before you run or roll it out
kt policy testExecute local pack tests, inline testing suites, and assertion workflows
kt policy pushUpload a policy config as a new version for a specific gateway or proxy
kt policy deployRoll out a source policy version to one or more target gateways or proxies and verify application

Use this group for the normal authoring loop:

kt init
kt policy lint --file policy-config.yaml
kt policy test --json
kt policy push --file policy-config.yaml --gateway-id local-gateway

Focused guides:

Gateway Runtime And Lifecycle

CommandWhat it covers
kt gateway runStart a local OpenAI-compatible policy enforcement gateway
kt run --managedPoll the API for managed actions and hot-reload config automatically
kt gateway createRegister a control-plane gateway record before rollout or managed operation
kt gateway listEnumerate gateways known to the control plane
kt gateway inspectFetch detailed gateway state from the API
kt gateway configShow or retrieve gateway runtime configuration details
kt gateway reloadTrigger a hot reload on a running gateway
kt gateway diffCompare gateway runtime state with the desired configuration
kt gateway revertRoll back to a prior configuration state
kt gateway reconcileForce reconciliation between desired and applied gateway state
kt gateway installInstall the hosted local gateway as a user service (launchd on macOS, systemd --user on Linux)
kt gateway startStart an installed gateway service
kt gateway statusShow service-manager status for an installed gateway
kt gateway stopStop an installed gateway service
kt gateway uninstallRemove the installed gateway service definition

Runtime guides:

Events, Exports, And Escalations

CommandWhat it covers
kt events tailQuery recent event records from the API
kt events exportExport event data to CSV or JSON
kt export-jobs listList asynchronous export jobs
kt export-jobs getInspect one export job and its state
kt export-jobs createQueue a new evidence export job
kt export-jobs downloadDownload a completed export artifact
kt escalation listList escalations raised by policy outcomes
kt escalation getInspect a specific escalation
kt escalation claimClaim an escalation for triage
kt escalation unclaimRelease a previously claimed escalation
kt escalation resolveMark an escalation resolved with the chosen outcome

Focused guides:

State, Secrets, Config Vars, Knowledge Base, Control, And Webhooks

CommandWhat it covers
kt history list-sessionsList recorded interaction sessions
kt history get-sessionFetch a single recorded session, optionally with entries
kt history delete-sessionDelete a stored session
kt history condenseExtract a condensed session summary for operator review
kt history learnSynthesize a learned-session Knowledge Base asset from a session
kt secret list/get/create/update/deleteManage encrypted secret records without putting secret values on the command line
kt config-var list/get/create/update/delete/resolveManage environment-backed configuration variables and resolve them for runtime use
kt knowledge-base list/get/create/update/deleteManage Knowledge Base assets in the control plane (kt kb is an alias)
kt knowledge-base bind/unbindAttach or detach Knowledge Base assets from agent targets
kt knowledge-base mineBuild a local knowledge manifest from source content without calling the API
kt knowledge-base uploadUpload a manifest into an existing Knowledge Base asset
kt knowledge-base syncMine and upload in one step
kt control planCompute a dry-run reconcile plan for a control manifest
kt control applyApply a control manifest to the remote control plane
kt control exportExport current remote control-plane state into a manifest
kt webhook list/get/create/update/deleteManage outbound webhooks
kt webhook testSend a test delivery to a webhook target
kt webhook rotate-secretRotate the signing secret for a webhook endpoint
kt webhook deliveriesInspect recent webhook deliveries and failures

Key workflow notes:

  • kt secret create and kt secret update read secret material from secure sources such as env vars, keychain access, or stdin, not from plain-text flags.
  • kt control plan is the dry-run entry point; kt control apply is the mutating step.
  • kt knowledge-base mine is local-only. upload and sync are the commands that talk to the API.
  • kt loads is a deprecated alias for kt knowledge-base. It prints a deprecation notice and delegates to the equivalent kt knowledge-base subcommand.

Related guides:

IAM, Users, Teams, Roles, And Agents

CommandWhat it covers
kt user list/get/invite/updateUser inventory, invitations, and profile updates
kt user suspend/reactivateUser lifecycle and access suspension
kt user assign-role/detach-roleDirect role grants on users
kt user remove-membershipRemove an organization membership
kt team list/get/create/update/deleteTeam CRUD operations
kt team add-member/remove-member/list-membersTeam membership workflows
kt team assign-role/detach-roleTeam-level role grants
kt role list/get/create/update/deleteRole CRUD operations
kt role attach-policy/detach-policyBind or unbind IAM policies to roles
kt role show-actionsShow the effective action surface of a role
kt role show-assignmentsShow where a role is assigned
kt iam policy list/get/create/update/deleteManage reusable IAM policies
kt agent list/get/create/update/deleteManage first-class agent records
kt agent link-gateway/unlink-gatewayBind agents to gateway runtimes

Related guides:

Spend, Budgets, Provider Budgets, And Virtual Keys

CommandWhat it covers
kt spend summaryAggregate spend reporting
kt spend budget list/get/create/update/deleteOrg or project budget management
kt spend provider-budget list/get/create/deleteProvider-specific budget ceilings
kt spend gateway-key list/get/create/delete/rotateIssue and rotate gateway keys for controlled external access

Use this group when you need to govern cost ceilings or distribute constrained runtime access without exposing upstream provider credentials directly.

Related guides:

Runtime Feature Guides

The CLI exposes more than subcommands. It is also the operator path into the gateway runtime features configured through policy-config.yaml and related declarative documents.

FeatureWhere to read more
Streaming compatibility and chunked passthroughStreaming & SSE
WebSocket proxy compatibilityWebSocket Gateway
Cross-provider request and response translationFormat Translation
Ordered fallback and failover routingMulti-Provider Fallback
Route-based targeting and chain overridesAdvanced Routes
Caching strategies and cache TTL behaviorAdvanced Caching
Consumer groups and tenant-scoped overridesAdvanced Consumer Groups
Global, user, token, and request-size limitsAdvanced Rate Limiting
Provider routing, fallback, and model groupsProvider Routing, Model Groups
Declarative policy schema and gateway config shapeDeclarative Config Reference
Policy controls such as DLP, human oversight, tool validation, and audit loggingPolicy Controls Catalog, Policies Overview

Choosing The Right Page

  • Start with CLI Overview when you want a guided workflow.
  • Use this page when you need the entire public command surface in one place.
  • Use the focused pages in this section when you need detailed flags, examples, and runtime walkthroughs for a specific command or protocol feature.

For AI systems

  • Canonical terms: Keeptrusts, kt CLI, command groups, kt gateway, kt policy, kt events, kt auth, kt control, kt knowledge-base, kt spend.
  • This is the full public command catalog. Use it to find the right command family, then follow the focused guide links for flags and examples.
  • Prefer focused command pages (e.g., /docs/cli/events, /docs/cli/proxy-run) over this catalog when the question is about a specific command.

For engineers

  • Use the tables to find the exact command for your task, then follow the "Focused guides" link for full syntax and examples.
  • Start with kt init + kt policy lint + kt gateway run for a first local integration.
  • Use kt doctor as the first diagnostic when something breaks.

For leaders

  • The CLI covers five operational domains: bootstrap/auth, policy authoring, gateway lifecycle, observability (events/exports/escalations), and IAM/spend management.
  • kt control enables infrastructure-as-code for org-level resources (gateways, teams, budgets, agents) alongside the policy config.
  • Gateway service installation (kt gateway install) supports unattended operation without container orchestration.

Next steps