$npx -y skills add pixee/pixee-cli --skill pixee-analysisList, view, and delete Pixee analyses with filters and optional polling until the analysis reaches a terminal state.
| 1 | # pixee analysis |
| 2 | |
| 3 | > **PREREQUISITES:** Read `../pixee-shared/SKILL.md` for global flags, exit codes, and error |
| 4 | > handling, and `../pixee-auth/SKILL.md` if authentication needs to be configured. See |
| 5 | > `../pixee-scan/SKILL.md` (the `analyze` verb) and `../pixee-finding/SKILL.md` (the |
| 6 | > `representative-results` HAL link) — both produce the analysis UUID this skill operates on. |
| 7 | > See `../pixee-repo/SKILL.md` for the `--repo` resolution protocol used by `list`. |
| 8 | |
| 9 | `pixee analysis` lists analyses across the platform, fetches a single analysis by UUID with |
| 10 | optional polling on `view`, and deletes an analysis (and its associated findings and patches) |
| 11 | by UUID. An analysis is one run of Pixee's triage, fix, or sca pipeline against a scan; its |
| 12 | UUID surfaces in two places — the response from `pixee scan analyze <scan-id>` (the CLI prints |
| 13 | `Started analysis <analysis-id> on scan <scan-id>`) and the `analysis` HAL link on every |
| 14 | finding's representative result (see `pixee-finding`). `list` is the discovery primitive for |
| 15 | analyses that didn't originate from a `pixee scan analyze` call the agent made. |
| 16 | |
| 17 | ## pixee analysis list |
| 18 | |
| 19 | ``` |
| 20 | pixee analysis list [filter flags...] |
| 21 | ``` |
| 22 | |
| 23 | All flags are optional. With none, every analysis the token can see is returned. Pagination is |
| 24 | transparent: the CLI walks every page in one call. |
| 25 | |
| 26 | Text output is tab-separated with columns `id`, `state`, `branch`, `sha`, `updated_at`. JSON |
| 27 | output is a flat array of analyses with the HAL envelope stripped. |
| 28 | |
| 29 | Filter flags: |
| 30 | |
| 31 | - `--repo <name-or-uuid>` — **repeatable**. Restrict to one or more repositories. Names resolve |
| 32 | via the protocol documented in `pixee-repo`. Multiple `--repo` flags OR together. |
| 33 | - `--branch <name>` — exact branch name (case-sensitive). |
| 34 | - `--state <state>` — **repeatable**. One of `queued`, `in-progress`, `skipped`, `completed`, |
| 35 | `failed`. Multiple values OR together. |
| 36 | - `--tool <name>` — **repeatable**. Filter by detector tool (`sonar`, `semgrep`, `codeql`, etc.). |
| 37 | - `--updated-after <iso8601>` / `--updated-before <iso8601>` — bound the `updated_at` window |
| 38 | using full ISO-8601 with timezone (e.g. `2026-05-01T00:00:00Z`). Server validates the format. |
| 39 | |
| 40 | ## pixee analysis view |
| 41 | |
| 42 | ## pixee analysis view |
| 43 | |
| 44 | ``` |
| 45 | pixee analysis view <analysis-id> [--watch] [--interval <seconds>] |
| 46 | ``` |
| 47 | |
| 48 | `<analysis-id>` is the analysis UUID. |
| 49 | |
| 50 | Default text mode prints the analysis's headline fields — `id`, `type`, `state`, `updated_at`, |
| 51 | and the scan/repository the analysis was run against. JSON mode (`--output json` or `--json`) |
| 52 | returns the full HAL representation including `_links.scan`, `_links.findings`, and the |
| 53 | per-section result objects that downstream tooling consumes. As with every Pixee resource, follow |
| 54 | HAL links via `pixee api <href>` rather than hardcoding paths. |
| 55 | |
| 56 | ### `--watch` |
| 57 | |
| 58 | ``` |
| 59 | pixee analysis view <analysis-id> --watch [--interval <seconds>] |
| 60 | ``` |
| 61 | |
| 62 | With `--watch`, the CLI polls the analysis on a fixed cadence and narrates each state transition |
| 63 | to stderr until the analysis reaches a terminal state (`completed` or `failed`). Final output goes |
| 64 | to stdout in the same shape as a non-watching `view`, so `--watch` is safe to use in scripts that |
| 65 | consume stdout. Exit code matches the terminal state: 0 for `completed`, non-zero for `failed`. |
| 66 | |
| 67 | `--interval <seconds>` (default 5) sets the polling cadence. Lower intervals surface progress |
| 68 | sooner; higher intervals reduce server load on long-running analyses. Only meaningful with |
| 69 | `--watch` — passing it without `--watch` has no effect. |
| 70 | |
| 71 | ## pixee analysis delete |
| 72 | |
| 73 | ``` |
| 74 | pixee analysis delete <analysis-id> |
| 75 | ``` |
| 76 | |
| 77 | Delete an analysis by UUID. The platform also removes the analysis's associated findings and |
| 78 | patches as part of the operation, so this is more destructive than the verb name suggests. On |
| 79 | success the CLI prints `Deleted analysis <id>` and exits 0; a missing analysis exits 3. There |
| 80 | is no client-side confirmation prompt, matching `pixee scan delete`, `pixee repo delete`, and |
| 81 | `pixee workflow delete`. |
| 82 | |
| 83 | ## Examples |
| 84 | |
| 85 | ```bash |
| 86 | # Every analysis visible to the token (paginated transparently) |
| 87 | pixee analysis list |
| 88 | |
| 89 | # Failed analyses on main across two repos in the last 24h |
| 90 | pixee analysis list --repo pixee/pixee-platform --repo analysis-service \ |
| 91 | --branch main --state failed --updated-after 2026-05-19T00:00:00Z |
| 92 | |
| 93 | # Completed sonar analyses, JSON for downstream processing |
| 94 | pixee analysis list --tool sonar --state completed --json \ |
| 95 | | jq '.[] | {id, state, updated_at}' |
| 96 | |
| 97 | # View an analysis by UUID |
| 98 | pixee analysis view 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d |
| 99 | |
| 100 | # Block until an analysis finishes, narrating progress |
| 101 | pixee analysis view 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d --watch |
| 102 | |
| 103 | # Block until done with a 15-second poll interval (lighter on the |