CLI Reference

⚠ verified v0.0.593 (current: v0.0.505)

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)

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

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 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 all secrets stored for this project
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 all secrets stored for this project

plexi secret delete

Delete a stored secret

Flag / ArgTypeRequiredDescription
<friendly_name>stringyes

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 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 the focused pane into a new sub-context

plexi context new

Open a new context with an optional name

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 the named context. Defaults to current context if inside one

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 the focused pane into a new sub-context

Flag / ArgTypeRequiredDescription
<name>stringnoName for the new sub-context. Defaults to the pane name

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 to a PNG image without opening the UI (useful for screenshots and testing)
infoShow details about an installed app: id, name, version, and available tools
initCreate a new app from a template
runRun an app directly from a local directory without installing or linking
validateCheck a Plexi app directory for errors before publishing or installing
freezeExport your currently installed apps as a single TOML snapshot for sharing or backup
publishPackage the app in the current directory and print the registry submission payload
updateCheck installed apps for available updates

plexi app open

Open an app or tool in a new pane.

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

Flag / ArgTypeRequiredDescription
<type_id>stringnoApp id 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
--layoutstringnoWhere to place the new pane: split_h (right), split_left (left), split_v (below), split_right, split_below, split_above, tab, new_window, or overlay
--from-pane-idstringnoOpen the new pane relative to this pane ID instead of 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’

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 to a PNG image without opening the UI (useful for screenshots and testing)

Flag / ArgTypeRequiredDescription
<id>stringyesApp id to render (e.g. “snake”)
--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 PNG (default: stdout)

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. Use —lang to pick the language (default: python).

Flag / ArgTypeRequiredDescription
<name>stringyes
--langstringnoDefault: python.
--from-pane-idstringnoOpen the new pane relative to this pane ID instead of the focused pane. Defaults to PLEXI_PANE_ID if set in the environment

plexi app run

Run an app directly from a local directory without installing or linking.

Opens the app in a pane immediately. Edits to the app take effect on next launch. Replaces plexi app link for development workflows.

Flag / ArgTypeRequiredDescription
<path>stringyesPath to the app folder containing manifest.toml
--from-pane-idstringnoOpen the new pane relative to this pane ID instead of the focused pane. Defaults to PLEXI_PANE_ID if set in the environment

plexi app validate

Check a Plexi app directory for errors before publishing or installing

Flag / ArgTypeRequiredDescription
<path>stringnoPath to check (default: current directory) Default: ..

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

Package the app in the current directory and print the registry submission payload.

Validates all required fields, checks that the entry file exists, and prints the JSON payload that would be submitted to the Plexi app registry.

The actual HTTP submission is future work — this command proves the manifest is correct and ready for publishing.

Flag / ArgTypeRequiredDescription
--dry-runflagnoPrint the payload without submitting (currently the only mode — actual registry upload is future work)

plexi app update

Check installed apps for available updates.

Compares each app’s recorded installed version against the version in its manifest. In v1 this is a local check only — no network calls are made. Use plexi update apps for git-checkout apps.

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

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
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 as JSON
captureCapture the last N lines of a pane’s output as a JSON array
keySend a key press to a pane

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 as JSON

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”), 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 terminal

Open a plain terminal pane

Flag / ArgTypeRequiredDescription
<cmd>stringnoOptional shell command to run inside the new terminal
--ephemeral / -eflagnoClose the pane automatically when the command finishes
--layoutstringnoWhere to place the new pane: split_h (right), split_left (left), split_v (below), split_right, split_below, split_above, tab, or new_window
--from-pane-idstringnoOpen the new pane relative to this pane ID instead of the focused pane
--cwdstringnoDirectory to open the terminal in
--no-focusflagnoKeep focus on the current pane instead of jumping to the new one

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
--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 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

plexi config check

Validate your config.toml and report any errors

plexi config edit

Open config.toml in your $EDITOR

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

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

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 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
appsPull the latest version of your installed apps

plexi update apps

Pull the latest version of your installed apps.

Omit the app id to update all installed apps at once.

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)