Skip to content

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

Commands

pf chat roomsList the rooms you can open. Archived rooms are left out unless you ask for them.

alias: pf ch rooms

Options

  • --projectstring

    Only this project's room, by ID or slug

  • --archivedboolean

    List archived rooms instead of active ones

  • --limitnumber

    Page size, 1 to 100

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf chat rooms --json
pf chat rooms --project launch
pf chat rooms --archived --limit 20
pf chat openOpen the Workspace room, or a project's room

Options

  • --projectstring

    Project ID

Example

Shell
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

  • --projectstring

    Only this project's discussions, by ID or slug. Without a room only.

  • --statusstring

    open or resolved

  • --pinnedboolean

    Only pinned discussions

  • --followingboolean

    Only discussions you follow. With a room only.

  • --limitnumber

    Page size, 1 to 100

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf chat threads <room-id> --status open --following
pf chat threads --project launch --status open
pf chat thread <roomId> <threadId>View a discussion

Example

Shell
pf chat thread <room-id> <thread-id>
pf chat start <roomId>Start a discussion

Options

  • --contentstring

    Message text, 4,000 characters or less. Optional when you attach files.

  • --formatstring

    plaintext or markdown. Omit it to keep @username mentions.

  • --titlestring

    Discussion title, 200 characters or less

  • --linkstring

    Item to link as type:id, where type is post, task, canvas, doc, or project. Repeat for more.

  • --filestring

    Attach a file. Repeat for up to 10 files. They upload before the message is sent, so it appears with all of them.

  • --idempotency-keystring

    Retry key, so a repeated command does not post twice

Example

Shell
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.png
pf chat rename <roomId> <threadId>Rename a discussion

Options

  • --titlestringrequired

    New title

Example

Shell
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

  • --reopenboolean

    Reopen instead

Example

Shell
pf chat resolve <room-id> <thread-id>
pf chat pin <roomId> <threadId>Pin a discussion. Owners and admins only.

Options

  • --unpinboolean

    Unpin instead

Example

Shell
pf chat pin <room-id> <thread-id>
pf chat follow <roomId> <threadId>Follow a discussion

Options

  • --offboolean

    Stop following instead

  • --muteboolean

    Mute the discussion instead. Cannot be used with --off.

Example

Shell
pf chat follow <room-id> <thread-id> --mute
pf chat messages <roomId>List messages, oldest to newest within a page

Options

  • --threadstring

    Only this discussion

  • --limitnumber

    Page size, 1 to 100

  • --cursorstring

    Message ID to page from

  • --newerboolean

    Read messages after --cursor instead of before it

Example

Shell
pf chat messages <room-id> --thread <thread-id>
pf chat messages <room-id> --cursor <message-id> --newer --json
pf chat search <query...>Search the messages in rooms you can open

Options

  • --roomstring

    Only this room

  • --limitnumber

    Page size, 1 to 50 (default 20)

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf chat search "release plan"
pf chat search build --room <room-id> --limit 10
pf chat attachments <roomId> <threadId>List the files shared in a discussion, newest first

Options

  • --limitnumber

    Page size, 1 to 100

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf chat attachments <room-id> <thread-id> --json
pf 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

  • --throughnumber

    Read only through the message with this threadSequence. A read position never moves back.

Example

Shell
pf chat read <room-id> <thread-id>
pf chat read <room-id> <thread-id> --through 12
pf chat send <roomId> <threadId>Reply in a discussion

Options

  • --contentstring

    Message text, 4,000 characters or less. Optional when you attach files.

  • --formatstring

    plaintext or markdown. Omit it to keep @username mentions.

  • --linkstring

    Item to link as type:id, where type is post, task, canvas, doc, or project. Repeat for more.

  • --filestring

    Attach a file. Repeat for up to 10 files. They upload before the message is sent, so it appears with all of them.

  • --reply-tostring

    Message to reply to. Only discussions that mirror comments nest replies; others ignore it.

  • --idempotency-keystring

    Retry key, so a repeated command does not post twice

Example

Shell
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.log
pf chat message <roomId> <messageId>View a message

Example

Shell
pf chat message <room-id> <message-id>
pf chat edit <roomId> <messageId>Edit a message you wrote

Options

  • --contentstringrequired

    Message text, 4,000 characters or less

  • --formatstring

    plaintext or markdown. Omit it to keep @username mentions.

Example

Shell
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

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Show what would be deleted

Example

Shell
pf chat delete <room-id> <message-id> --confirm
pf chat react <roomId> <messageId> <emoji>Toggle your reaction on a message

Example

Shell
pf chat react <room-id> <message-id> 🎉
pf chat reactions <roomId> <messageId>List reaction counts on a message

Example

Shell
pf chat reactions <room-id> <message-id>
pf chat discussions <type> <id>List the discussions about a post, task, canvas, doc, or project

Options

  • --limitnumber

    Page size, 1 to 50

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf chat discussions task <task-id>
pf chat discuss <type> <id>Start a discussion about an item, the same as Discuss in Chat

Options

  • --contentstringrequired

    Message text, 4,000 characters or less

  • --formatstring

    plaintext or markdown. Omit it to keep @username mentions.

  • --titlestring

    Discussion title

  • --labelstring

    Label shown for the item

  • --idempotency-keystring

    Retry key, so a repeated command does not post twice

Example

Shell
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

Shell
pf chat links <room-id> <thread-id>
pf chat link <roomId> <threadId> <type> <id>Link an item to a discussion

Options

  • --labelstring

    Label shown for the item

Example

Shell
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

Shell
pf chat unlink <room-id> <thread-id> <link-id>
pf chat agentsList the chat agents. Shows active agents unless you pass --status.

Options

  • --statusstring

    active (default), disabled, or all. disabled and all need an owner or admin.

Example

Shell
pf chat agents
pf chat agents --status all --json
pf chat agent-create <name>Create a chat agent. Owners and admins only.

Options

  • --handlestringrequired

    Mention handle, 2 to 31 lowercase letters, digits, hyphens, or underscores. It cannot change later.

  • --scopestringrequired

    workspace or selected_projects

  • --capabilitiesstringrequired

    Comma-separated: reply, summarize, draft_feed

  • --projectsstring

    Comma-separated project IDs or slugs. Required for selected_projects.

  • --descriptionstring

    Description, up to 500 characters

  • --instructionsstring

    Instructions, up to 8,000 characters

  • --idempotency-keystring

    Retry key, so a repeated command does not post twice

Example

Shell
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_feed
pf chat agent-update <agentId>Change a chat agent. Owners and admins only. Pass at least one option.

Options

  • --namestring

    New name, up to 80 characters

  • --descriptionstring

    New description. Use --no-description to clear it.

  • --statusstring

    active or disabled

  • --scopestring

    workspace or selected_projects

  • --projectsstring

    Comma-separated project IDs or slugs

  • --capabilitiesstring

    Comma-separated: reply, summarize, draft_feed

  • --instructionsstring

    New instructions. Use --no-instructions to clear them.

  • --expected-updated-atnumber

    Fail with 412 if the agent changed since this updatedAt

Example

Shell
pf chat agent-update <agent-id> --status disabled
pf chat agent-update <agent-id> --capabilities reply,summarize --no-instructions

Follow up on a task in Chat

  1. 1.

    Look for an existing discussion

    Check whether the task already has one with pf chat discussions task.

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

    Resolve it

    Resolve the discussion when the question is answered.

Shell
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 rooms to 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.

Next steps

Image preview
100%