Skip to content

CLI Overview

The Orator CLI (@orator-dev/cli) is the primary tool for interacting with Orator from your terminal. It handles authentication, repository management, indexing, and context queries.

Installation

Terminal window
npm install -g @orator-dev/cli

Global Flags

These flags are available on all commands:

FlagDescription
--help, -hShow help for a command
--version, -vShow the CLI version
--api-url <url>Override the API base URL (default: https://api.orator.dev)
--api-key <key>Override the API key (instead of stored config)
--jsonOutput results as JSON instead of formatted text
--verboseEnable verbose logging

Environment Variables

The CLI respects these environment variables:

VariableDescriptionDefault
ORATOR_API_KEYAPI key for authenticationRead from ~/.config/orator/config.json
ORATOR_API_URLBase URL for the Orator APIhttps://api.orator.dev

Environment variables take precedence over stored configuration but are overridden by command-line flags.

Configuration File

After running orator login, the CLI stores configuration at:

~/.config/orator/config.json

This file contains your API key and default settings. Do not commit this file to version control.

Commands

CommandDescription
orator loginAuthenticate with your Orator account
orator initInitialize Orator in the current repository
orator indexTrigger indexing for the current repository
orator queryQuery context for the current repository
orator statusShow the indexing status of the current repository

See the Commands reference for full details on each command.