@getinsomnia/insomnia-cli
v0.3.1
Published
Agent-friendly CLI for managing Insomnia data
Readme
insomnia-cli
Agent-friendly CLI for managing Insomnia API collections.
Install
npm install -g @getinsomnia/insomnia-cliUsage
insomnia-cli <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.
Collections
insomnia-cli collection list
insomnia-cli collection show <id|name>
insomnia-cli collection create --name <name> [--description <desc>] [--file-path <path>]
insomnia-cli collection update <id|name> --name <name>
insomnia-cli collection remove <id|name>Requests
insomnia-cli request list [--collection <id|name>]
insomnia-cli request show <id|name> [--collection <id|name>]
insomnia-cli request create --name <name> [--collection <id|name>] [--parent <id>] [options]
insomnia-cli request update <id|name> [--collection <id|name>] [options]
insomnia-cli request remove <id|name> [--collection <id|name>]--collection scopes the operation to a single collection file. Required for create when --parent is a folder ID rather than a collection ID.
Import
insomnia-cli import oas collection <file> [--target <id|name>]
insomnia-cli import oas document <file> [--target <id|name>]import oas collectiongenerates collection requests from the OAS.import oas documentstores the OAS underspec.contentsand generates matching requests inside the document.- With
--target, the CLI updates the matching resource by ID or exact name, or creates a resource with that name when no match exists.
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" }Further reading
- docs/ARCHITECTURE.md — layered design and data flow
- docs/SKILLS-REFERENCE.md — guidelines for writing reference docs
