koh-cli
v0.4.1
Published
Agent-friendly CLI for managing Insomnia data
Readme
Koh
Koh is an agent-friendly interface to Kong Insomnia, allowing tools like Claude Code or Codex to interact directly and deterministically with collections, requests, OpenAPI specs and other things stored in Insomnia.
Get Started
Install
npm install -g koh-cliUsage
koh <command> [options] --project <path>--project points to a directory containing Insomnia v5 YAML files (files whose first line contains insomnia.rest). Defaults to the current directory. Git projects only for now (see Roadmap and Limitations).
For more, see Detailed Usage below.
Learn More
Development State
This CLI is currently in Tech Preview (i.e. Alpha). This means that we are in the early stages of development: it is safe to use, but not recommended for production or mission-critical situations or deployments. The CLI or any part of it is subject to change or removal at any time, at Insomnia's sole discretion.
Though the long term vision is to replace and enhance the existing Inso CLI over the next 6-12 months or more, Koh does not currently offer feature parity with Inso. Similarly, Koh does not yet offer access to all Insomnia functionality. We are in active development through Q3 2026, but no specific timeline is yet available for parity with Inso or Insomnia.
Roadmap and Limitations
A list of things Koh does not yet support, in roughly the order we hope to address them.
- Only supported in Git Sync projects. Local and Cloud support is planned soon.
- Does not offer access to secrets, authentication, native vault integrations or other secure content.
- Only works on "files" inside Insomnia (collections, specs, etc). Cannot be used for:
- Administration tasks like inviting users
- Configuration tasks like creating projects
- See the Risks portion of this document.
Risks
By using Koh you accept sole responsibility for these risks:
- Like many developer tools, Koh currently runs with the same permissions and identity as the person using it. You should be aware of what it may have access to or allow an agent/LLM to do.
- LLMs are non-deterministic and may hallucinate or create unpredictable results. Review results carefully before relying on them. Koh is a "dumb pipe" — it does no thinking and contains no AI itself.
Detailed Usage
Collections
koh collection list
koh collection show <id|name>
koh collection create --name <name> [--description <desc>] [--file-path <path>]
koh collection update <id|name> --name <name>
koh collection remove <id|name>Requests
koh request list [--workspace <id|name>]
koh request show <id|name> [--workspace <id|name>]
koh request create --name <name> [--workspace <id|name>] [--parent <id>] [--setting-send-cookies <bool>] [--setting-store-cookies <bool>] [options]
koh request update <id|name> [--workspace <id|name>] [--setting-send-cookies <bool>] [--setting-store-cookies <bool>] [options]
koh request remove <id|name> [--workspace <id|name>]
koh request run <id|name> [--workspace <id|name>] [--project-environment <id|name>] [--workspace-environment <id|name>] [--body-output auto|file] [--max-body-bytes <bytes>]--workspace scopes the operation to a single collection or document. Required for create when --parent is a folder ID rather than a workspace ID.
request run executes the stored request via Node.js's built-in HTTP stack (undici).
request run renders LiquidJS {{ variable }} templates in outgoing URL, header values, params, body, file paths, and auth string fields. --project-environment and --workspace-environment select the environment sources; workspace values override project values, and selected sub-environments override their base environment.
--setting-send-cookies/--setting-store-cookies set the request's settings.cookies.{send,store} and take effect on request run: send attaches the owning workspace's matching cookie-jar cookies as a Cookie header, and store writes the response's Set-Cookie cookies back into that jar.
Environments
koh environment list [--scope project|workspace] [--parent <id|name>] [--query <text>] [--workspace <id|name>]
koh environment show <id|name> [--scope project|workspace] [--parent <id|name>] [--workspace <id|name>]
koh environment create --scope project|workspace --name <name> [--description <desc>] [--color <color>] [--parent <id|name>] [--workspace <id|name>]
koh environment update <id|name> --scope project|workspace [--parent <id|name>] [--name <name>] [--description <desc>] [--color <color>] [--workspace <id|name>]
koh environment remove <id|name> --scope project|workspace [--parent <id|name>] [--workspace <id|name>]
koh environment kv create <id|name> <key> <value> --scope project|workspace [--parent <id|name>] [--workspace <id|name>]
koh environment kv remove <id|name> <key> --scope project|workspace [--parent <id|name>] [--workspace <id|name>]--scope <project|folder|workspace>selects the scope to operate at (defaultworkspace).list,show,create,update,remove, andkvcommands support bothprojectandworkspace(folderthrowsNot implemented).--workspace <id|name>scopes a--scope workspaceoperation to a specific workspace. Required forcreate(with no--parent), since a new top-level environment must be attached to a workspace; optional elsewhere as a disambiguation filter.--descriptiononly applies with--scope project—WorkspaceEnvironmenthas nodescriptionfield.--parent <id|name>scopes an operation to a sub-environment of the given parent environment. Without it, the command operates on top-level environments; with it,listreturns the parent's sub-environments andshow/create/update/removetarget a sub-environment.kv create/kv updateupsert a top-level key on an environment (or sub-environment with--parent), parsing the value as JSON (e.g.--value '"a string"',--value '{"nested":true}').kv removedeletes a key from an environment (or sub-environment with--parent).<key>accepts either a plain top-level key or a JSON-path (e.g.nested.field) to remove a nested value.
Cookies
<scope> below is --workspace <id|name>.
koh cookie list <scope> [--url <url>] [--query <text>]
koh cookie show <id|key> <scope> [--domain <domain>]
koh cookie create <scope> --key <key> --value <value> --domain <domain> [options]
koh cookie update <id|key> <scope> [--match-domain <domain>] [fields]
koh cookie remove <id|key> <scope> [--domain <domain>]
koh cookie clear <scope>Cookies are matched by id or key (--domain/--match-domain disambiguates). The jar is used at run time by requests with --setting-send-cookies/--setting-store-cookies. cookie list --url shows which cookies a request to that URL would send. See Cookies.
Import
koh import oas collection <file> [--target <id|name>]
koh import oas document <file> [--target <id|name>]
koh import curl --from-file <path> --workspace <id|name>
koh import curl - --workspace <id|name> # read from stdin
koh import curl '<curl>' --workspace <id|name> [--name <name>]import oas collectiongenerates collection requests from the OAS.import oas documentstores the OAS underspec.contentsand generates matching requests inside the document.import oasaccepts OpenAPI 3.x and Swagger 2.0 (Swagger 2.0 is OpenAPI 2.0). Swagger 2.0 fields such ashost/basePath/schemes,consumes, andheader/queryparametersare handled by the same importer (pathparameters stay in the URL).- With
--target, the CLI updates the matching resource by ID or exact name, or creates a resource with that name when no match exists. import curlparses a cURL command string and creates a single request in an existing workspace.
Validate
koh validate <file_or_directory...> [--agent]Validates Insomnia YAML files against the public v5.1 JSON schema. Directories expand to their immediate .yaml/.yml files (non-recursive).
- The schema is fetched from GitHub at runtime, so network access is required.
- Exits
1when any file is invalid;0otherwise. - With
--agent, returns{ "data": { "files": [...], "invalid": <count> } }; theinvalidfield is omitted when all files are valid.
Skills
koh skills install [directory] [--force]Installs the bundled agent skill files (used by Claude Code, Codex, etc. to drive koh) into <directory>/skills, or .agents/skills in the current directory when [directory] is omitted. --force removes existing bundled skill directories first; otherwise files that already exist at the destination are left untouched.
Global options
| Flag | Description |
| ------------------ | ------------------------------------------ |
| --project <path> | Project directory (default: cwd) |
| --agent | Output structured JSON (for LLM/agent use) |
| --verbose | Show debug logs |
| -v, --version | Show version |
Agent output
Pass --agent to get structured JSON responses:
{ "data": { ... } }{ "error": "Collection not found: My API" }Feedback
Your feedback is critical to how we develop this CLI. Please create issues or discussions in the Insomnia GitHub repo to share your feedback.
Versions
Version 0.4 — August 19, 2026
- Add
koh environmentcommands for CRUDing project/workspace environments and their sub-environments, plusenvironment kvfor reading and writing environment key/values. - Add
koh cookiecommands for managing cookies in a collection or document cookie jar (list/show/create/update/remove/clear), and--setting-send-cookies/--setting-store-cookiesonrequest create/updatesorequest runcan attach and persist cookies automatically. - Add full OAuth2 support (authorization code, implicit, password, client credentials) and OAuth1/Digest auth to
request run, including akoh auth complete/auth token clearflow for interactive grants. - Add LiquidJS
{{ variable }}templating torequest runwith--project-environmentand--workspace-environmentvariable sources. - Add
koh validateto check Insomnia YAML files against the public v5.1 JSON schema. - Add
koh import curland cURL export, multipart/form-data and file-upload request bodies,:parampath substitution, and a default User-Agent header torequest run. - Add
--app-datasupport so commands can read directly from the Insomnia app's local NeDB storage, not just Git Sync YAML projects. - Rename
--collectionto--workspaceacrossrequest,auth,cookie,export, andimportcommands. - Add
koh skills installto install the bundled agent skill files into a project.
Version 0.3 — June 24, 2026
- First public release.
- Support for collections, requests and Open API Specs.
- Support for Import.
