Skip to content

feat(cli): expose team, project, test and review management - #357

Merged
gregberge merged 1 commit into
mainfrom
feat/cli-team-project-management
Aug 8, 2026
Merged

feat(cli): expose team, project, test and review management#357
gregberge merged 1 commit into
mainfrom
feat/cli-team-project-management

Conversation

@gregberge

Copy link
Copy Markdown
Member

Follows argos-ci/argos#2440, which adds 34 REST endpoints. This brings them to the CLI.

packages/api-client/src/schema.ts is regenerated from that PR's OpenAPI document — the same output pnpm run build-schema-types will produce once it is deployed. I checked the generator against production first: regenerating from the live openapi.yaml reproduces main's committed schema.ts operation-for-operation, and the PR branch adds exactly the 34 new operations and removes none. The diff is large because the committed file also predates a few description changes already live in production.

New command groups

Command What it does
account get / update Plan, current-period usage, and the role given to users who join through the invite link or a verified domain
account member list | set-level | remove A team's members and their roles
account invite list | create | cancel | reset-link Pending invitations and the shared invite link
account domain list | add | remove The email domains a team is open to
project get / update / transfer Read a project's settings, change them one flag at a time, move it to another account
project contributor list | set | remove Per-project access for users who are not team members
project deployments Deployments, most recent first, filterable by environment
project domain get | set The domain production deployments are served on
automation list | get | create | update | deactivate A project's automation rules

Added to existing groups

  • test list — the project's tests, flakiest first. The first page is the flakiness backlog.
  • change list — the changes currently ignored in a project, to audit what has been silenced.
  • test subscribe / unsubscribe, build subscribe / unsubscribe.
  • review reviewer list \| add \| remove — the review requests standing on a build.

Notes

  • Pagination is shared. lib/pagination.ts walks a paginated endpoint up to --limit (default 100). It keeps perPage constant across pages: the API turns page into an offset by multiplying it by perPage, so shrinking the last page to "just what is missing" would skip items. The overshoot is trimmed client-side instead. Covered by unit tests.
  • Auth mode follows the endpoint's own security. Read-only endpoints that accept a project token (test list, change list, project get, project deployments, project domain get) fall back to the token's own project the way build get does. Everything else is declared user, so it asks for --project / --account explicitly and gets the personal-access-token hint on a 401/403 — this matters for project contributor list and listBuildReviewers, which read but are not open to project tokens.
  • project update only sends what you pass. Every setting takes an explicit value (--summary-check auto, --deployments true, --private inherit) rather than a --no-x pair, so a script never has to guess whether an omitted flag means "false" or "leave alone". Nullable strings reset with an empty value. ignoreConfig is the one exception the API takes whole, so touching either half reads the project back first and merges.
  • Automation rules take JSON. Conditions and actions are a tagged union with a not/glob wrapper — not something to flatten into flags. --definition / --definition-file mirror the existing --body / --body-file pattern, and --help prints a worked example.
  • 204 responses go through a new unwrapEmpty, since unwrap treats an empty body as an error. The commands return a small { removed: true, … } object so --json still has something to read.
  • formatProject now renders a project's settings. The old "Created project …" wording moved to formatCreatedProject, which is what create-project actually wanted.
  • The argos-cli skill is updated: new commands, the token table, and three flows (onboarding someone onto a team and a project, configuring a project, requesting reviewers).

Testing

  • check-types, lint, check-format clean on @argos-ci/cli and @argos-ci/api-client.
  • 57/57 unit tests pass, including new coverage for fetchPages and formatProject.
  • Built the CLI and walked the whole command tree by hand: every group and subcommand resolves, --help renders at all three levels, and the argument/flag validation paths (missing account, nothing to update, missing rule definition, --limit 0) produce the right errors.
  • The e2e suite hits a live API with credentials, so it was not run here.

🤖 Generated with Claude Code

Ports the 34 endpoints added by argos-ci/argos#2440 to the CLI, and
regenerates `@argos-ci/api-client` from the OpenAPI document that ships
them.

New command groups:

- `argos account` — plan and current-period usage, team defaults, and the
  three things that decide who is on a team: `member`, `invite`, `domain`.
- `argos project` — `get` / `update` settings, `transfer`, `contributor`,
  `deployments`, and the deployment `domain`.
- `argos automation` — list, read, create, replace and deactivate a
  project's automation rules.

Additions to existing groups:

- `argos test list` — the project's tests, flakiest first.
- `argos change list` — the changes currently ignored in a project.
- `argos test subscribe|unsubscribe`, `argos build subscribe|unsubscribe`.
- `argos review reviewer list|add|remove`.

Every list command follows pagination up to `--limit` (default 100)
through a shared `fetchPages` helper. It keeps the page size constant:
the API derives its offset from `page * perPage`, so shrinking the last
page would skip items.

`formatProject` now renders a project's settings; the "Created project …"
wording it used to have moved to `formatCreatedProject`, which is what
`create-project` wanted all along.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
argos-js-sdk-reference Ready Ready Preview Aug 8, 2026 10:55am

Request Review

@gregberge
gregberge merged commit 148648a into main Aug 8, 2026
70 checks passed
@gregberge
gregberge deleted the feat/cli-team-project-management branch August 8, 2026 11:27
pull Bot pushed a commit to Jimimaku/docs.argos-ci.com that referenced this pull request Aug 8, 2026
The API gained thirty-four endpoints (argos-ci/argos#2440), the CLI the
matching commands (argos-ci/argos-javascript#357), and the MCP server the
tools that come with them for free.

CLI reference: the command table, and sections for configuring a project,
automation rules, managing a team, and paginated lists. `test list`,
`change list`, `review reviewer`, and the build/test subscriptions join the
sections they belong to. The token split is restated, including the two
read-only commands that still need a personal access token because they
return users.

MCP server: what an agent can now do, and the scopes that decide whether it
may — the tool list is not the permission model.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant