Using the CLI
The Flare CLI lets you manage your errors, projects, and performance monitoring data directly from the terminal. List errors, resolve or snooze them, browse monitoring aggregations and traces, create projects, and more — without opening the Flare dashboard.
Beta status
The Flare CLI is currently in beta. If you have any feedback or questions, please reach out to us at [email protected].
Installation
Install the CLI globally via Composer:
composer global require spatie/flare-cli
Make sure Composer's global bin directory is in your PATH. You can find the path with:
composer global config bin-dir --absolute
Verify the installation:
flare --version
Authentication
To use the CLI, you need an API token. You can create one in your account settings.
flare login
You'll be prompted to paste your API token. The token is stored locally at ~/.flare/config.json.
To log out and clear your stored credentials:
flare logout
Available commands
Every Flare API endpoint has a corresponding CLI command. Run flare to see all commands, or flare <command> --help for details on a specific command.
Projects
list-projects— List all projects. Supports filtering by name or team.create-project— Create a new project with a name, team, stage, and technology.delete-project— Delete a project by ID.
flare create-project --field name="My App" --field team_id=1 --field stage=production --field technology=Laravel
Errors
list-project-errors— List errors in a project. Supports filtering by status, exception class, file, stage, log level, and date ranges.get-project-error-count/get-project-error-occurrence-count— Get the number of unique errors or total occurrences in a date range.resolve-error/unresolve-error— Resolve or reopen an error.snooze-error/unsnooze-error— Snooze or unsnooze an error. You can snooze forever, until a date, or for a number of occurrences.
flare snooze-error --error-id=456 --field snooze_type=snooze_forever
Error occurrences
list-error-occurrences— List all occurrences of an error, including stack traces, context, events, and solutions.get-error-occurrence— Get a single occurrence with full details.
Teams
get-team— Get a team and its members.remove-team-user— Remove a user from a team.
Performance Monitoring
get-monitoring-summary— Get the monitoring dashboard summary for a project, including metrics and trends for routes, jobs, commands, and queries.list-monitoring-aggregations— List aggregations by type (routes,queries,jobs,commands,external-http,views,livewire-components). Supports filtering by p95, average, count, error rate, and free-text search.get-monitoring-time-series— Get time series data for graphing. Precision is auto-selected based on the interval.get-monitoring-aggregation— Get detailed metrics, trends, and relationship links for a single aggregation.list-aggregation-traces— List traces for an aggregation. Supports sorting byslowest,fastest,latest, oroldest.get-trace— Get the full span tree for a trace, including all span events, resources, and contexts.
flare get-monitoring-summary --project-id=123 --filter-interval=24h
flare list-monitoring-aggregations --project-id=123 --type=routes --filter-interval=7d --sort=-p95
flare list-aggregation-traces --type=routes --uuid=abc-123 --sort=slowest
User
get-authenticated-user— Get the currently authenticated user and their teams.
Filtering and sorting
List commands support filtering and sorting through command options. Filters use --filter- prefixed options, and sorting uses the --sort option. Prefix a sort field with - to sort in descending order.
flare list-project-errors --project-id=123 \
--filter-status=open \
--filter-exception-class=RuntimeException \
--sort=-last_seen_at
All list commands support pagination with --page-number and --page-size (maximum 30 items per page).
flare list-project-errors --project-id=123 --page-number=2 --page-size=20
Output options
By default, the CLI displays results in a human-readable format. You can switch to structured output for scripting and automation:
--json— Output raw JSON.--yaml— Output YAML.
flare list-projects --json
flare list-projects --json | jq '.data[].name'
AI agent integration
The Flare CLI includes an agent skill that teaches AI coding agents how to use the CLI to triage errors, investigate occurrences, monitor performance, and manage projects on your behalf.
flare install-skill