Authentication
Sign in interactively or provide credentials for unattended CLI runs.
Sign in
Sign in with a personal API token or a workspace API key. Interactive login stores the key in the local config file for the selected profile or workspace override.
A workspace key is tied to one workspace. A personal token works across your workspaces, so workspace commands also need a workspace target: --workspace <slug>, the PROJECT_FEED_WORKSPACE environment variable, pf link, or pf config set defaultWorkspace <slug>.
pf auth loginValidate and store a personal API token or workspace API key in the selected profile or workspace override. A personal token still needs a workspace target for workspace commands.
Options
--with-tokenbooleanRead the key from standard input. Use it in scripts and CI so the key stays out of shell history and process listings.
--tokenstringProvide the key as an argument. The key then appears in shell history and process listings, so pf prints a warning. Prefer --with-token, the prompt, or PROJECT_FEED_API_KEY.
--workspacestringStore the key for one workspace override
Example
pf auth login
pf auth login --workspace studio
echo "$PF_KEY" | pf auth login --with-tokenpf auth logoutRemove stored credentials. Without --workspace it removes the profile key and every workspace key, with any renewal data for browser sign-ins. With --workspace it removes only that workspace's. Environment variables are not touched.
Options
--workspacestringRemove the key from one workspace override
--confirmbooleanSkip the confirmation prompt. Required when there is no terminal or --no-input is set; without it the command exits with code 2.
Example
pf auth logout
pf auth logout --workspace studio --confirmpf auth revokeRevoke the API key in use on the server, then remove it from the profile. Requests that use it return 401 afterwards. A key from --api-key or PROJECT_FEED_API_KEY is revoked but stays wherever you set it.
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf auth revoke --dry-run
pf auth revoke --confirmpf auth statusShow current authentication status. It exits with code 1 when no key is configured.
Options
--workspacestringInspect the key selected for one workspace override
--checkbooleanAlso verify the key against Project Feed
Example
pf auth status
pf auth status --check
pf auth status --profile work --workspace studiopf auth tokenPrint the API key in use so another tool can read it. Treat the output as a secret.
Options
--workspacestringPrint the key for one workspace override
Example
pf auth token
curl -H "Authorization: Bearer $(pf auth token)" https://projectfeed.app/api/v1/auth/checkpf auth checkValidate the selected key against Project Feed and show its source, user ID, scope, audience, expiration, effective permissions, workspace, and API version.
Example
pf auth check
pf auth check --jsonAuthenticate safely
- 1.
Create a credential
Create a personal API token for your own terminal use or a service account for unattended automation. Grant only the required scopes.
- 2.
Sign in
Run
pf auth logininteractively. In automation, provide PROJECT_FEED_API_KEY through a protected secret, or pipe the key topf auth login --with-token, rather than passing it as an argument. - 3.
Check the credential
Run
pf auth statusto inspect the credential source, thenpf auth checkto verify its effective access against the server. - 4.
Run a read-only command
Run one read-only command in the intended workspace before making a change.
Credential precedence is --api-key, PROJECT_FEED_API_KEY from the process or local .env file, then the workspace or profile key in the config file. An environment value can override a key stored in a profile selected with --profile.
Fix sign-in problems
- The wrong key is selected
- Run pf auth status and pf config get apiKey --source. Remove or change PROJECT_FEED_API_KEY when it shadows the intended profile, then run pf auth check again.
- A personal token reports a missing workspace
- Pass --workspace <slug> or set PROJECT_FEED_WORKSPACE, or set defaultWorkspace in the profile. Run pf workspace list to find the slug.