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¶
List Target Roots¶
Show cached target roots for current environment.
Sync Target Roots¶
Fetch latest target roots from server.
Environment Variables¶
All CLI behavior can be overridden with environment variables:
| Variable | Description |
|---|---|
STARDAG_PROFILE |
Active profile name |
STARDAG_REGISTRY_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_ROOT__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