Projects CLI reference
The projects command lets you manage Honeybadger projects and view reports.
List projects
Section titled “List projects”hb projects list
# Filter by accounthb projects list --account-id 12345Optional flags:
--account-id— Filter projects by account ID-o, --output— Output format:tableorjson(default:table)
Get project details
Section titled “Get project details”hb projects get --id 12345Required flags:
--id— Project ID
Optional flags:
-o, --output— Output format:textorjson(default:text)
Create a project
Section titled “Create a project”hb projects create --account-id 12345 --cli-input-json '{ "project": { "name": "My Project", "language": "ruby", "resolve_errors_on_deploy": true }}'
# Or from a filehb projects create --account-id 12345 --cli-input-json file://project.jsonRequired flags:
--account-id— Account ID to create the project in--cli-input-json— JSON payload (inline string orfile://path)
JSON fields:
name— Project namelanguage— Programming languageresolve_errors_on_deploy— Auto-resolve errors on deploydisable_public_links— Disable public error linksuser_url— URL template for user links (e.g.,https://myapp.com/users/[user_id])source_url— URL template for source links (e.g.,https://github.com/org/repo/blob/main/[filename]#L[line])purge_days— Days to retain datauser_search_field— Field to use for user search
Optional flags:
-o, --output— Output format:textorjson(default:text)
Update a project
Section titled “Update a project”hb projects update --id 12345 --cli-input-json '{"project": {"name": "New Name"}}'Required flags:
--id— Project ID--cli-input-json— JSON payload with fields to update
Optional flags:
-o, --output— Output format:textorjson(default:text)
Delete a project
Section titled “Delete a project”hb projects delete --id 12345Required flags:
--id— Project ID
Get occurrence counts
Section titled “Get occurrence counts”View error occurrence counts across projects:
# All projectshb projects occurrences --period day --environment production
# Specific projecthb projects occurrences --id 12345 --period hourOptional flags:
--id— Project ID (omit for all projects)--period— Time period:hour,day,week, ormonth(default:day)--environment— Filter by environment-o, --output— Output format:tableorjson(default:table)
Get integrations
Section titled “Get integrations”List integrations configured for a project:
hb projects integrations --id 12345Required flags:
--id— Project ID
Optional flags:
-o, --output— Output format:tableorjson(default:table)
Get reports
Section titled “Get reports”Generate reports for a project:
hb projects reports --id 12345 --type notices_per_day \ --start 2024-01-01T00:00:00Z \ --stop 2024-01-31T23:59:59ZRequired flags:
--id— Project ID--type— Report type:notices_by_class— Errors grouped by classnotices_by_location— Errors grouped by locationnotices_by_user— Errors grouped by usernotices_per_day— Error count over time
Optional flags:
--start— Start time in RFC3339 format--stop— Stop time in RFC3339 format--environment— Filter by environment-o, --output— Output format:tableorjson(default:table)