CLI Reference¶
Complete reference for Stardag CLI commands.
Installation¶
Global Commands¶
Version¶
Show SDK version.
Authentication Commands¶
Login¶
Opens browser for OAuth authentication.
Options:
--registry NAME- Target registry (default: from active profile)
Status¶
Show current authentication status.
Refresh¶
Refresh access token for current profile.
Logout¶
Clear stored credentials.
Configuration Commands¶
Show Configuration¶
Display current configuration and context.
Registry Management¶
List Registries¶
Add Registry¶
Example:
Remove Registry¶
Profile Management¶
List Profiles¶
Add Profile¶
Options:
-r, --registry- Registry name-u, --user- User email-w, --workspace- Workspace slug (team/company)-e, --environment- Environment slug (project/stage)-d, --default- Set as default profile
Example:
Use Profile¶
Set the default profile (also refreshes access token).
Remove Profile¶
Workspace & Environment Commands¶
List Workspaces¶
List workspaces you have access to.
List Environments¶
List environments in the active workspace.
Target Root Commands¶
Target roots are managed under stardag environment target-roots. Changes are automatically synced to the local cache.
See stardag environment target-roots --help for full options (e.g. --env to target a specific environment).
Concurrency Limit Commands¶
Named concurrency limits cap how many tasks tagged with a given key may run
concurrently across all builds in an environment. The SDK tags tasks with keys;
the cap lives server-side in the registry and is enforced atomically when a task
starts. Manage them with stardag concurrency-limits (or in the registry UI:
workspace admin → Concurrency Limits).
All commands accept -p/--stardag-profile and -e/--stardag-env to target a
profile / environment other than the active one.
list— show each key and itsmax_concurrent(--holdersadds the current holder count, one extra call per key).set— create or update a limit (upsert;max_concurrentmust be ≥ 1).delete— remove a limit so the key becomes unlimited.holders— list the RUNNING tasks currently holding slots of a key (oldest-running first), with task id/name, running-since and executor.evict— recordTASK_FAILEDfor a RUNNING holder to free leaked slots. Only evict holders whose process you know is dead: the server cannot verify liveness, so evicting a live worker leaves the cap oversubscribed until it finishes.
See stardag concurrency-limits --help for full options.
Environment Variables¶
All CLI behavior can be overridden with environment variables:
| Variable | Description |
|---|---|
STARDAG_PROFILE |
Active profile name |
STARDAG_API_URL |
Registry API URL |
STARDAG_API_KEY |
API key (bypasses OAuth) |
STARDAG_WORKSPACE_ID |
Workspace UUID |
STARDAG_ENVIRONMENT_ID |
Environment UUID |
STARDAG_TARGET_ROOTS |
JSON string of target roots |
STARDAG_TARGET_ROOTS__NAME |
Specific target root override |
Common Workflows¶
Initial Setup¶
# Add registry
uv run stardag config registry add local --url http://localhost:8000
# Login
uv run stardag auth login --registry local
# Create profile
uv run stardag config profile add dev \
-r local \
-u me@example.com \
-w my-workspace \
-e development \
--default
# Verify
uv run stardag config show
Switch Environments¶
# Create multiple profiles
stardag config profile add dev -r local -u me@example.com -w my-workspace -e dev
stardag config profile add prod -r central -u me@company.com -w my-company -e prod
# Switch between them
stardag config profile use dev
stardag config profile use prod
# Or use environment variable
export STARDAG_PROFILE=prod
# Create multiple profiles
uv run stardag config profile add dev -r local -u me@example.com -w my-workspace -e dev
uv run stardag config profile add prod -r central -u me@company.com -w my-company -e prod
# Switch between them
uv run stardag config profile use dev
uv run stardag config profile use prod
# Or use environment variable
export STARDAG_PROFILE=prod