@instantkom/cli
v3.150.0
Published
instantKOM CLI (ikm)
Readme
@instantkom/cli (ikm)
The instantKOM command-line interface. Built on oclif v4. Ships the ikm binary used to drive the instantKOM REST API from terminals, scripts, and CI pipelines.
This workspace is part of the instantKOM monorepo. The CLI covers authentication, configuration, channels, contacts, messages, broadcasts, chats, tickets, exports, templates, bots, flows, webhooks, shell completion, update handling, packaging, and Docker distribution.
Documentation
- Generated command help:
docs/commands/ - Frontend help sync:
npm run --workspace services/cli docs:frontend - Automation cookbook:
cookbook/ - Launch drafts:
launch/
Build
npm run --workspace services/cli buildRun
./services/cli/bin/run.js --help
./services/cli/bin/run.js --version
./services/cli/bin/run.js whoamiQuality Gates
npm run --workspace services/cli type-check
npm run --workspace services/cli check:all
npm run --workspace services/cli check:command-coverage
npm run --workspace services/cli test:unitLive Smoke Test
The live smoke test runs the built ikm binary against a real instantKOM API and validates the token lifecycle plus core read/write commands.
cd services/cli
IKM_API_URL=http://localhost:3002 \
IKM_API_KEY=<admin-or-full-api-key> \
IKM_CLI_TEST_CHANNEL_ID=505 \
IKM_CLI_TEST_CONTACT_CHANNEL_ID=766 \
npm run test:liveIKM_CLI_TEST_CHANNEL_ID is used for read checks. IKM_CLI_TEST_CONTACT_CHANNEL_ID is used for creating and deleting one temporary contact.
Live Security Test
The cross-account security test requires two isolated test accounts. It creates a contact with account B, verifies account A cannot read or delete it, and then removes it with account B.
cd services/cli
IKM_API_URL=http://localhost:3002 \
IKM_CLI_SECURITY_ACCOUNT_A_KEY=<account-a-api-key> \
IKM_CLI_SECURITY_ACCOUNT_B_KEY=<account-b-api-key> \
IKM_CLI_SECURITY_ACCOUNT_B_CHANNEL_ID=<account-b-channel-id> \
npm run test:security:live