Skip to main content

astroctl organization

Manage organizations

Synopsis​

Manage organizations, members, and permissions.

Terminal
astroctl organization [flags]

Examples​

Terminal

# Create an organization
astroctl organization create --name "test-org"

# Get all the organizations
astroctl organization get

# Get an organization by ID
astroctl organization get --org-id 9b2d4c1e-5a6f-4b3c-8d7e-1f0a2b3c4d5e

# List all the organizations for the user
astroctl organization list

# List all organizations in the system (super-admin only)
astroctl organization list --all

# Add a user to the active organization as an editor
astroctl organization add-user --user-id 3f1c2a9e-7b4d-4e2a-9c61-0d5e8f7a1b23 --role Editor

# Change a member's role
astroctl organization set-role --user-id 3f1c2a9e-7b4d-4e2a-9c61-0d5e8f7a1b23 --role Admin

# Make another member the owner of the active organization
astroctl organization transfer-owner --user-id 3f1c2a9e-7b4d-4e2a-9c61-0d5e8f7a1b23

# Remove a user from an organization
astroctl organization remove-user --org-id 9b2d4c1e-5a6f-4b3c-8d7e-1f0a2b3c4d5e --user-id 3f1c2a9e-7b4d-4e2a-9c61-0d5e8f7a1b23

# Create a service account for automation and issue it a key
astroctl organization service-account create --name ci --role Editor
astroctl organization service-account keys create ci

# Using short alias
astroctl org get

Options​

Terminal
-h, --help help for organization

Options inherited from parent commands​

Terminal
-o, --output string Output format (table|json|yaml) (default "table")

SEE ALSO​