Chat
Read and post in Chat rooms and discussions from the terminal. The commands use the Chat API and need an API key with chat scopes. Alias: pf ch
- Beta
- WhoOwners, admins, and members to post. Viewers can read.
- Scopeschat:read, chat:write
Commands
pf chat roomsList the rooms you can open. Archived rooms are left out unless you ask for them.
alias: pf ch rooms
Options
--projectstringOnly this project's room, by ID or slug
--archivedbooleanList archived rooms instead of active ones
--limitnumberPage size, 1 to 100
--cursorstringCursor from the previous page
Example
pf chat rooms --json
pf chat rooms --project launch
pf chat rooms --archived --limit 20pf chat openOpen the Workspace room, or a project's room
Options
--projectstringProject ID
Example
pf chat open --project <project-id>pf chat threads [roomId]List discussions in a room, or across all of your rooms when you leave the room out. Most recent activity first.
Options
--projectstringOnly this project's discussions, by ID or slug. Without a room only.
--statusstringopen or resolved
--pinnedbooleanOnly pinned discussions
--followingbooleanOnly discussions you follow. With a room only.
--limitnumberPage size, 1 to 100
--cursorstringCursor from the previous page
Example
pf chat threads <room-id> --status open --following
pf chat threads --project launch --status openpf chat thread <roomId> <threadId>View a discussion
Example
pf chat thread <room-id> <thread-id>pf chat start <roomId>Start a discussion
Options
--contentstringMessage text, 4,000 characters or less. Optional when you attach files.
--formatstringplaintext or markdown. Omit it to keep @username mentions.
--titlestringDiscussion title, 200 characters or less
--linkstringItem to link as type:id, where type is post, task, canvas, doc, or project. Repeat for more.
--filestringAttach a file. Repeat for up to 10 files. They upload before the message is sent, so it appears with all of them.
--idempotency-keystringRetry key, so a repeated command does not post twice
Example
pf chat start <room-id> --title "Release plan" --content "Build 214 is ready for QA." --link task:<task-id>
pf chat start <room-id> --title "Build 214" --content "Screenshots from QA." --file day.png --file night.pngpf chat rename <roomId> <threadId>Rename a discussion
Options
--titlestringrequiredNew title
Example
pf chat rename <room-id> <thread-id> --title "Release plan, week 2"pf chat resolve <roomId> <threadId>Resolve a discussion. The author and workspace owners and admins can do this.
Options
--reopenbooleanReopen instead
Example
pf chat resolve <room-id> <thread-id>pf chat pin <roomId> <threadId>Pin a discussion. Owners and admins only.
Options
--unpinbooleanUnpin instead
Example
pf chat pin <room-id> <thread-id>pf chat follow <roomId> <threadId>Follow a discussion
Options
--offbooleanStop following instead
--mutebooleanMute the discussion instead. Cannot be used with --off.
Example
pf chat follow <room-id> <thread-id> --mutepf chat messages <roomId>List messages, oldest to newest within a page
Options
--threadstringOnly this discussion
--limitnumberPage size, 1 to 100
--cursorstringMessage ID to page from
--newerbooleanRead messages after --cursor instead of before it
Example
pf chat messages <room-id> --thread <thread-id>
pf chat messages <room-id> --cursor <message-id> --newer --jsonpf chat search <query...>Search the messages in rooms you can open
Options
--roomstringOnly this room
--limitnumberPage size, 1 to 50 (default 20)
--cursorstringCursor from the previous page
Example
pf chat search "release plan"
pf chat search build --room <room-id> --limit 10pf chat attachments <roomId> <threadId>List the files shared in a discussion, newest first
Options
--limitnumberPage size, 1 to 100
--cursorstringCursor from the previous page
Example
pf chat attachments <room-id> <thread-id> --jsonpf chat read <roomId> <threadId>Mark a discussion read and clear its unread notifications. Needs chat:read and either chat:write or notifications:write, so a viewer key with chat:read and notifications:write can use it.
Options
--throughnumberRead only through the message with this threadSequence. A read position never moves back.
Example
pf chat read <room-id> <thread-id>
pf chat read <room-id> <thread-id> --through 12pf chat send <roomId> <threadId>Reply in a discussion
Options
--contentstringMessage text, 4,000 characters or less. Optional when you attach files.
--formatstringplaintext or markdown. Omit it to keep @username mentions.
--linkstringItem to link as type:id, where type is post, task, canvas, doc, or project. Repeat for more.
--filestringAttach a file. Repeat for up to 10 files. They upload before the message is sent, so it appears with all of them.
--reply-tostringMessage to reply to. Only discussions that mirror comments nest replies; others ignore it.
--idempotency-keystringRetry key, so a repeated command does not post twice
Example
pf chat send <room-id> <thread-id> --content "Fixed in build 215." --link post:<post-id>
pf chat send <room-id> <thread-id> --file crash.logpf chat message <roomId> <messageId>View a message
Example
pf chat message <room-id> <message-id>pf chat edit <roomId> <messageId>Edit a message you wrote
Options
--contentstringrequiredMessage text, 4,000 characters or less
--formatstringplaintext or markdown. Omit it to keep @username mentions.
Example
pf chat edit <room-id> <message-id> --content "Fixed in build 216."pf chat delete <roomId> <messageId>Delete a message. Owners and admins can delete anyone's message.
alias: pf ch rm
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanShow what would be deleted
Example
pf chat delete <room-id> <message-id> --confirmpf chat react <roomId> <messageId> <emoji>Toggle your reaction on a message
Example
pf chat react <room-id> <message-id> 🎉pf chat reactions <roomId> <messageId>List reaction counts on a message
Example
pf chat reactions <room-id> <message-id>pf chat discussions <type> <id>List the discussions about a post, task, canvas, doc, or project
Options
--limitnumberPage size, 1 to 50
--cursorstringCursor from the previous page
Example
pf chat discussions task <task-id>pf chat discuss <type> <id>Start a discussion about an item, the same as Discuss in Chat
Options
--contentstringrequiredMessage text, 4,000 characters or less
--formatstringplaintext or markdown. Omit it to keep @username mentions.
--titlestringDiscussion title
--labelstringLabel shown for the item
--idempotency-keystringRetry key, so a repeated command does not post twice
Example
pf chat discuss post <post-id> --content "Can we ship this on Friday?"pf chat links <roomId> <threadId>List the items linked to a discussion
Example
pf chat links <room-id> <thread-id>pf chat link <roomId> <threadId> <type> <id>Link an item to a discussion
Options
--labelstringLabel shown for the item
Example
pf chat link <room-id> <thread-id> doc <doc-id>pf chat unlink <roomId> <threadId> <linkId>Remove a linked item. The item a discussion started from stays linked.
Example
pf chat unlink <room-id> <thread-id> <link-id>pf chat agentsList the chat agents. Shows active agents unless you pass --status.
Options
--statusstringactive (default), disabled, or all. disabled and all need an owner or admin.
Example
pf chat agents
pf chat agents --status all --jsonpf chat agent-create <name>Create a chat agent. Owners and admins only.
Options
--handlestringrequiredMention handle, 2 to 31 lowercase letters, digits, hyphens, or underscores. It cannot change later.
--scopestringrequiredworkspace or selected_projects
--capabilitiesstringrequiredComma-separated: reply, summarize, draft_feed
--projectsstringComma-separated project IDs or slugs. Required for selected_projects.
--descriptionstringDescription, up to 500 characters
--instructionsstringInstructions, up to 8,000 characters
--idempotency-keystringRetry key, so a repeated command does not post twice
Example
pf chat agent-create "Release bot" --handle release --scope workspace --capabilities reply
pf chat agent-create "Launch digest" --handle launch-digest --scope selected_projects --projects launch --capabilities summarize,draft_feedpf chat agent-update <agentId>Change a chat agent. Owners and admins only. Pass at least one option.
Options
--namestringNew name, up to 80 characters
--descriptionstringNew description. Use --no-description to clear it.
--statusstringactive or disabled
--scopestringworkspace or selected_projects
--projectsstringComma-separated project IDs or slugs
--capabilitiesstringComma-separated: reply, summarize, draft_feed
--instructionsstringNew instructions. Use --no-instructions to clear them.
--expected-updated-atnumberFail with 412 if the agent changed since this updatedAt
Example
pf chat agent-update <agent-id> --status disabled
pf chat agent-update <agent-id> --capabilities reply,summarize --no-instructionsFollow up on a task in Chat
- 1.
Look for an existing discussion
Check whether the task already has one with
pf chat discussions task. - 2.
Reply or start one
Reply in that discussion, or start one with
pf chat discuss. A new discussion opens in the task's project room. - 3.
Resolve it
Resolve the discussion when the question is answered.
pf chat discussions task <task-id> --json
pf chat discuss task <task-id> --content "Is the login fix in build 214?" --json
pf chat send <room-id> <thread-id> --content "Yes, it shipped this morning."
pf chat resolve <room-id> <thread-id>Access
Commands act as the key's owner and show only the rooms that person can open. Reading needs chat:read and posting needs chat:write. Reactions also need reactions:read or reactions:write. pf chat follow and pf chat read change only your own state and accept notifications:write in place of chat:write, so viewers can use them. They still need chat:read. Creating and changing agents, and listing disabled ones, are for workspace owners and admins.
Fix Chat problems
- A room or discussion is not found
- You can only see rooms you can open, and a room or discussion you cannot open is reported as not found. Run
pf chat roomsto list the rooms you can open, then copy the IDs from that output. - Every command fails with a permission error
- Chat may be turned off for the workspace. An owner or admin can turn it on in workspace Settings, General, under Features. Otherwise check that the key has chat:read and, for posting, chat:write.
- A message is rejected
- Keep message text to 4,000 characters or less. Pass --idempotency-key when retrying a send so it does not post twice.