View Teams
The stackgen team
command retrieves teams within your StackGen organisation. It supports subcommands to list the teams available to the authenticated user.
Usage
stackgen team list
Lists all teams accessible to the currently authenticated user.
Use this command when:
- You need to reference team UUIDs in scripts or automation pipelines.
- You're deploying infra (e.g., Terraform modules) across teams.
- You want a CLI-based alternative to viewing team membership in the UI.
Role-Based Behavior
Admin users: Returns all teams within the org.
Developer users: Returns only the teams the user is a member of.
Flags
Flag | Description |
---|---|
-h , --help | Help for the team list command |
-i , --interactive | Run CLI in interactive mode |
--log int | Set log level: 2 = DEBUG, 3 = INFO (default), 4 = WARN, 5 = ERROR |
-o , --output | Set output format: json, human, or raw (default: human) |
--team string | Specify the UUID of a team (optional; used in other commands) |
Example
stackgen team list --output json
Sample Outputs
Output for Admins
[
{
"name": "Platform Engineering",
"uuid": "team-abc123"
},
{
"name": "DevOps Team",
"uuid": "team-def456"
}
]
Output for Developers
[
{
"name": "DevOps Team",
"uuid": "team-def456"
}
]