Skip to main content
⏳ Estimated read time: 2 min read

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

FlagDescription
-h, --helpHelp for the team list command
-i, --interactiveRun CLI in interactive mode
--log intSet log level: 2 = DEBUG, 3 = INFO (default), 4 = WARN, 5 = ERROR
-o, --outputSet output format: json, human, or raw (default: human)
--team stringSpecify 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"
}
]