Get started with the CLI
Install pf, authenticate, select a workspace, and run the first command.
Install pf
Install globally with npm. Node.js 22.12 or newer is required.
npm install -g pfeed-cliOr run a command directly with npx:
npx pfeed-cli projects listQuick start
- 1.
Install
Run
npm install -g pfeed-cli. - 2.
Sign in
Create an API key, then run
pf auth loginand paste it at the prompt. The prompt keeps the key out of shell history. To skip the prompt, setPROJECT_FEED_API_KEYor pipe the key topf auth login --with-token. In an interactive terminal,pf quickstartruns a guided setup. See Authentication. - 3.
Choose a workspace
A workspace API key is tied to one workspace. A personal API token works across your workspaces, so commands need a workspace target. Pass
--workspace <slug>, setPROJECT_FEED_WORKSPACE, link a directory withpf link, or runpf config set defaultWorkspace <slug>. See Configuration and profiles. - 4.
Run a first command
Run
pf projects listto confirm the key and workspace work, then find commands in the command reference.
npm install -g pfeed-cli
pf auth login
export PROJECT_FEED_WORKSPACE=<workspace-slug>
pf projects listVerify the installation and context
pf --version
pf auth status
pf auth check
pf workspace list
pf workspace current
pf projects list- Confirm the installed version runs under Node.js 22.12 or newer.
pf auth statusshows where the selected key came from.pf auth checkvalidates it against Project Feed.pf workspace listlists available workspaces.pf workspace currentconfirms the slug used by workspace-scoped commands.- Run one read-only resource command before creating, editing, or deleting work.
Core concepts
Commands follow a resource action pattern, similar to the GitHub CLI:
pf projects list
pf tasks create --project <project-id> --title "Fix login bug" --priority high
pf posts view 3
pf notifications unread-countAdd --help to any command, such as pf tasks list --help. The most-used commands end their help with examples, and every command ends with a link to its docs page.
Interactive selection
When you run a view or edit command in a terminal without an ID, you get an interactive picker:
pf tasks view # pick from a list
pf posts edit # pick, then editKnow which workspace and project a command uses
- API key
- --api-key overrides PROJECT_FEED_API_KEY, which overrides the active profile. A .env value is treated as PROJECT_FEED_API_KEY and can shadow a selected profile.
- Workspace
- --workspace overrides PROJECT_FEED_WORKSPACE, a linked-directory workspace, and the profile default. With --api-key, only --workspace applies. When no workspace is configured, workspace commands infer it only if the key can access exactly one workspace.
- Project
- --project overrides PROJECT_FEED_PROJECT, a .pf/config.json directory link, and the profile defaultProject value.
- Profile
- --profile selects a profile for the command. Environment credentials still outrank credentials stored in that profile.
Run pf auth status, pf workspace current, and pf config list when a command appears to target the wrong account or workspace.
Fix setup problems
- pf is not found
- Confirm the global npm bin directory is on PATH, or run the same command through npx pfeed-cli. Check pf --version after changing PATH.
- No API key is found
- Run pf auth login, set PROJECT_FEED_API_KEY for the process, or select the profile that contains the intended credential. Use pf auth status to confirm the source.
- Authentication returns 401 or 403
- Run pf auth check. For 401, replace an expired, revoked, or malformed key. For 403, inspect effective scopes, workspace access, workspace policy, membership, and the requested resource.
- Multiple workspaces are available
- A personal token can reach several workspaces. Pass --workspace for one command or set defaultWorkspace in the active profile. Run pf workspace list before choosing the slug.
- The wrong profile or project is used
- Check environment variables, .env, --profile, pf workspace current, directory links, and profile defaults in precedence order. Use explicit flags while correcting stored configuration.
- The wrong API endpoint is used
- Set PROJECT_FEED_API_URL in the shell or the current directory's .env, including /api/v1. The shell value takes precedence. A .env value must be a projectfeed.app HTTPS URL or a localhost URL. Without an override, the CLI uses https://projectfeed.app/api/v1.