@invinite-org/invinite-cli
v0.7.0
Published
Command-line access to the Invinite Web API
Readme
Invinite CLI
Command-line access to the Invinite Web API. Manage your workspace — companies, lists, charts, alerts, documents, and more — from the terminal, authenticated with your own account.
Install
npm install -g @invinite-org/invinite-cliRequires Node.js 18+. This installs the inv command.
AI Plugin
This package includes a plugin for AI coding tools that teaches them the inv
CLI and Web API. Supports Claude Code, OpenCode, Codex, and
Copilot.
Choose an integration
- Standalone skill: installs the Web API workflow and
invcommand reference. It prefers the MCP connector when connected and falls back to the localinvCLI. - Standalone MCP connector: add
https://api.invinite.com/mcpin Claude's connector settings, leave OAuth client ID and secret empty, and complete browser OAuth. This supplies live Web API tools but not the packaged workflows. - Claude plugin: bundles the generated Web API skill, OAuth MCP connector, and commands for workspace briefings, portfolio reviews, alert audits, and research workspace setup.
Quick install
# Interactive — prompts for runtime and scope
npx @invinite-org/invinite-cli@latest plugin install
# Non-interactive examples
npx @invinite-org/invinite-cli@latest plugin install --claude --global
npx @invinite-org/invinite-cli@latest plugin install --claude --local
npx @invinite-org/invinite-cli@latest plugin install --opencode --global
npx @invinite-org/invinite-cli@latest plugin install --codex --global
npx @invinite-org/invinite-cli@latest plugin install --copilot --local
npx @invinite-org/invinite-cli@latest plugin install --all --globalUpdate
Re-run the install command to refresh the installed files to the latest version:
npx @invinite-org/invinite-cli@latest plugin install --all --globalUninstall
npx @invinite-org/invinite-cli@latest plugin uninstall --claude --global
npx @invinite-org/invinite-cli@latest plugin uninstall --all --globalWhat gets installed
| Runtime | Skill | Commands |
| --------------- | ----------------------------------- | ------------------------------------ |
| Claude Code | skills/invinite-web-api/ (+ refs) | commands/*.md |
| Codex | skills/invinite-web-api/ (+ refs) | skills/invinite-<command>/SKILL.md |
| Copilot | skills/invinite-web-api/ (+ refs) | skills/invinite-<command>/SKILL.md |
| OpenCode | command/invinite-web-api.md | command/*.md |
OpenCode is global-only (it has no local install directory). --global writes to
the tool's home config (~/.claude, ~/.codex, ~/.github, ~/.config/opencode);
--local writes to the matching folder in the current directory.
Alternative: Claude Code plugin directory
claude --plugin-dir ./claude-pluginThen open /mcp to complete OAuth. For Claude web/Desktop, distribute the plugin
through a Claude plugin marketplace; installing it provisions the skill and
connector together.
Getting started
inv login # sign in via your browser
inv --help # list all commandsinv login opens a browser for authentication and stores a token in your OS
keychain (Keychain on macOS, libsecret on Linux, Credential Manager on Windows).
If no keychain is available it falls back to ~/.invinite/credentials.json
(mode 0600) with a warning.
Usage
inv [--team-id <id>] [--format json|table] <command>Special commands:
| Command | Description |
| ----------------------------------------- | ---------------------------------- |
| inv login | Sign in via browser |
| inv logout | Revoke and remove the stored token |
| inv config set <key> <value> | Set token, api-url, or team |
| inv config get <key> | Read a configuration value |
| inv teams select --id <teamId> | Set the default team |
| inv api <method> <path> [--body <json>] | Raw authenticated API request |
| inv plugin install [--all] [--global] | Install the AI coding-tool plugin |
| inv plugin uninstall [--all] [--global] | Remove the installed plugin |
All other commands are generated from the API's endpoint registry and follow
inv <group> <action> [--flags]. Run inv --help to list every group, or
inv <group> to list a group's actions and their flags. Flags map to request
fields (kebab-case, e.g. --company-id); values are parsed as JSON when valid,
otherwise treated as strings.
inv --help # all groups
inv companies # actions + flags for the "companies" group
inv --format table companies listExamples
inv users me # your account + teams
inv teams select --id team_123 # set the default team
inv spaces list # list workspace spaces
inv company-lists add-entry --id list_123 --symbol AAPL # add a company to a list
inv alerts create-price \
--symbol AAPL --asset-type us_stock --price 200 --direction above
inv templates list --kind tradingChartLayout # list saved templates
inv api GET /v1/users/me # raw request escape hatchScripting
Every command emits a { "ok": true, "data": ... } envelope. Combine
--format json (the default) with jq:
inv spaces list | jq -r '.data.items[].name'List endpoints paginate with --limit (1–200) and --cursor; the response
carries data.nextCursor (or null when exhausted). Page through everything:
cursor=""
while :; do
page=$(inv spaces list --limit 50 ${cursor:+--cursor "$cursor"})
echo "$page" | jq -c '.data.items[]'
cursor=$(echo "$page" | jq -r '.data.nextCursor // empty')
[ -z "$cursor" ] && break
doneIn CI, skip inv login and pass a token via the environment — no keychain read
happens when INVINITE_CLI_TOKEN is set:
export INVINITE_CLI_TOKEN=invw_...
export INVINITE_CLI_TEAM_ID=team_123
inv spaces listConfiguration
Non-secret defaults live in ~/.invinite/config.json (API URL and default
team). Output format is not stored — it is a per-command flag (--format,
default json). Tokens are never written to config.json; they live in the OS
keychain (or the 0600 credentials fallback). Precedence for every setting is:
per-command flag → environment variable → stored config → built-in default.
| Variable | Purpose |
| ------------------------- | ------------------------------------------------- |
| INVINITE_CLI_URL | API base URL (default https://api.invinite.com) |
| INVINITE_CLI_TOKEN | Bearer token (takes precedence over the keychain) |
| INVINITE_CLI_TEAM_ID | Default team |
| INVINITE_CLI_CONFIG_DIR | Override the ~/.invinite config directory |
Pointing at a different environment
The CLI is environment-agnostic — the same binary talks to whichever API URL you give it, and credentials are stored per URL so you can stay logged into more than one at once:
inv config set api-url https://api.invinite.com # production (default)
# or, per invocation:
INVINITE_CLI_URL=https://api.invinite.com inv companies listDirect mode
By default the CLI sends normal REST requests to the API URL. Direct mode talks
straight to the Convex backend instead — set INVINITE_CLI_MODE=direct and it
POSTs RPC requests to INVINITE_CLI_CONVEX_URL/api/rest/<endpoint>. This is
mainly for local development against a Convex deployment without the REST
gateway in front.
Direct mode has no browser login: authenticate with INVINITE_CLI_TOKEN and
point at the deployment with INVINITE_CLI_CONVEX_URL.
INVINITE_CLI_MODE=direct \
INVINITE_CLI_TOKEN=invw_... \
INVINITE_CLI_CONVEX_URL=https://your-deployment.convex.site \
inv spaces listLinks
- Docs: https://invinite.com/docs/web-api — full reference, guides, and SDKs.
- Raw requests:
inv api <GET|POST|PATCH|DELETE> <path> [--body '<json>']reaches any endpoint directly when you need something the generated commands don't cover.
License
See the repository for license details.
