Skip to content

feat(cli): add create-project command and drop commander env bindings#343

Merged
gregberge merged 2 commits into
mainfrom
cli/create-project-drop-env-bindings
Jul 10, 2026
Merged

feat(cli): add create-project command and drop commander env bindings#343
gregberge merged 2 commits into
mainfrom
cli/create-project-drop-env-bindings

Conversation

@gregberge

Copy link
Copy Markdown
Member

Summary

  • Add a new argos create-project <name> --account <slug> command, backed by the POST /projects API endpoint (mirrors feat(backend): add API endpoint to create a project (ARG-451) argos#2352). Supports --token, --json, and ARGOS_ACCOUNT / ARGOS_TOKEN env vars.
  • Remove all commander .env() bindings from the CLI. Environment variables are now resolved in the config/target layer instead of by commander:
    • ARGOS_TOKEN, ARGOS_PROJECT, ARGOS_BUILD_NAME, ARGOS_MODE, ARGOS_PARALLEL_*, ARGOS_REFERENCE_* — already handled by core readConfig.
    • ARGOS_PROJECT for build-scoped commands (review/comment/build) — now resolved in target.ts (alongside the existing ARGOS_TOKEN fallback).
    • ARGOS_ACCOUNT for create-project — resolved in the command.
  • Fix a latent bug: threshold was in the config schema but missing from readConfig's load block, so ARGOS_THRESHOLD (and even --threshold) were being dropped. It's now loaded, with CLI option taking priority over env.

Resolves ARG-456

Test plan

  • packages/cli: check-types, lint, and test (46 passed) all green.
  • packages/core: check-types green; config.test.ts (15 passed) including 2 new tests covering ARGOS_THRESHOLD and option-over-env priority.
  • No .env( bindings remain in packages/cli/src.
  • No E2E test added for project creation (it would create real projects in production).

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jul 10, 2026

Copy link
Copy Markdown

ARG-456

ARG-451

@vercel

vercel Bot commented Jul 10, 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 Error Error Jul 10, 2026 9:11pm

Request Review

gregberge and others added 2 commits July 10, 2026 23:10
Add `argos create-project <name> --account <slug>`, backed by the
`POST /projects` API endpoint. Supports `--token`, `--json`, and the
`ARGOS_ACCOUNT` / `ARGOS_TOKEN` environment variables.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove all commander `.env()` bindings from the CLI. Environment variables
are now resolved in the config/target layer instead of by commander:

- `ARGOS_PROJECT` for build-scoped commands is resolved in `target.ts`
  (alongside the existing `ARGOS_TOKEN` fallback).
- `ARGOS_ACCOUNT` for `create-project` is resolved in the command.
- Load `threshold` in `readConfig` so `ARGOS_THRESHOLD` (and `--threshold`)
  are honored again — it was in the schema but missing from the load block.

Env vars for the upload/finalize/skip/deploy paths were already handled by
core `readConfig`.

Resolves ARG-456

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gregberge gregberge force-pushed the cli/create-project-drop-env-bindings branch from 99d7105 to 6ce6e01 Compare July 10, 2026 21:11
@gregberge gregberge merged commit 528339f into main Jul 10, 2026
61 of 62 checks passed
@gregberge gregberge deleted the cli/create-project-drop-env-bindings branch July 10, 2026 21:13
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