| name | flare |
| description | Manage Flare error tracking and performance monitoring using the flare CLI. Use when the user wants to list, triage, resolve, snooze, or debug errors; manage projects; create projects and retrieve API keys; check error counts; investigate slow routes, queries, jobs, or commands; view aggregated performance data and traces; or interact with flareapp.io from the command line. |
| license | MIT |
| metadata | {"author":"spatie","version":"0.0.1"} |
Flare CLI
The flare CLI lets you manage Flare error tracking and performance monitoring from the terminal. Every Flare API endpoint has a corresponding command.
Prerequisites
Check that the CLI is installed:
flare --version
If not installed:
composer global require spatie/flare-cli
Ensure Composer's global bin directory is in PATH:
composer global config bin-dir --absolute
Authentication
flare login
flare logout
Get your API token at https://flareapp.io/settings/api-tokens.
If any command returns a 401 error, the token is invalid or expired. Run flare login again.
Quick command reference
All commands output JSON. See references/commands.md for full parameter details.
User & team
flare get-authenticated-user
flare get-team --team-id=1
flare remove-team-user --team-id=1 --user-id=42
Projects
flare list-projects
flare list-projects --filter-name="My App" --filter-team-id=1
flare list-projects --include=team
flare create-project --field name="My App" --field team_id=1 --field stage=production --field technology=Laravel
flare delete-project --project-id=123
Errors
flare list-project-errors --project-id=123
flare list-project-errors --project-id=123 --filter-status=open --filter-exception-class=RuntimeException
flare list-project-errors --project-id=123 --sort=-last_seen_at
flare get-project-error-count --project-id=123 --start-date="2025-01-01 00:00:00" --end-date="2025-01-31 23:59:59"
flare get-project-error-occurrence-count --project-id=123 --start-date="2025-01-01 00:00:00" --end-date="2025-01-31 23:59:59"
Error actions
flare resolve-error --error-id=456
flare unresolve-error --error-id=456
flare snooze-error --error-id=456 --field snooze_type=snooze_forever
flare snooze-error --error-id=456 --field snooze_type=snooze_until --field snooze_until=2025-06-01T00:00:00Z
flare snooze-error --error-id=456 --field snooze_type=snooze_number_of_occurrences --field snooze_number_of_occurrences=50
flare unsnooze-error --error-id=456
Occurrences
flare list-error-occurrences --error-id=456
flare list-error-occurrences --error-id=456 --sort=received_at
flare get-error-occurrence --occurrence-id=789
Performance monitoring
The --type parameter accepts: routes, queries, jobs, commands, external-http, views, livewire-components.
The --filter-interval parameter accepts: 1h, 3h, 6h, 24h (default), 48h, 7d, 14d.
flare get-monitoring-summary --project-id=123
flare list-monitoring-aggregations --project-id=123 --type=routes --sort=-p95
flare list-monitoring-aggregations --project-id=123 --type=queries --filter-p95=500
flare get-monitoring-time-series --project-id=123 --type=routes --filter-interval=7d
flare get-monitoring-aggregation --type=routes --uuid=<uuid> --include=parents,children
flare list-aggregation-traces --type=routes --uuid=<uuid> --sort=slowest
flare get-trace --trace-id=<trace-id>
Pagination
All list commands support pagination:
flare list-project-errors --project-id=123 --page-number=2 --page-size=20
Response includes meta (current_page, total, last_page) and links (next/prev URLs).
Common workflows
Error triage
List open errors, categorize by exception class, resolve or snooze in batches. See references/workflows.md for the full triage workflow.
Quick version:
flare list-project-errors --project-id=123 --filter-status=open --sort=-last_seen_at
flare resolve-error --error-id=456
flare snooze-error --error-id=789 --field snooze_type=snooze_forever
Debug an error with local code
Fetch an occurrence, find application frames, then read the corresponding local files. See references/workflows.md for detailed steps.
Quick version:
flare list-error-occurrences --error-id=456 --sort=-received_at --page-size=1
Investigate slow performance
Get a performance overview, drill into slow aggregations, and inspect individual traces. See references/workflows.md for the full workflow.
Quick version:
flare get-monitoring-summary --project-id=123 --filter-interval=24h
flare list-monitoring-aggregations --project-id=123 --type=routes --sort=-p95
flare get-monitoring-aggregation --type=routes --uuid=<uuid> --include=children
flare list-aggregation-traces --type=routes --uuid=<uuid>
flare get-trace --trace-id=<trace-id>
Create a project and get API keys
Create a project via CLI, retrieve API keys, and verify errors are flowing. See references/workflows.md for the step-by-step guide.
Output format
All commands return JSON. When presenting results to the user:
- Errors: Show as a table with columns: ID, exception class, message (truncated), status, occurrence count, last seen. Always include the
latest_occurrence_url_on_flare link.
- Occurrences: Highlight application frames (where
application_frame is true) — these are the user's code, not vendor code. Show the relative_file and line_number.
- Solutions: If
solutions is non-empty, always present them prominently — they contain actionable fix suggestions.
- Attributes: Group by the
group field (e.g., request, user, environment) when displaying context.
- Events: Show chronologically — they represent the execution trail leading to the error (queries, logs, jobs, etc.).
- Flare URLs: Include
latest_occurrence_url_on_flare so the user can view the full error in the Flare dashboard.
- Monitoring aggregations: Show as a table with columns: name/label, p95, average, count, error rate. Highlight aggregations with high p95 or error rate.
- Traces: Show the span tree hierarchically. Highlight spans with the longest duration — these are the bottlenecks.