Skip to content

org Command

Every CLI command runs against one organization. The active organization is set by pakyas login and changed with pakyas org switch. Use the global --org flag or PAKYAS_ORG to target another organization for a single command.

Terminal window
pakyas org list
+-----------+--------------------------------------+--------+--------+
| NAME | ID | ROLE | ACTIVE |
+-----------+--------------------------------------+--------+--------+
| Acme Corp | 3f2b8c1e-7d4a-4e1b-9c3f-2a6d8e5b1c74 | owner | * |
| Side Gig | a8d1e2f3-4b5c-4d6e-8f70-1a2b3c4d5e6f | member | |
+-----------+--------------------------------------+--------+--------+

With --format json|ndjson|yaml, each row has name, id, role, and active ("*" for the active organization).

Terminal window
pakyas org switch <NAME> [--no-prompt]
Argument / FlagDescription
<NAME>Organization name (case-insensitive) or ID. Quote names with spaces.
--no-promptFail instead of prompting when no API key is stored for the organization (for scripts)

API keys belong to one organization, so the CLI stores one key per organization in credentials.json. When you switch to an organization that has no stored key, it asks how to get one:

  • create a new key in the browser,
  • paste an existing key (it is checked against the server; if it belongs to a different organization, you can switch there instead),
  • or cancel.

With --no-prompt, it fails with No API key for organization '<ID>' instead. Store a key first with pakyas auth key set.

After switching, the default project is set to the first project of the new organization. Use pakyas project default to pick another.

Terminal window
pakyas org switch "Acme Corp"
pakyas org switch 3f2b8c1e-7d4a-4e1b-9c3f-2a6d8e5b1c74 --no-prompt
Terminal window
pakyas --org "Side Gig" check list
pakyas check list --org a8d1e2f3-4b5c-4d6e-8f70-1a2b3c4d5e6f
PAKYAS_ORG="Side Gig" pakyas project list

--org accepts an ID or a name. A name costs one API request to look up; an ID does not. The command authenticates with PAKYAS_API_KEY if it is set, otherwise with the key stored for that organization.

If no organization is configured at all (for example a CI job with only PAKYAS_API_KEY), the CLI uses the organization the API key belongs to.