$npx -y skills add pixee/pixee-cli --skill pixee-repoList, view, and delete Pixee repositories with shared name-or-UUID resolution used by every targeted subcommand.
| 1 | # pixee repo |
| 2 | |
| 3 | > **PREREQUISITE:** Read `../pixee-shared/SKILL.md` for global flags, exit codes, and error |
| 4 | > handling. Those conventions apply to every command in this skill. See `../pixee-auth/SKILL.md` |
| 5 | > if authentication needs to be configured. |
| 6 | |
| 7 | `pixee repo` manages repositories registered with the Pixee platform: list, view, and delete. It |
| 8 | also documents the `--repo` resolution protocol used by every other subcommand that targets a |
| 9 | specific repository. |
| 10 | |
| 11 | ## pixee repo list |
| 12 | |
| 13 | List registered repositories. Pagination is transparent — the CLI walks every page automatically. |
| 14 | Text output is tab-separated with columns `name`, `full_name`, `type`, `default_branch`, `id`. |
| 15 | |
| 16 | Flags: |
| 17 | |
| 18 | - `--name <pattern>` — case-insensitive partial-match filter against the repository's `name` field. |
| 19 | Server-side filter; reduces payload before pagination. |
| 20 | - `--output text|json` — see `pixee-shared`. |
| 21 | - `--server <url>` — see `pixee-shared`. |
| 22 | |
| 23 | Each repository has a `type` discriminator (`github`, `gitlab`, `azure`, `git`, `bitbucket`), a |
| 24 | UUID `id`, a `name`, a `full_name` (e.g., `pixee/pixee-platform`), and a `default_branch`. |
| 25 | Type-specific fields (`owner`, `html_url` for GitHub, etc.) appear only in `--output json`. |
| 26 | |
| 27 | ## pixee repo view |
| 28 | |
| 29 | ``` |
| 30 | pixee repo view <repo-id> |
| 31 | ``` |
| 32 | |
| 33 | Fetch a single repository by UUID. `<repo-id>` is the value shown in the `id` column of |
| 34 | `pixee repo list`. |
| 35 | |
| 36 | Default text mode prints a sectioned `Key: value` block of the common fields shared by every |
| 37 | git-provider variant — `Name`, `Full name`, `Default branch`, `Type`, `ID` — colon-separated, one |
| 38 | field per line. Use `--output json` (or `--json`) for the full HAL body, which adds the |
| 39 | provider-specific fields (`github_app_installation_id` for GitHub, `azure_project` for Azure |
| 40 | DevOps, etc.) and the `_links` envelope. The text view intentionally omits the provider-specific |
| 41 | fields because the union over five integration types would render inconsistently; reach for |
| 42 | `--json` when an agent needs them. |
| 43 | |
| 44 | A non-existent UUID returns the standard not-found error and exits 3. |
| 45 | |
| 46 | ## pixee repo delete |
| 47 | |
| 48 | ``` |
| 49 | pixee repo delete <repo-id> |
| 50 | ``` |
| 51 | |
| 52 | Delete a repository by UUID. **Cascading:** the server also removes the repository's scans, |
| 53 | workflows, and findings as part of the same operation, so this is more destructive than the verb |
| 54 | name suggests. On success the CLI prints `Deleted repo <id>` and exits 0; a missing repo exits 3. |
| 55 | |
| 56 | There is no confirmation prompt — `pixee` does not ship interactive guards for any destructive |
| 57 | verb (`scan delete`, `workflow delete`, `repo delete` all behave the same way). Scripts that want |
| 58 | a guard should add their own check before calling. |
| 59 | |
| 60 | ## Repository name resolution |
| 61 | |
| 62 | The `--repo` flag accepted by `pixee workflow` and other subcommands resolves names to UUIDs using |
| 63 | the same protocol. Three cases: |
| 64 | |
| 65 | 1. **UUID** (matches `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` pattern): used as the repository ID |
| 66 | directly — no lookup. |
| 67 | 2. **Name or full_name**: the CLI queries `GET /api/v1/repositories?name=<value>` and filters the |
| 68 | response client-side for an exact, case-insensitive match against either the `name` field |
| 69 | (e.g., `pixee-platform`) or the `full_name` field (e.g., `pixee/pixee-platform`). |
| 70 | 3. **Outcome**: |
| 71 | - No exact match → exit code 3 ("no repository named X found"). |
| 72 | - One exact match → use it. |
| 73 | - Multiple exact matches (same `name` across integrations; for example, GitHub and GitLab both |
| 74 | have `pixee-platform`) → exit code 1 with an error listing each candidate with its UUID and |
| 75 | `type`. Retry with the UUID. |
| 76 | |
| 77 | Both `--repo pixee-platform` and `--repo pixee/pixee-platform` resolve correctly when the match is |
| 78 | unambiguous. |
| 79 | |
| 80 | ## Examples |
| 81 | |
| 82 | ```bash |
| 83 | # List every repository |
| 84 | pixee repo list |
| 85 | |
| 86 | # Machine-readable listing piped to jq for further filtering |
| 87 | pixee repo list --output json | jq '.[] | select(.type == "github") | .full_name' |
| 88 | |
| 89 | # Filter server-side to reduce payload |
| 90 | pixee repo list --name pixee-platform |
| 91 | |
| 92 | # Inspect a single repo's common fields in text mode |
| 93 | pixee repo view a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d |
| 94 | |
| 95 | # Pull the full HAL body to see provider-specific fields like github_app_installation_id |
| 96 | pixee repo view a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d --json \ |
| 97 | | jq '{type, full_name, github_app_installation_id}' |
| 98 | |
| 99 | # Delete a repository by UUID (also removes its scans, workflows, and findings) |
| 100 | pixee repo delete a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d |
| 101 | |
| 102 | # Ambiguous --repo: the CLI prints each match with its UUID; retry with the UUID |
| 103 | pixee workflow list --repo pixee-platform |
| 104 | # Error: Multiple repositories named "pixee-platform": |
| 105 | # a1b2c3d4-... github pixee/pixee-platform |
| 106 | # e5f6g7h8-... gitlab pixee-group/pixee-platform |
| 107 | ``` |
| 108 | |
| 109 | ## Best practices |
| 110 | |
| 111 | - When a reposito |