Command-line interface for the Terros Sales platform.
- Node.js 24 or newer
- A Terros account with access to the platform
Install the CLI globally with your package manager:
npm install -g @terros-inc/cliAfter installation, verify that the terros command is available:
terros helpAuthenticate before running Terros API commands:
terros auth loginThe CLI opens a browser-based device login flow. Confirm that the code shown in your browser matches the code printed in the terminal, then finish signing in.
To print the current API access token (for usage in scripts):
terros auth tokenTerros CLI uses the pattern:
terros <command> <subcommand> [parameters]List available commands:
terros helpList subcommands for a command:
terros <command> helpShow parameters for a subcommand:
terros <command> <subcommand> helpPass parameters as flags:
terros <command> <subcommand> --name "Acme Inc." --active trueParameter values are validated based on the Terros API schema. Supported values include strings, numbers, booleans, arrays, and JSON objects.
Examples:
terros <command> <subcommand> --count 10
terros <command> <subcommand> --active true
terros <command> <subcommand> --ids id_1,id_2,id_3
terros <command> <subcommand> --metadata '{"source":"cli"}'Responses are printed as formatted JSON.
Install dependencies:
pnpm installBuild the CLI:
pnpm buildRun the CLI locally:
node dist/index.js helpThe published terros executable loads the compiled code from dist/index.js,
so run pnpm build after changing TypeScript files.
If a command says the CLI is not authorized, sign in again:
terros auth loginIf a token cannot be refreshed, the saved login may have expired. Run
terros auth login to create a new session.