CLI Reference

The plexi CLI is the primary way to interact with a running Plexi instance from the terminal, and to manage workspaces and apps from outside the UI.

All commands work identically across build channels (plexi, plexi-alpha, plexi-beta). When run inside a Plexi pane, PLEXI_SOCKET routes host commands to the correct running instance automatically.

plexi run

Run a named command from your project’s .plexi/commands.toml file.

Define shell commands in .plexi/commands.toml and run them by name here. Any secrets listed in the command definition are injected as environment variables automatically.

Example: plexi run dev

Flag / ArgTypeRequiredDescription
<command>stringnoCommand name to run (omit to list available commands)
<extra_args>string (repeatable)noExtra arguments forwarded to the command as $1, $2, … positional params

plexi workspace

Set up a .plexi/ workspace in your project folder.

Run this once inside your project directory to enable workspace-scoped secrets and commands.

SubcommandDescription
initSet up a .plexi/ workspace in the current directory
cleanRemove pane slot files for panes that are no longer open

plexi workspace init

Set up a .plexi/ workspace in the current directory.

Run this once inside your project folder. It creates a .plexi/workspace.toml so that secrets and commands are scoped to this project.

plexi workspace clean

Remove pane slot files for panes that are no longer open

Flag / ArgTypeRequiredDescription
--dry-runflagnoPrint slot directories that would be removed without deleting them

plexi secret

Store and retrieve secrets (API keys, passwords, tokens) for your project.

Secrets are saved to your system keychain and injected as environment variables when you run commands. Use plexi workspace init first to scope secrets to a project.

SubcommandDescription
setSave a secret to your keychain
getPrint a stored secret’s value to stdout
listShow stored secrets
deleteDelete a stored secret

plexi secret set

Save a secret to your keychain.

Plexi will prompt you to type the value (hidden). The secret is stored in your system keychain and can be injected into commands automatically.

Use —from-env to read the value from an existing environment variable instead of typing it. Use —global to make the secret available across all projects, not just the current one.

Flag / ArgTypeRequiredDescription
<friendly_name>stringyesName for this secret — also the environment variable name it will be injected as
--from-envflagnoRead the value from the environment variable named FRIENDLY_NAME instead of prompting
--globalflagnoStore this secret globally so it’s available in all projects, not just this one
--aliasstringnoUse a different name for the Keychain entry than the canonical env var name. Useful when the Keychain entry already exists under a different name. Example: plexi secret set OPENAI_API_KEY —alias openai_personal

plexi secret get

Print a stored secret’s value to stdout.

Looks up the secret for the current project first, then falls back to the global store. Use —global to read only from the global store.

Flag / ArgTypeRequiredDescription
<friendly_name>stringyesName of the secret to read
--globalflagnoRead from the global store only, skipping the project-level lookup

plexi secret list

Show stored secrets.

Inside a workspace, shows project secrets plus user-scope secrets. Outside a workspace, falls back to user-scope secrets. Use —global to show only user-scope secrets from any directory.

Flag / ArgTypeRequiredDescription
--globalflagnoShow only globally-stored user-scope secrets

plexi secret delete

Delete a stored secret.

Use —global to delete a globally-stored secret (one stored with secret set --global). Without —global, deletes the workspace-scoped entry for the current project.

Flag / ArgTypeRequiredDescription
<friendly_name>stringyes
--globalflagnoDelete from the global store instead of the project-scoped store

plexi routine

Manage workspace routines — scheduled shell commands.

Routines are declared in .plexi/routines.toml and run automatically on schedule. Requires Plexi to be running — there is no background daemon. Routines only fire while the host process is open.

Use plexi routine list to see configured routines, or plexi routine run <name> to fire one manually.

Routine file format (.plexi/routines.toml)

[[routine]]
name      = "morning-sync"
command   = "./scripts/sync.sh"
schedule  = "daily at 09:00"
context   = "work"   # optional: only fires when this context is active
ephemeral = true     # optional: close the spawned pane when the command exits

Schedule formats

FormatExample
every N secondsevery 30 seconds
every N minutesevery 5 minutes
every N hoursevery 2 hours
daily at HH:MMdaily at 09:00
weekly on <day> at HH:MMweekly on monday at 09:00
monthly on N at HH:MMmonthly on 1 at 08:00
5-field cron m h dom mon dow0 9 * * 1-5
SubcommandDescription
listList routines defined in .plexi/routines.toml with their schedule and next fire time
runManually trigger a named routine from .plexi/routines.toml

plexi routine list

List routines defined in .plexi/routines.toml with their schedule and next fire time

plexi routine run

Manually trigger a named routine from .plexi/routines.toml

Flag / ArgTypeRequiredDescription
<name>stringyesName of the routine to run

plexi agent

Manage workspace agent definitions.

Install agent definitions from the global registry (~/.plexi/agents/) into the current workspace’s .plexi/agents/ directory, each with scoped memory and logs.

SubcommandDescription
initScaffold a new agent app with ai.query capability and a chat UI
addInstall an agent definition from the global registry into the current workspace
updateRe-install an agent definition from the global registry, preserving memory and logs
listList agents installed in the current workspace
reportReport agent state for this pane to the host
statusShow current agent state for all panes
hookInstall or uninstall agent hook integrations

plexi agent init

Scaffold a new agent app with ai.query capability and a chat UI.

Creates the app directory, manifest.toml (with ai.query pre-configured), and main.py from the agent template. Equivalent to the former plexi app init --agent <name>.

Example: plexi agent init my-agent

Flag / ArgTypeRequiredDescription
<name>stringyesApp name (used as the directory name and app ID)
--fromstringnoOpen the new pane relative to this pane ID. Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the focused pane

plexi agent add

Install an agent definition from the global registry into the current workspace.

Copies ~/.plexi/agents/<name>/AGENT.md into .plexi/agents/<name>/AGENT.md and creates memory/ and logs/ subdirectories for scoped agent state.

Example: plexi agent add project-manager

Flag / ArgTypeRequiredDescription
<name>stringyesAgent name (must exist in ~/.plexi/agents//AGENT.md)

plexi agent update

Re-install an agent definition from the global registry, preserving memory and logs.

Overwrites .plexi/agents/<name>/AGENT.md with the latest version from the global registry while leaving the memory/ and logs/ directories untouched.

Example: plexi agent update project-manager

Flag / ArgTypeRequiredDescription
<name>stringyesAgent name to update

plexi agent list

List agents installed in the current workspace

plexi agent report

Report agent state for this pane to the host.

Called internally by hook scripts. Requires PLEXI_SOCKET and PLEXI_PANE_ID to be set in the environment.

Example: plexi agent report —state working —agent claude-code

Flag / ArgTypeRequiredDescription
--statestringyesState to report: working, blocked, or idle
--agentstringnoAgent name (e.g. “claude-code”) Default: unknown.
--detailstringnoActive tool detail (optional, from hook event JSON)
--session-idstringnoSession ID (optional, from hook event JSON)

plexi agent status

Show current agent state for all panes.

Queries the host for all panes that have reported agent state via hooks. Formats as a table with pane ID, agent name, state, and session ID.

Example: plexi agent status Example: plexi agent status —blocked

Flag / ArgTypeRequiredDescription
--blockedflagnoShow only blocked panes
--workingflagnoShow only working panes
--idleflagnoShow only idle panes

plexi agent hook

Install or uninstall agent hook integrations.

install: patches the selected agent config with lifecycle hook registrations, routing them to plexi agent report.

uninstall: removes all PLEXI hook entries from the selected agent config.

Example: plexi agent hook install —claude-code Example: plexi agent hook install —codex —pi Example: plexi agent hook uninstall —claude-code

SubcommandDescription
installInstall PLEXI agent-state hook integrations
uninstallRemove PLEXI agent-state hook integrations

plexi agent hook install

Install PLEXI agent-state hook integrations

Flag / ArgTypeRequiredDescription
--claude-codeflagnoInstall Claude Code hooks (PreToolUse, PostToolUse, SessionStart, UserPromptSubmit, PermissionRequest, Stop, StopFailure, SessionEnd)
--codexflagnoInstall Codex hooks (SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, Stop)
--piflagnoInstall Pi extension hooks (session, agent, and tool lifecycle events)

plexi agent hook uninstall

Remove PLEXI agent-state hook integrations

Flag / ArgTypeRequiredDescription
--claude-codeflagnoRemove Claude Code hooks
--codexflagnoRemove Codex hooks
--piflagnoRemove Pi extension hooks

plexi context

Manage the active context (the folder and project scope tied to the current pane)

SubcommandDescription
newOpen a new context with an optional name
openSwitch the current pane to a context at the given path
set-rootChange the root folder for the active context
currentPrint the id and name of the current pane’s context as JSON
describeSet the description for the active context
zoomZoom into a sub-context by its numeric context_id
zoom-outZoom out of the current sub-context to the parent
pushPush a pane into a new sub-context
listList all open contexts as a JSON array

plexi context new

Open a new context with an optional name.

Examples: plexi context new “sprint” # top-level context plexi context new “sprint” —parent # child of current context (no-focus) plexi context new “sprint” —parent=main -d # child of “main”, portal splits below plexi context new “sprint” —parent —window “echo a” —window “echo b”

Flag / ArgTypeRequiredDescription
<name>stringnoName for the new context. Defaults to the directory basename
--pathstringnoRoot path for the new context. Defaults to current working directory
--parentstringnoCreate as a child of a context (the new context is its sub-context). Bare --parent uses the current context (reads PLEXI_CONTEXT_NAME from env); use --parent=<name> to target another context by name
--windowstring (repeatable)noCommand to run in each pre-populated window. Repeatable
--focusflagnoFocus (zoom into) the new sub-context after creation. Default: stay in current pane
--fromstringnoPane to anchor the portal split at (requires —parent). Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the parent context’s focused pane
--down / -dflagnoSplit portal below instead of right (requires —parent)
--left / -lflagnoSplit portal left (requires —parent)
--up / -uflagnoSplit portal above (requires —parent)
--right / -rflagnoSplit portal right — explicit (default, requires —parent)

plexi context open

Switch the current pane to a context at the given path

Flag / ArgTypeRequiredDescription
<path>stringno

plexi context set-root

Change the root folder for the active context

Flag / ArgTypeRequiredDescription
<path>stringno

plexi context current

Print the id and name of the current pane’s context as JSON

plexi context describe

Set the description for the active context

Flag / ArgTypeRequiredDescription
<text>stringyesDescription text

plexi context zoom

Zoom into a sub-context by its numeric context_id

Flag / ArgTypeRequiredDescription
<context_id>stringyes

plexi context zoom-out

Zoom out of the current sub-context to the parent

plexi context push

Push a pane into a new sub-context.

Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the focused pane.

Flag / ArgTypeRequiredDescription
<name>stringnoName for the new sub-context. Defaults to the pane name
--pane-idstringnoPane to push. Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the focused pane

plexi context list

List all open contexts as a JSON array

plexi app

Manage your Plexi apps — open, install, list, scaffold, and inspect

SubcommandDescription
openOpen an app or tool in a new pane
installInstall an app from a local path, a remote source, or a pack file
uninstallRemove an installed app by id
listShow all installed apps with their versions
renderRender an app headlessly (JSON frame tree by default, or PNG with —png)
checkCheck a local app with manifest, scaffold metadata, SDK, and render-size checks
testRun an app’s AppHarness tests with uv run pytest tests/
infoShow details about an installed app: id, name, version, and available tools
initCreate a new app from a template
validateCheck a Plexi app directory or .plexipkg package for errors before publishing or installing
inspectShow the trust sheet for a local app directory or .plexipkg package
packageBuild a distributable .plexipkg package from an app directory
freezeExport your currently installed apps as a single TOML snapshot for sharing or backup
publishValidate, package, and submit an app to the Plexi marketplace
browseBrowse every public app in the hosted marketplace
searchSearch the public marketplace catalog
licenseInspect paid-app licenses stored on this machine
updatePull git-backed installed apps to their latest source revision
actionSend a semantic action to a running app pane

plexi app open

Open an app or tool in a new pane.

Pass an app id (e.g. plexi app open snake) or a path to an app directory containing a manifest.toml. Use --mcp to wrap an MCP server, or --cli to open any CLI tool with a Plexi UI.

Flag / ArgTypeRequiredDescription
<type_id>stringnoApp id or path to open (mutually exclusive with —mcp and —cli)
--mcpstring (repeatable)noWrap a stdio MCP server in a Plexi pane. Example: plexi app open —mcp npx @modelcontextprotocol/server-filesystem /tmp
--clistringnoWrap a CLI tool in a Plexi pane with a visual UI. Example: plexi app open —cli git
--down / -dflagnoSplit below
--left / -lflagnoSplit left
--up / -uflagnoSplit up
--right / -rflagnoSplit right
--tabflagnoNew tab
--windowflagnoNew window
--fromstringnoOpen the new pane relative to this pane ID. Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the focused pane
<extra_args>string (repeatable)noExtra arguments passed through to the app (only valid with an app id)

plexi app install

Install an app from a local path, a remote source, or a pack file.

Local path: plexi app install ./my-app — copies the app dir into Plexi’s store. Remote source: plexi app install github:owner/repo — fetches and installs from GitHub. Pack file: plexi app install --pack core — installs from a pack file or the built-in core pack. Workspace pack: plexi app install (no args) — installs from .plexi/apps.toml.

Flag / ArgTypeRequiredDescription
<spec_or_path>stringnoSource to install: a local path, GitHub spec (github:owner/repo), or bare app id. Omit to install from the workspace pack (.plexi/apps.toml)
--packstringnoInstall from a pack file or ‘core’
--yes / -yflagnoSkip the trust-sheet confirmation prompt. Required for non-interactive (scripted) installs — without a terminal the install fails closed instead of proceeding silently

plexi app uninstall

Remove an installed app by id.

Example: plexi app uninstall github-tree

Flag / ArgTypeRequiredDescription
<id>stringyesApp id to remove (use plexi app list to see installed ids)
--yes / -yflagnoSkip the confirmation prompt

plexi app list

Show all installed apps with their versions

plexi app render

Render an app headlessly (JSON frame tree by default, or PNG with —png)

Flag / ArgTypeRequiredDescription
<app>stringyesApp id or local path to render (e.g. “snake” or ”./my-app”)
--sizestringnoImage dimensions as WxH (e.g. 500x500) Default: 800x600.
--statestringnoPre-seed the app’s state from a JSON file before rendering
--outputstringnoWhere to save the output (default: stdout)
--pngflagnoRender to a PNG image instead of JSON (default: JSON)

plexi app check

Check a local app with manifest, scaffold metadata, SDK, and render-size checks.

This is the compiler-like gate for generated Plexi apps. It checks the manifest, warns on missing or stale plexi.scaffold.toml, inspects Python SDK usage without importing app code, and renders the app at small and normal pane sizes. Run it with an explicit alpha or PR channel so the SDK/profile under test is not ambient.

Flag / ArgTypeRequiredDescription
<path>stringnoLocal app directory to check (default: current directory) Default: ..
--sizestring (repeatable)noRender size to check as WxH. Repeat to override the default matrix
--png-dirstringnoWrite PNG snapshots for each checked size into this directory

plexi app test

Run an app’s AppHarness tests with uv run pytest tests/.

Runs the Python tests in the app’s tests/ directory (the tests/test_app.py scaffolded by plexi app init). AppHarness spawns the app as a real subprocess and checks it renders without overlap; see plexi_sdk/testing.py. Exits nonzero on failure so CI can gate on it.

Flag / ArgTypeRequiredDescription
<path>stringnoApp directory to test (default: current directory) Default: ..
--snapshotflagnoUpdate stored snapshots instead of comparing against them

plexi app info

Show details about an installed app: id, name, version, and available tools

Flag / ArgTypeRequiredDescription
<id>stringyes

plexi app init

Create a new app from a template.

Scaffolds the folder structure and files you need to build a Plexi app: manifest.toml, main.py, tests/test_app.py, AGENTS.md, .gitignore, and plexi.scaffold.toml drift metadata.

By default, the app is placed in your workspace’s app directory. If no workspace is detected, pass —global to scaffold into the global registry.

Use —open to launch it in a split-right pane after scaffolding.

Flag / ArgTypeRequiredDescription
<name>stringyes
--langstringnoDefault: python.
--globalflagnoScaffold into the global app registry instead of the workspace
--openflagnoOpen the app in a split-right pane after scaffolding
--no-openflagnoDeprecated compatibility flag. App init no longer opens by default
--fromstringnoOpen the new pane relative to this pane ID. Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the focused pane

plexi app validate

Check a Plexi app directory or .plexipkg package for errors before publishing or installing.

A directory is validated in place. A .plexipkg file is extracted to a temp dir with path-safety checks and verified end-to-end: descriptor, content hashes, manifest, entry point, and capability strings.

Flag / ArgTypeRequiredDescription
<path>stringnoApp directory or .plexipkg file to check (default: current directory) Default: ..

plexi app inspect

Show the trust sheet for a local app directory or .plexipkg package.

Validates first (fail-closed), then prints what the app is, what runtime it uses with a blunt trust label, and every capability it declares — the same sheet shown before plexi app install proceeds.

Flag / ArgTypeRequiredDescription
<path>stringyesApp directory or .plexipkg file to inspect

plexi app package

Build a distributable .plexipkg package from an app directory.

Validates the directory first (fail-closed), then writes <id>-<version>.plexipkg containing the app files plus a generated PACKAGE.toml with per-file sha256 checksums.

Flag / ArgTypeRequiredDescription
<path>stringyesApp directory to package
--outstringnoOutput file path (default: ./-.plexipkg)

plexi app freeze

Export your currently installed apps as a single TOML snapshot for sharing or backup.

Like pip freeze — captures exactly what’s installed so you can replay it later with plexi app install.

Flag / ArgTypeRequiredDescription
<path>stringyesDestination path for the TOML snapshot file

plexi app publish

Validate, package, and submit an app to the Plexi marketplace.

Reads the [marketplace] manifest section (publisher, visibility, price), validates the directory, builds a .plexipkg, and submits it. Without a configured [marketplace].submit_url the package is prepared locally but not uploaded — the artifact path is printed.

Flag / ArgTypeRequiredDescription
<path>stringnoApp directory to publish (default: current directory) Default: ..

plexi app browse

Browse every public app in the hosted marketplace

Search the public marketplace catalog

Flag / ArgTypeRequiredDescription
<query>stringyesSubstring matched against app id, name, description, and tags

plexi app license

Inspect paid-app licenses stored on this machine

SubcommandDescription
listList every stored paid-app license
showShow one license in full

plexi app license list

List every stored paid-app license

plexi app license show

Show one license in full

Flag / ArgTypeRequiredDescription
<id>stringyesApp id whose license to show

plexi app update

Pull git-backed installed apps to their latest source revision.

Canonical app update command. Resolves workspace-local apps when run inside a workspace, and skips installed apps that are not git checkouts.

Flag / ArgTypeRequiredDescription
<id>stringnoApp id to update (omit to update all installed apps visible here)

plexi app action

Send a semantic action to a running app pane.

Unlike pane command (which sends raw text), app action delivers a structured semantic event directly to the app’s event handler — no keystroke simulation.

Example: plexi app action 42 refresh Example: plexi app action 42 navigate-to /some/path

Flag / ArgTypeRequiredDescription
<pane_id>stringyesPane id of the target app pane (from plexi pane list)
<action>stringyesAction name to invoke (e.g. “refresh”, “navigate-to”, “add-item”)
<args>string (repeatable)noOptional arguments forwarded to the action handler

plexi account

Manage your Plexi marketplace account (only needed to publish or buy paid apps).

Free apps install without an account. Login/signup require a configured auth backend; until then they fail closed with a clear message.

SubcommandDescription
statusShow whether you are logged in
loginLog in to an existing marketplace account
signupCreate a new marketplace account
logoutLog out and clear the local session

plexi account status

Show whether you are logged in

plexi account login

Log in to an existing marketplace account

Flag / ArgTypeRequiredDescription
--emailstringnoAccount email (falls back to [marketplace].account_email in config)

plexi account signup

Create a new marketplace account

Flag / ArgTypeRequiredDescription
--emailstringnoAccount email (falls back to [marketplace].account_email in config)

plexi account logout

Log out and clear the local session

plexi registry

Watch installed CLI tools for changes to their available commands and options

SubcommandDescription
watchCheck installed CLI tools for changes to their help output and update Plexi’s knowledge of them

plexi registry watch

Check installed CLI tools for changes to their help output and update Plexi’s knowledge of them

Flag / ArgTypeRequiredDescription
<cli>stringnoOnly check this one CLI tool instead of all of them

plexi pane

Control panes — list, focus, send input, capture output, and more

SubcommandDescription
newOpen a new terminal pane
nameRename a pane
listList all open panes as a JSON array
focusMove the visible focus to a specific pane
closeClose a pane. Omit the pane id to close the pane you are currently in
sendType text into another pane as if it came from the keyboard
selfPrint the id of the pane you are currently in
infoPrint details about the current pane (or the previously focused pane) as JSON
captureCapture the last N lines of a pane’s output as a JSON array
keySend a key press to a pane
commandSend a shell command to a terminal pane as if typed from the keyboard
stateReturn the current UI state of a pane as JSON
slotManage host-managed named file slots for a pane

plexi pane new

Open a new terminal pane.

Examples: plexi pane new # empty terminal, split right plexi pane new “npm run dev” -n “dev” # terminal with command, named plexi pane new -d # split below

For apps use plexi app open. For MCP servers use plexi app open --mcp.

Flag / ArgTypeRequiredDescription
<cmd>stringnoShell command to run in the new terminal
--name / -nstringnoName the pane
--down / -dflagnoSplit below instead of right
--left / -lflagnoSplit left
--up / -uflagnoSplit up
--right / -rflagnoSplit right (explicit, same as default)
--tabflagnoNew tab
--windowflagnoNew window
--overlayflagnoOverlay pane
--fromstringnoPane ID to split relative to. Defaults to the calling pane (PLEXI_PANE_ID env), falling back to the focused pane
--ephemeral / -eflagnoClose the pane when the command finishes
--no-focusflagnoKeep focus on the current pane
--cwdstringnoWorking directory

plexi pane name

Rename a pane.

With one argument, renames the current pane: plexi pane name “My Project” With two arguments, renames any pane by id: plexi pane name 42 “My Project”

Flag / ArgTypeRequiredDescription
<first>stringyesPane id (from plexi pane list) or the new name if renaming the current pane
<second>stringnoNew name when a pane id is given as the first argument

plexi pane list

List all open panes as a JSON array.

Filter by context: --context (no value) returns panes in the caller’s context (reads PLEXI_CONTEXT_ID from env). --context <id> filters to a specific context ID.

Flag / ArgTypeRequiredDescription
--contextstringnoFilter by context. With no argument, reads PLEXI_CONTEXT_ID from env (caller’s context). With a numeric argument, returns panes in that specific context

plexi pane focus

Move the visible focus to a specific pane.

This moves what the user sees on screen — it does not change which pane an agent is running in. An agent calling this from pane A remains in pane A; the user just sees pane B highlighted.

Flag / ArgTypeRequiredDescription
<pane_id>stringyesPane id to focus (from plexi pane list)

plexi pane close

Close a pane. Omit the pane id to close the pane you are currently in

Flag / ArgTypeRequiredDescription
<pane_id>stringnoPane id to close (from plexi pane list). Defaults to the current pane if not given

plexi pane send

Type text into another pane as if it came from the keyboard.

Use \n in the text to press Enter (which submits a command).

Example: plexi pane send 42 “git status\n”

Flag / ArgTypeRequiredDescription
<pane_id>stringyesPane id to send text to (from plexi pane list)
<text>stringyesText to type into the pane (use \n for Enter)

plexi pane self

Print the id of the pane you are currently in.

Useful in scripts: MY_PANE=$(plexi pane self)

plexi pane info

Print details about the current pane (or the previously focused pane) as JSON

Flag / ArgTypeRequiredDescription
--previousstringnoReturn info for a previously focused pane. With no value, returns the immediately previous pane (step 1). Provide an integer N to walk back N steps in focus history. Examples: plexi pane info —previous # pane focused 1 step ago plexi pane info —previous 3 # pane focused 3 steps ago

plexi pane capture

Capture the last N lines of a pane’s output as a JSON array.

Defaults to the current pane when no pane id is given.

Example: plexi pane capture —lines 50 42

Flag / ArgTypeRequiredDescription
<pane_id>stringnoPane id to capture output from. Defaults to the current pane
--linesstringnoHow many lines to read from the end of the output Default: 50.
--full-outputflagnoPreserve trailing empty lines (by default they are stripped)
--from-cursorstringnoRead only lines written after this cursor value. Get the cursor from a previous capture response. When set, the response is always JSON object format

plexi pane key

Send a key press to a pane.

For terminal panes, injects the keystroke into the terminal. For app panes, delivers a structured key event.

Key formats: single character (“h”), named key (“enter”, “escape”, “space”, “up”, “down”, “left”, “right”, “backspace”, “plus”, “minus”, “equals”), or chord (“ctrl+c”).

Example: plexi pane key 42 enter

Flag / ArgTypeRequiredDescription
<pane_id>stringyesPane id to send the key to (from plexi pane list)
<key>stringyesKey to press

plexi pane command

Send a shell command to a terminal pane as if typed from the keyboard.

Use --enter to append a newline so the command is submitted immediately.

Example: plexi pane command 42 “git status” —enter

Flag / ArgTypeRequiredDescription
<pane_id>stringyesPane id to send the command to (from plexi pane list)
<text>stringyesText to send to the pane
--enter / -eflagnoAppend a newline after the text, submitting it as a command

plexi pane state

Return the current UI state of a pane as JSON.

For app panes: returns a JSON object with a frame array of RenderCommands representing the last-rendered L1 UiNode tree. Agents can use this to inspect what an app is currently displaying.

For terminal panes: returns a simple status object (type, title, pane_id).

Example: plexi pane state 42

Flag / ArgTypeRequiredDescription
<pane_id>stringyesPane id to query (from plexi pane list)

plexi pane slot

Manage host-managed named file slots for a pane

SubcommandDescription
writeWrite bytes to a named pane slot. If content is omitted, stdin is read fully
readPrint raw bytes from a named pane slot
listList slots for a pane as JSON
deleteDelete a named pane slot

plexi pane slot write

Write bytes to a named pane slot. If content is omitted, stdin is read fully

Flag / ArgTypeRequiredDescription
<name>stringyesSlot name
<content>stringnoOptional content. If omitted, stdin is read fully
--pane-idstringnoPane id. Defaults to PLEXI_PANE_ID
--appendflagnoAppend to an existing slot instead of replacing it
--replaceflagnoReplace an existing slot

plexi pane slot read

Print raw bytes from a named pane slot

Flag / ArgTypeRequiredDescription
<name>stringyesSlot name
<pane_id>stringnoPane id. Defaults to PLEXI_PANE_ID

plexi pane slot list

List slots for a pane as JSON

Flag / ArgTypeRequiredDescription
<pane_id>stringnoPane id. Defaults to PLEXI_PANE_ID

plexi pane slot delete

Delete a named pane slot

Flag / ArgTypeRequiredDescription
<name>stringyesSlot name
<pane_id>stringnoPane id. Defaults to PLEXI_PANE_ID

plexi events

Subscribe to a Plexi app’s event streams and receive brokered deliveries.

Apps declare named event streams (e.g. probe.tick) and emit events on them. plexi events subscribe <app_id> <stream> opens a long-lived connection and prints one JSON line per delivered event to stdout (NDJSON) until interrupted. Subscriptions are brokered: the host stamps your identity from the pane you run in and checks permission before any event is delivered.

SubcommandDescription
subscribeSubscribe to an app’s event stream and print delivered events as NDJSON
listList event streams currently declared by running apps
mcp-configPrint the host event MCP server config for an MCP-aware agent

plexi events subscribe

Subscribe to an app’s event stream and print delivered events as NDJSON.

Opens a long-lived connection to the running Plexi instance and streams one JSON object per line to stdout: first a subscribed acknowledgement, then one line per delivered event. Runs until interrupted (Ctrl-C), at which point the host drops the subscription and its queued deliveries.

Example: plexi events subscribe event-probe probe.tick —payload full

Flag / ArgTypeRequiredDescription
<app_id>stringyesApp id that publishes the stream (e.g. event-probe)
<stream>stringnoStream name to subscribe to (e.g. probe.tick). Omit with —all to subscribe to every stream the app declares
--allflagnoSubscribe to all of the app’s declared streams instead of one
--payloadstringnoHow much of each event to deliver: off, summary, full, or state-ref Default: full.
--triggerstringnoTrigger mode recorded on the subscription: never, conversation, ambient, or ask Default: conversation.
--resourcestringnoOnly deliver events for this resource id (document/game/pane). Omit for any

plexi events list

List event streams currently declared by running apps

Flag / ArgTypeRequiredDescription
--jsonflagnoOutput as JSON instead of a human-readable table

plexi events mcp-config

Print the host event MCP server config for an MCP-aware agent.

Emits a mcpServers JSON block pointing at this instance’s host MCP server (read from PLEXI_HOST_MCP_PORT / PLEXI_HOST_MCP_TOKEN), so a Claude Code or Codex agent in this pane can subscribe to app events natively over MCP.

plexi notify

Send a notification to the Plexi UI

Flag / ArgTypeRequiredDescription
--titlestringyesNotification title (required)
--bodystringnoNotification body text
--levelstringnoSeverity level: info, warn, or error Default: info.
--choicestring (repeatable)noAdd a clickable button to the notification. Format: key:Label (returns key when clicked) or Label:pane_focus:<pane_id> (switches focus to that pane when clicked). Repeatable
--host-actionstring (repeatable)noAction to perform on the host when a button is clicked. Format: key:action_type:action_arg. Repeatable. The host runs this even after the process that sent the notification has exited
--no-waitflagnoQueue choice buttons without waiting for a selected value
--timeoutstringnoHow many seconds before the notification disappears (0 = stays until dismissed) Default: 0.
--scopestringnoWhich panes see this notification: window, context, or global (default: global) Default: global.

plexi ai

AI configuration and diagnostics — scan hardware, check integrations, recommend models

SubcommandDescription
onboardGuide first-run AI setup and the next app install step
doctorScan hardware and report recommended AI models
setupInteractive wizard to configure a local AI model via Ollama

plexi ai onboard

Guide first-run AI setup and the next app install step.

Runs the same checks as plexi ai doctor, then prints the shortest path to usable AI: local Ollama, a user-owned OpenRouter key, or skipping AI for now. Ends with the app install command to try next.

Example: plexi ai onboard

plexi ai doctor

Scan hardware and report recommended AI models.

Detects your CPU, RAM/VRAM, and GPU, then recommends which local or cloud AI models are a good fit. Also checks whether Ollama is installed and running, lists any already-pulled models, and verifies OpenRouter configuration.

Example: plexi ai doctor

Flag / ArgTypeRequiredDescription
--jsonflagnoOutput results as JSON (for scripting or agent use)

plexi ai setup

Interactive wizard to configure a local AI model via Ollama.

Walks through Ollama installation detection, model recommendation based on your hardware, pulling the recommended model, and writing the [ai.ollama] section to your config.toml so Plexi apps can use it immediately.

Example: plexi ai setup

plexi completions

Print a shell completion script to stdout.

Example: plexi completions zsh >> ~/.zshrc

Flag / ArgTypeRequiredDescription
<shell>stringnoShell name: zsh, bash, or fish

plexi config

Check your Plexi config file for errors

SubcommandDescription
checkValidate your config.toml and report any errors
editOpen config.toml in your $EDITOR
getPrint the resolved value of a config key to stdout
resetOverwrite config.toml with the built-in default template
listPrint all known config keys with type, current value, and description
setSet one or more config keys in-place

plexi config check

Validate your config.toml and report any errors

Flag / ArgTypeRequiredDescription
--global / -gflagnoUse the global channel config.toml only
--workspace / -wflagnoUse the active workspace’s channel-scoped config.toml only

plexi config edit

Open config.toml in your $EDITOR

Flag / ArgTypeRequiredDescription
--global / -gflagnoUse the global channel config.toml only
--workspace / -wflagnoUse the active workspace’s channel-scoped config.toml only

plexi config get

Print the resolved value of a config key to stdout.

Supports dotted keys: agents.low, agents.medium, agents.high. Returns the effective value (user setting or built-in default).

Flag / ArgTypeRequiredDescription
--global / -gflagnoUse the global channel config.toml only
--workspace / -wflagnoUse the active workspace’s channel-scoped config.toml only
<key>stringyesDotted key to retrieve (e.g. agents.medium)

plexi config reset

Overwrite config.toml with the built-in default template.

Creates a backup at config.toml.bak before overwriting.

Flag / ArgTypeRequiredDescription
--global / -gflagnoUse the global channel config.toml only
--workspace / -wflagnoUse the active workspace’s channel-scoped config.toml only

plexi config list

Print all known config keys with type, current value, and description.

Columns: key\ttype\tvalue\tdescription. Use —json for machine-readable output.

Flag / ArgTypeRequiredDescription
--global / -gflagnoUse the global channel config.toml only
--workspace / -wflagnoUse the active workspace’s channel-scoped config.toml only
--jsonflagnoOutput as a JSON array instead of tab-separated lines

plexi config set

Set one or more config keys in-place.

Each argument must be in KEY=VALUE form (e.g. theme.preset=dracula font_size=14). Scope defaults to workspace when inside a workspace, global otherwise.

Flag / ArgTypeRequiredDescription
--global / -gflagnoUse the global channel config.toml only
--workspace / -wflagnoUse the active workspace’s channel-scoped config.toml only
<pairs>string (repeatable)yesOne or more KEY=VALUE pairs to write

plexi notes

Browse and open scratchpad notes created with Cmd+Shift+Space.

Each scratchpad session writes a timestamped file to <config_dir>/notes/. Use plexi notes list to print note paths, or plexi notes open to pick one with fzf.

SubcommandDescription
listPrint paths of all scratchpad notes, newest first
openOpen a note picker with fzf in the focused terminal pane
inboxList notes in the inbox with frontmatter context
processPrint inbox notes in agent-legible format with configured triage actions

plexi notes list

Print paths of all scratchpad notes, newest first

plexi notes open

Open a note picker with fzf in the focused terminal pane.

Requires fzf to be installed. Falls back to printing the notes directory when fzf is not available or PLEXI_SOCKET is not set.

plexi notes inbox

List notes in the inbox with frontmatter context

plexi notes process

Print inbox notes in agent-legible format with configured triage actions

plexi note

Capture a quick note to the inbox.

Writes a timestamped note to <config_dir>/notes/inbox/ with frontmatter capturing cwd, workspace, and context root. Triage later via Cmd+O, then t.

Example: plexi note “remember to update the docs”

Flag / ArgTypeRequiredDescription
<text>stringyesNote text to capture

plexi doctor

Audit all installed apps for capability and config gaps.

Checks every installed app’s declared capabilities against your current config.toml and reports what’s working and what needs to be configured. Use —json for scripting.

Flag / ArgTypeRequiredDescription
--jsonflagnoOutput results as JSON (for scripting or agent use)

plexi demo

Interactive keybinding tutorial — learn split and navigate in real time.

Walk through two fundamental Plexi interactions inside a live pane: split a pane (⌘D) and navigate between panes (⌘L / ⌘H). Must be run inside a Plexi pane (PLEXI_PANE_ID must be set).

plexi update

Update installed apps or Plexi itself.

Run with the apps subcommand to update one or all installed apps. Run with no subcommand to update the Plexi binary itself.

SubcommandDescription
appsCompatibility alias for plexi app update

plexi update apps

Compatibility alias for plexi app update.

Omit the app id to update all installed apps visible from the current workspace.

Flag / ArgTypeRequiredDescription
<id>stringnoApp id to update (omit to update all installed apps)

plexi uninstall

Uninstalls the app, CLI, and optionally your profile data.

Removes the current channel’s app bundle (/Applications/Plexi.app), CLI binary (/usr/local/bin/plexi), and shell completions. Your profile directory (~/.plexi/) holds your settings, secrets, and app configurations — you will be asked whether to keep it.

Example: plexi uninstall

Flag / ArgTypeRequiredDescription
--keep-dataflagnoKeep your profile directory (~/.plexi/) — your settings, secrets, and app data stay on disk
--yes / -yflagnoSkip the confirmation prompt and proceed immediately (removes data unless —keep-data is set)