@reportei/cli
v0.4.2
Published
Reportei CLI — Terminal interface for the Reportei platform
Readme
Reportei CLI
Terminal interface for the Reportei platform. Manage projects, reports, dashboards, integrations, metrics and more — all from the command line.
Built on the Model Context Protocol (MCP) over Streamable HTTP, the CLI communicates with the same server that powers Reportei's AI integrations.
Requirements
- Node.js >= 24.0.0
Installation
npm install -g @reportei/cliAfter installing, the reportei command is available system-wide.
Authentication
The CLI authenticates via OAuth 2.0 Device Authorization Grant — the same secure flow used by tools like the GitHub CLI. No passwords are typed into the terminal.
reportei auth login- A URL and a one-time code are displayed.
- Your browser opens the Reportei authorization page.
- Enter the code and approve.
- The CLI stores the token locally in
~/.reportei/config.json.
Check your current auth state or log out:
reportei auth status
reportei auth logoutUsage
reportei <command> [subcommand] [options]Global options
| Flag | Description |
|---|---|
| --profile <name> | Use a specific configuration profile |
| --json | Output as JSON |
| --csv | Output as CSV |
| --raw | Output raw response data |
| -V, --version | Print version |
| -h, --help | Print help |
Commands
| Command | Description |
|---|---|
| auth | login, status, logout — manage authentication |
| config | set, get, list, default, profiles — manage CLI configuration |
| myCompany | Show company/account information (alias: my-company) |
| projects | list, show — manage projects |
| project | use, clear, current — set a default project for subsequent commands |
| integrations | list, show, catalog — manage connected integrations |
| metrics | list, get — list available metrics and fetch metric data |
| reports | list, show, create — manage reports |
| dashboards | list, show, create — manage dashboards |
| templates | list, show — manage report templates |
| timeline | list, show, create, update, delete — manage timeline events |
| webhooks | list, create, delete — manage webhook subscriptions |
| automations | list, show, create, toggle — manage report automations |
| goals | list, progress, create — manage goals and KPIs |
| analyze | performance, channels, campaigns, content — AI-powered analysis |
| compare | Compare metrics across two date ranges |
| prompt | marketing-review, social-audit, campaign-analysis, seo-check, monthly-report, list — execute MCP prompts |
| prompts | list — list available MCP prompt templates |
| interactive | Start an interactive REPL session |
Examples
# List all projects
reportei projects list
# Show a specific project
reportei projects show 42
# List integrations for a project
reportei integrations list --project-id 42
# List available metrics for Facebook Ads
reportei metrics list --integration-slug facebook_ads
# Fetch metric data for a date range
reportei metrics get \
--integration-id 123 \
--start 2026-01-01 \
--end 2026-01-31 \
--metrics '[{"id":"...","reference_key":"spend","component":"summary","metrics":["spend"]}]'
# Create a report (interactive prompts fill missing fields)
reportei reports create --project-id 42
# List reports as JSON
reportei reports list --json
# Start interactive mode
reportei interactiveConfiguration
Settings are stored at ~/.reportei/config.json and managed through the config command:
# View current config
reportei config list
# Set output format
reportei config set output_format json
# Set the default profile
reportei config default staging
# List all profiles
reportei config profilesProfiles
The CLI supports multiple profiles so you can switch between accounts or environments:
# Login to a different profile
reportei --profile staging auth login
# Set the default profile
reportei config default staging
# List all profiles
reportei config profilesProfile-specific settings (token, output format) are resolved in this order:
- CLI flag (
--json,--csv,--raw,--profile) - Environment variable (
REPORTEI_PROFILE) - Active profile config
- Defaults
The base URL defaults to the production Reportei server. It can be overridden via the REPORTEI_BASE_URL environment variable for development purposes.
Output formats
All list/show commands support four output modes:
| Format | Flag | Description |
|---|---|---|
| Table | (default) | Human-readable table with pagination info |
| JSON | --json | Structured JSON, ideal for piping to jq |
| CSV | --csv | Comma-separated values for spreadsheets |
| Raw | --raw | Unformatted response body |
License
Proprietary — internal use only.
