Brava CLI
Command-line access to the Brava Security platform for attack simulation and SIEM hygiene, built for terminals and CI.
pip install brava-cli # or: uv tool install brava-cli
export BRAVA_URL=https://console.brava.security
export BRAVA_API_TOKEN=brava_… # API key from Settings → API Keys
brava doctor # shows which products your key can read
Or store credentials once with brava auth login --token <key> (--url defaults to https://console.brava.security); BRAVA_URL / BRAVA_API_TOKEN override stored values.
| Product | API key scopes | Commands |
|---|---|---|
| Attack simulation | simulations:run |
brava catalog, brava run simulation, brava run goal |
| Hygiene | hygiene:read, hygiene:detections:test |
brava siems list, brava run sweep, brava run test |
With an API key, brava run simulation|goal … work when --account-id is the Brava environment UUID; brava accounts list and lookup by name or cloud account id are not available to API keys yet.
brava doctor marks a product NO ACCESS when the key lacks that product's read scope (simulations:run, hygiene:read); it exits 0 only when no check fails and at least one product is accessible (HTTP 200).
brava run sweep watch and brava run test watch exit 0 pass, 1 request, auth or validation error (e.g. a bad --timeout, missing URL/token), 2 gate failed (a hygiene check failed or a finding at/above --fail-on, default high) or a usage error caught while parsing arguments (e.g. --fail-on bogus, a missing run id), 3 timed out (run continues), 4 no answer (run FAILED/CANCELLED, verdict UNKNOWN, or an injection test (not a dry run) INCONCLUSIVE/NOT_TELEMETRY_DRIVEN). A sweep's log-type and feed warnings never change the exit code. brava run test create --dry-run runs the hygiene checks only and is judged like a sweep.
Check a rule before it is deployed (Google SecOps)
brava run sweep create --siem <siem> --file rules/x.yaral runs the hygiene checks on YARA-L rule text from a file instead of a live rule. Nothing is uploaded or changed in the SIEM: the text is compiled by Google SecOps' own compiler and checked as it will run once deployed (enabled and alerting). Text that doesn't compile always fails the run (exit 2, whatever --fail-on is), with the compiler's messages in a RULE_PARSE_ERROR finding. --file alone treats the text as a new rule, so a live rule with the same name is reported as a duplicate; add --rule <id|name> when the text would replace that live rule, so the two aren't compared as duplicates (the live rule's enabled, alerting or archived state doesn't carry over). Pass --rule, --file, or both; neither, or a missing or empty file, is a usage error (exit 2). If Brava can't reach the compiler the request fails (exit 1).
The output says the run checked undeployed rule text, and the console is never refreshed for it (consoleUpdate is null). When brava run test could not inject telemetry for the rule, an informational line says why (injectionBlocker in --json: NOT_TELEMETRY_DRIVEN the rule reads no event data, QUERY_UNPARSEABLE the text could not be parsed for planning, REFLIST_MEMBER_UNKNOWN the rule is gated on a reference list with no readable entries); it never changes the exit code. Stale reference lists the rule reads are listed with the source warnings. Feed and log-volume warnings aren't shown for --file: they describe the SIEM, not the rule.
Data checks (log types receiving events, populated fields, parsers) run on the --siem SIEM. For a Dev SIEM that doesn't receive every source, set its Fallback Telemetry Source integration setting to the production SIEM: log types with no data in Dev are then measured there, read-only, and the Q1 detail names them. Without it, a rule reading a log type Dev doesn't receive fails Q1.
Pull-request pipeline (needs jq; create --json prints the run, including its id):
id=$(brava run sweep create --siem "Google SecOps" --file rules/x.yaral --json | jq -r .id)
brava run sweep watch "$id" --fail-on high
Documentation: https://docs.brava.security/cli/
Metadata
Release files for brava-cli 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brava_cli-0.4.0.tar.gz | 18.1 kB | With provenance | Details for brava_cli-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brava_cli-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for brava_cli-0.4.0-py3-none-any.whl |
Total release size: 41.2 kB
Release files / brava_cli-0.4.0.tar.gz
| Download URL | brava_cli-0.4.0.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26c4c9532357de110b13070dda184e1b50ad29b341ca540d30c4661838f75d98
|
|
BLAKE2b-256 checksum How to use checksums |
4aac349236d0353a35e3e9aa0d13d84839c8617ff41b92affd65b837c50308bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / brava_cli-0.4.0-py3-none-any.whl
| Download URL | brava_cli-0.4.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d35a0511de1348eb24043f10810220c42349a329246f9850a0797d8a0bcdacf4
|
|
BLAKE2b-256 checksum How to use checksums |
b7a7c03b71348fe0f5e5732351399685b8c1c31dac9b843c0e39bf3a5545d2f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for brava-cli 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for brava_cli-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.