mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Closes #11532. The docs and CLI help did not say which working directory a resumed session runs in. That directory controls tools, `@path` references, project configuration, and context files. ## Changes - `docs/sessions.md`: states that a session keeps the working directory it was created in, adds a table mapping each entry point to its working directory, and describes what happens when that directory no longer exists. Removes a paragraph that repeated the `--session`/`--fork` descriptions. - `docs/cli.md` and `--help`: clearer `--continue`, `--resume`, `--session`, `--session-id`, and `--fork` descriptions. The help only mentions the directory where it is not obvious (`--fork`). - `/resume` and `/import` command descriptions, mirrored in `docs/slash-commands.md`. `/import` notes that it preserves the session ID and working directory. | Entry point | Working directory | |---|---| | `--continue` | The current directory | | `--resume`, `/resume`, `--session`, `/import` | The session's working directory, which can differ from the current directory | | `--fork`, or a `--session` ID from another directory that you choose to fork | The current directory, in a new session | Behavior was verified against `createSessionManager` in `src/main.ts`, `SessionManager.open`/`continueRecent`/`forkFrom`, and `AgentSessionRuntime.importFromJsonl`.
61 lines
2.7 KiB
Markdown
61 lines
2.7 KiB
Markdown
# Slash commands
|
|
|
|
Type `/` in Pi's terminal editor to search the commands available in the current session. This page lists the built-in commands in the current Pi release.
|
|
|
|
Extensions, prompt templates, and skills can add commands. The command menu in Pi is therefore the exact reference for the resources loaded in your session.
|
|
|
|
## Models and settings
|
|
|
|
| Command | Description |
|
|
|---|---|
|
|
| `/settings` | Open settings |
|
|
| `/model [provider/model]` | Select a model |
|
|
| `/thinking [level]` | Set the thinking level |
|
|
| `/scoped-models` | Configure the models used by interactive cycling |
|
|
| `/login [provider]` | Add provider authentication |
|
|
| `/logout` | Remove provider authentication |
|
|
| `/llama` | Manage models on the configured llama.cpp router |
|
|
|
|
## Sessions and context
|
|
|
|
| Command | Description |
|
|
|---|---|
|
|
| `/new` | Start a new session |
|
|
| `/resume` | Resume another session |
|
|
| `/name [name]` | Set the session display name, or show the current name when omitted |
|
|
| `/session` | Show current session information and statistics |
|
|
| `/tree` | Navigate the session tree |
|
|
| `/fork` | Create a new session from an earlier user message |
|
|
| `/clone` | Duplicate the current session at its current position |
|
|
| `/compact [instructions]` | Compact the current context, optionally with custom instructions |
|
|
| `/import <path>` | Import a JSONL session, preserving its ID and working directory |
|
|
|
|
## Export and share
|
|
|
|
| Command | Description |
|
|
|---|---|
|
|
| `/copy` | Copy the last assistant message |
|
|
| `/export [path]` | Export the session as HTML or JSONL |
|
|
| `/share` | Upload the session and return a viewer link |
|
|
| `/bug [description]` | Prepare a private bug report for the Pi developers |
|
|
|
|
Review a session before exporting or sharing it. Sessions can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
|
|
|
|
## Runtime and project
|
|
|
|
| Command | Description |
|
|
|---|---|
|
|
| `/trust` | Save a project trust decision for future Pi processes |
|
|
| `/mcp` | Manage MCP servers: sign in, reconnect, enable or disable, and change exposure |
|
|
| `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
|
|
| `/hotkeys` | Show active keyboard shortcuts |
|
|
| `/changelog` | Show changelog entries |
|
|
| `/quit` | Quit Pi |
|
|
|
|
## Commands added by resources
|
|
|
|
- Extensions can register commands with their own arguments and completion behavior.
|
|
- Each prompt template is available under its template name.
|
|
- Skills are available as `/skill:name` when skill commands are enabled.
|
|
|
|
Use `/reload` after adding or changing a discovered command resource. See [Extensions](extensions.md), [Prompt Templates](prompt-templates.md), and [Skills](skills.md) for their loading and naming rules.
|