Skip to content
pi-c Artifact [34577a813c]
Login

Artifact [34577a813c]

Artifact 34577a813c7ba6a44084c2086eead3915e072e8bf126c3e08b10d27067fc7551:


RPC commands

The commands pic --mode rpc reads on stdin, one JSON object per line, with Pi's fields, responses and errors (Pi's docs/rpc.md and docs/rpc-commands.md). How the mode behaves is in RPC mode.

Command What it does
prompt send a message (with images and streamingBehavior)
steer steer the running request
follow_up queue a message for after the running request
abort stop the running request
clear_queue drop queued steering and follow-ups
new_session start a new conversation
get_state the session's state
get_messages the conversation's messages
set_model switch model; applies from the next request
cycle_model the next model
get_available_models models whose provider has a key
set_thinking_level set the thinking level; applies from the next request
cycle_thinking_level the next thinking level
get_available_thinking_levels the model's supported levels
set_steering_mode how steering is delivered
set_follow_up_mode how follow-ups are delivered
compact compact now, outside any request
set_auto_compaction the compaction.enabled setting
set_auto_retry saved as Pi's retry.enabled
abort_retry stop waiting for a retry
bash run a command and journal it
abort_bash stop the running bash command
get_session_stats tokens and cost
export_html the conversation as an HTML page
switch_session continue another conversation: a conversation id, or a file pic export --pi wrote, as sessionPath
fork fork from an entry
clone duplicate the conversation
rewind pic's: entryId (a user message), mode (both, conversation, files), forcePartial; or undo
get_fork_messages the messages a fork can start from
get_entries the conversation's own path
get_tree the conversation's own path, as a tree
get_last_assistant_text the last reply's text
set_session_name name the conversation
get_commands prompt templates and skills
extension_ui_response answered with an error: pic has no extensions
login provider: its subscription sign-in in the browser; messages on stderr, the redirect completes it
logout provider: remove its stored sign-in or key; data.removed
get_credentials pic's: provider (optional); data.credentials, each key's provider, label, kind, active, state (ok, invalid, credit, limited, unknown) and, when known, status, until, checked, reason; never a value
set_credential pic's: provider, label: that key is the provider's active one from the next request
get_auth_status each stored credential's provider, type, label, createdAt, lastUsedAt; never a value