Command overview
OAuth clients
OAuth applications the organization owns, and their secrets.
Payment method
The card on file for the organization.
Select an organization
Organization-scoped commands resolve the organization in this order:- The global
--org <organization-id>flag, for that invocation only. - A non-empty
PHOTON_ORGANIZATION_IDenvironment variable. - The organization of the project in the folder’s
.photon/project.json. - The organization you stored with
photon org use. - The organization your account belongs to, when it belongs to exactly one.
ORGANIZATION_NOT_SELECTED and exit 2; run photon org list, then
photon org use <organization-id>.
--org, project create included, it names the organization and where it
came from on stderr, for example
Organization: pho_org_01k9yq3m7d2c8x4v6b5n0p1r2s, from your only organization or
Organization: pho_org_01k9yq3m7d2c8x4v6b5n0p1r2s, from /srv/support-bot/.photon/project.json.
A command that knows its organization before it asks for confirmation prints
the line before the question, --org included.
org show reports the source as flag, environment, folder (with the
file’s path), stored, or default. org use reads the organization
before storing it, so you can never make an inaccessible ID active. With
--json, both print the organization as the API returns it under
organization, beside source. org use and org clear warn you when
PHOTON_ORGANIZATION_ID or the folder’s project still selects another
organization.
org list marks the active organization and the ones you own. With --json,
it prints the API’s response, where ownedOrganizationIds lists the ones you
own, and adds the active organization’s ID as activeOrganizationId. When no
organization can be selected, nothing is marked active and
activeOrganizationId is left out:
org list still works, and org use or org clear
replaces it.
These commands use the selected organization:
photon project list,project count, andproject createphoton org member,org invitation,org leave,org oauth-client, andorg billing
project view or
project billing plan purchase, use the project’s own organization.
Members
member or viewer. member edit can set admin,
member, or viewer; ownership is not changed through these commands.
Membership changes are guarded by the member’s current version. The CLI reads
it before edit, remove, and leave, and records it with the operation, so
a replay sends the same request. If the membership changed
in between, Photon rejects the request rather than overwriting the change.
Invitations
member invite sends an invitation. Track and withdraw outstanding invitations
from the invitation namespace:
Accept an invitation
The token is thetoken value in the invitation email’s link (the part after
token=), not the whole link.
Preview and acceptance never accept a token as a command-line argument.
Read it from a file, or pipe it through stdin with --token-file -:
--token-file, the command fails and names the option; it doesn’t
read piped stdin unless you pass -. Token values are trimmed, bounded, and
kept out of output and errors. Acceptance does not need a selected
organization: the token names it.
If acceptance is left unresolved, its journal record keeps the token so a
replay does not have to ask you for it again. See
Recoverable operations.
Leave an organization
org leave removes your own membership from the selected organization:
--json, it prints your membership as the API returns it after the
change, with status removed. Leaving clears the organization if it was
your stored selection.
Moved commands
These commands moved here fromphoton project and photon account. For one
release the old names only print the replacement and exit with code 2; they
do not run it. The replacement keeps the global options you gave (--org,
--project, --json, --debug, --no-color, --no-input), so it acts on
the same organization and project, and leaves out the command’s own options,
so it never carries a --yes.