Skip to content

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-tokenboolean

    Read the key from standard input. Use it in scripts and CI so the key stays out of shell history and process listings.

  • --tokenstring

    Provide 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.

  • --workspacestring

    Store the key for one workspace override

Example

Shell
pf auth login
pf auth login --workspace studio
echo "$PF_KEY" | pf auth login --with-token
pf 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

  • --workspacestring

    Remove the key from one workspace override

  • --confirmboolean

    Skip the confirmation prompt. Required when there is no terminal or --no-input is set; without it the command exits with code 2.

Example

Shell
pf auth logout
pf auth logout --workspace studio --confirm
pf 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

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf auth revoke --dry-run
pf auth revoke --confirm
pf auth statusShow current authentication status. It exits with code 1 when no key is configured.

Options

  • --workspacestring

    Inspect the key selected for one workspace override

  • --checkboolean

    Also verify the key against Project Feed

Example

Shell
pf auth status
pf auth status --check
pf auth status --profile work --workspace studio
pf auth tokenPrint the API key in use so another tool can read it. Treat the output as a secret.

Options

  • --workspacestring

    Print the key for one workspace override

Example

Shell
pf auth token
curl -H "Authorization: Bearer $(pf auth token)" https://projectfeed.app/api/v1/auth/check
pf auth checkValidate the selected key against Project Feed and show its source, user ID, scope, audience, expiration, effective permissions, workspace, and API version.

Example

Shell
pf auth check
pf auth check --json

Authenticate safely

  1. 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. 2.

    Sign in

    Run pf auth login interactively. In automation, provide PROJECT_FEED_API_KEY through a protected secret, or pipe the key to pf auth login --with-token, rather than passing it as an argument.

  3. 3.

    Check the credential

    Run pf auth status to inspect the credential source, then pf auth check to verify its effective access against the server.

  4. 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.

Next steps

Image preview
100%