my-durable 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/.env.example +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +328 -2
  4. package/ai_docs/durable_pi/announcement.md +860 -0
  5. package/ai_docs/durable_pi/changelog.md +51 -0
  6. package/ai_docs/durable_pi/chord-delta-findings.md +362 -0
  7. package/ai_docs/durable_pi/coding-agent-integration.md +70 -0
  8. package/ai_docs/durable_pi/pico-v5-chord-usage.md +391 -0
  9. package/ai_docs/durable_pi/pico-v5-handoff.md +921 -0
  10. package/ai_docs/durable_pi/readme.md +617 -0
  11. package/ai_docs/durable_pi/sources.md +22 -0
  12. package/ai_docs/durable_pi/spec.md +4696 -0
  13. package/ai_docs/durable_pi/vacation-planner.md +57 -0
  14. package/ai_docs/pi/chord.md +268 -0
  15. package/ai_docs/pi/cli-integration.md +110 -0
  16. package/ai_docs/pi/cli.md +325 -0
  17. package/ai_docs/pi/codemode.md +211 -0
  18. package/ai_docs/pi/compaction.md +467 -0
  19. package/ai_docs/pi/configuration.md +51 -0
  20. package/ai_docs/pi/containerization.md +187 -0
  21. package/ai_docs/pi/custom-provider.md +177 -0
  22. package/ai_docs/pi/environment-variables.md +102 -0
  23. package/ai_docs/pi/extensions.md +278 -0
  24. package/ai_docs/pi/how-pi-works.md +53 -0
  25. package/ai_docs/pi/index.md +43 -0
  26. package/ai_docs/pi/json.md +230 -0
  27. package/ai_docs/pi/keybindings.md +198 -0
  28. package/ai_docs/pi/llama-cpp.md +118 -0
  29. package/ai_docs/pi/mcp.md +274 -0
  30. package/ai_docs/pi/message-types.md +265 -0
  31. package/ai_docs/pi/models.md +209 -0
  32. package/ai_docs/pi/overview.md +166 -0
  33. package/ai_docs/pi/packages.md +133 -0
  34. package/ai_docs/pi/pi-agent-core.md +568 -0
  35. package/ai_docs/pi/pi-ai.md +1942 -0
  36. package/ai_docs/pi/prompt-templates.md +63 -0
  37. package/ai_docs/pi/providers.md +204 -0
  38. package/ai_docs/pi/quickstart.md +140 -0
  39. package/ai_docs/pi/readme.md +99 -0
  40. package/ai_docs/pi/rpc-commands.md +864 -0
  41. package/ai_docs/pi/rpc-extension-ui.md +204 -0
  42. package/ai_docs/pi/rpc.md +197 -0
  43. package/ai_docs/pi/sdk.md +151 -0
  44. package/ai_docs/pi/security.md +103 -0
  45. package/ai_docs/pi/session-format.md +297 -0
  46. package/ai_docs/pi/sessions.md +70 -0
  47. package/ai_docs/pi/settings.md +173 -0
  48. package/ai_docs/pi/shell-aliases.md +97 -0
  49. package/ai_docs/pi/skills.md +97 -0
  50. package/ai_docs/pi/slash-commands.md +64 -0
  51. package/ai_docs/pi/sources.md +57 -0
  52. package/ai_docs/pi/terminal-setup.md +223 -0
  53. package/ai_docs/pi/termux.md +121 -0
  54. package/ai_docs/pi/themes.md +140 -0
  55. package/ai_docs/pi/tmux.md +59 -0
  56. package/ai_docs/pi/toolkit.md +168 -0
  57. package/ai_docs/pi/tui.md +129 -0
  58. package/ai_docs/pi/usage.md +98 -0
  59. package/ai_docs/pi/virtual-models.md +118 -0
  60. package/ai_docs/pi/windows.md +71 -0
  61. package/apps/dpi-backend/.nvmrc +1 -0
  62. package/apps/dpi-backend/API.md +99 -0
  63. package/apps/dpi-backend/README.md +119 -0
  64. package/apps/dpi-backend/deploy/backend.env.example +9 -0
  65. package/apps/dpi-backend/deploy/dpi-backend.plist +26 -0
  66. package/apps/dpi-backend/deploy/dpi-backend.service +22 -0
  67. package/apps/dpi-backend/package.json +33 -0
  68. package/apps/dpi-backend/prompts/one_sentence.md +3 -0
  69. package/apps/dpi-backend/prompts/smart_ass_opus_fix.md +169 -0
  70. package/apps/dpi-backend/scripts/check-contract.mjs +151 -0
  71. package/apps/dpi-backend/scripts/migrate-playground.ts +66 -0
  72. package/apps/dpi-backend/scripts/record-nested-fixture.mts +154 -0
  73. package/apps/dpi-backend/scripts/token.ts +57 -0
  74. package/apps/dpi-backend/src/addons.ts +139 -0
  75. package/apps/dpi-backend/src/auth.ts +20 -0
  76. package/apps/dpi-backend/src/config.ts +54 -0
  77. package/apps/dpi-backend/src/contract-check.ts +118 -0
  78. package/apps/dpi-backend/src/errors.ts +50 -0
  79. package/apps/dpi-backend/src/extensions.ts +510 -0
  80. package/apps/dpi-backend/src/faux.ts +80 -0
  81. package/apps/dpi-backend/src/history.ts +165 -0
  82. package/apps/dpi-backend/src/idempotency.ts +20 -0
  83. package/apps/dpi-backend/src/jev.ts +43 -0
  84. package/apps/dpi-backend/src/jobs.ts +790 -0
  85. package/apps/dpi-backend/src/main.ts +76 -0
  86. package/apps/dpi-backend/src/model-catalog.ts +180 -0
  87. package/apps/dpi-backend/src/pairing-files.ts +142 -0
  88. package/apps/dpi-backend/src/pairing.ts +459 -0
  89. package/apps/dpi-backend/src/routes.ts +217 -0
  90. package/apps/dpi-backend/src/shared-state.ts +85 -0
  91. package/apps/dpi-backend/src/store.ts +1240 -0
  92. package/apps/dpi-backend/src/streams.ts +256 -0
  93. package/apps/dpi-backend/src/tunnel.ts +955 -0
  94. package/apps/dpi-backend/tsconfig.json +13 -0
  95. package/apps/dpi-playground/README.md +83 -0
  96. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-CFGc7lHT.js +77 -0
  97. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-DFdKpwm_.css +1 -0
  98. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/anthropic.png +0 -0
  99. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/deepseek.png +0 -0
  100. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/durable-pi.svg +14 -0
  101. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/gemini.png +0 -0
  102. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/grok.png +0 -0
  103. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/kimi.png +0 -0
  104. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/lab.png +0 -0
  105. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/meta.png +0 -0
  106. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/minimax.png +0 -0
  107. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/openai.png +0 -0
  108. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/qwen.png +0 -0
  109. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/xiaomi.png +0 -0
  110. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/zai.png +0 -0
  111. package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +16 -0
  112. package/apps/dpi-playground/apps/dpi-playground-fe/index.html +15 -0
  113. package/apps/dpi-playground/apps/dpi-playground-fe/package.json +5 -0
  114. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/anthropic.png +0 -0
  115. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/deepseek.png +0 -0
  116. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/durable-pi.svg +14 -0
  117. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/gemini.png +0 -0
  118. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/grok.png +0 -0
  119. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/kimi.png +0 -0
  120. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/lab.png +0 -0
  121. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/meta.png +0 -0
  122. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/minimax.png +0 -0
  123. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/openai.png +0 -0
  124. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/qwen.png +0 -0
  125. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/xiaomi.png +0 -0
  126. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/zai.png +0 -0
  127. package/apps/dpi-playground/apps/dpi-playground-fe/src/App.vue +180 -0
  128. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/commands.ts +119 -0
  129. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/composables.ts +129 -0
  130. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/hub.ts +40 -0
  131. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/icon-path.ts +7 -0
  132. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/ids.ts +2 -0
  133. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/jobs.ts +80 -0
  134. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/link-policy.ts +16 -0
  135. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/markdown-policy.ts +115 -0
  136. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/markdown.ts +60 -0
  137. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair-close.ts +23 -0
  138. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair-handoff.ts +56 -0
  139. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair.ts +166 -0
  140. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/qrcode.ts +323 -0
  141. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/signature.ts +146 -0
  142. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/store.ts +373 -0
  143. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/stream.ts +183 -0
  144. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/AgentView.vue +342 -0
  145. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Composer.vue +198 -0
  146. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ContextBar.vue +254 -0
  147. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DeviceCredentialsDialog.vue +40 -0
  148. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DeviceIcon.vue +56 -0
  149. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DirBrowser.vue +95 -0
  150. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ExtensionsPanel.vue +96 -0
  151. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/HelpDialog.vue +69 -0
  152. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Inspector.vue +425 -0
  153. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/JobCard.vue +221 -0
  154. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/MobileNav.vue +39 -0
  155. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ModelPicker.vue +71 -0
  156. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NetworkSidebar.vue +236 -0
  157. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NewSessionDialog.vue +114 -0
  158. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/OfflinePanel.vue +128 -0
  159. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/PairDeviceWizard.vue +433 -0
  160. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/PromptDialog.vue +89 -0
  161. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/StateEditor.vue +179 -0
  162. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TasksPanel.vue +280 -0
  163. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Toast.vue +11 -0
  164. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TokenManager.vue +175 -0
  165. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TopBar.vue +114 -0
  166. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TranscriptItem.vue +152 -0
  167. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TreeRow.vue +195 -0
  168. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TunnelStatusBar.vue +107 -0
  169. package/apps/dpi-playground/apps/dpi-playground-fe/src/extensions.css +105 -0
  170. package/apps/dpi-playground/apps/dpi-playground-fe/src/jobs.css +655 -0
  171. package/apps/dpi-playground/apps/dpi-playground-fe/src/main.ts +22 -0
  172. package/apps/dpi-playground/apps/dpi-playground-fe/src/network.css +675 -0
  173. package/apps/dpi-playground/apps/dpi-playground-fe/src/style.css +3203 -0
  174. package/apps/dpi-playground/apps/dpi-playground-fe/tsconfig.json +16 -0
  175. package/apps/dpi-playground/apps/dpi-playground-fe/vite.config.ts +14 -0
  176. package/apps/dpi-playground/apps/dpi-playground-hub/package.json +5 -0
  177. package/apps/dpi-playground/apps/dpi-playground-hub/src/audit.ts +406 -0
  178. package/apps/dpi-playground/apps/dpi-playground-hub/src/client-ip.ts +72 -0
  179. package/apps/dpi-playground/apps/dpi-playground-hub/src/credentials.ts +265 -0
  180. package/apps/dpi-playground/apps/dpi-playground-hub/src/guard.ts +43 -0
  181. package/apps/dpi-playground/apps/dpi-playground-hub/src/http-errors.ts +156 -0
  182. package/apps/dpi-playground/apps/dpi-playground-hub/src/identity.ts +60 -0
  183. package/apps/dpi-playground/apps/dpi-playground-hub/src/limiter.ts +165 -0
  184. package/apps/dpi-playground/apps/dpi-playground-hub/src/main.ts +460 -0
  185. package/apps/dpi-playground/apps/dpi-playground-hub/src/monitor.ts +320 -0
  186. package/apps/dpi-playground/apps/dpi-playground-hub/src/mux.ts +277 -0
  187. package/apps/dpi-playground/apps/dpi-playground-hub/src/pairing.ts +816 -0
  188. package/apps/dpi-playground/apps/dpi-playground-hub/src/proxy.ts +128 -0
  189. package/apps/dpi-playground/apps/dpi-playground-hub/src/rotation.ts +583 -0
  190. package/apps/dpi-playground/apps/dpi-playground-hub/src/seed.ts +11 -0
  191. package/apps/dpi-playground/apps/dpi-playground-hub/src/transport.ts +108 -0
  192. package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-token.ts +11 -0
  193. package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-transport.ts +560 -0
  194. package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel.ts +873 -0
  195. package/apps/dpi-playground/apps/dpi-playground-hub/tsconfig.json +13 -0
  196. package/apps/dpi-playground/package.json +37 -0
  197. package/apps/dpi-sdk/README.md +74 -0
  198. package/apps/dpi-sdk/package.json +20 -0
  199. package/apps/dpi-sdk/scripts/net.ts +73 -0
  200. package/apps/dpi-sdk/src/api.ts +631 -0
  201. package/apps/dpi-sdk/src/app-state.ts +111 -0
  202. package/apps/dpi-sdk/src/client.ts +330 -0
  203. package/apps/dpi-sdk/src/errors.ts +16 -0
  204. package/apps/dpi-sdk/src/jobs.ts +99 -0
  205. package/apps/dpi-sdk/src/models.ts +472 -0
  206. package/apps/dpi-sdk/src/node/chunk.ts +488 -0
  207. package/apps/dpi-sdk/src/node/config.ts +175 -0
  208. package/apps/dpi-sdk/src/node/drivers.ts +402 -0
  209. package/apps/dpi-sdk/src/node/ops.ts +114 -0
  210. package/apps/dpi-sdk/src/node/private-dir.ts +48 -0
  211. package/apps/dpi-sdk/src/node/registry-migration.ts +549 -0
  212. package/apps/dpi-sdk/src/node/registry.ts +390 -0
  213. package/apps/dpi-sdk/src/node/sse-writer.ts +151 -0
  214. package/apps/dpi-sdk/src/protocol/backoff.ts +31 -0
  215. package/apps/dpi-sdk/src/protocol/limits.ts +199 -0
  216. package/apps/dpi-sdk/src/protocol/pairing.ts +311 -0
  217. package/apps/dpi-sdk/src/protocol/rest-routes.ts +105 -0
  218. package/apps/dpi-sdk/src/protocol/tunnel.ts +331 -0
  219. package/apps/dpi-sdk/src/sse.ts +117 -0
  220. package/apps/dpi-sdk/src/transcript.ts +291 -0
  221. package/apps/dpi-sdk/tsconfig.json +13 -0
  222. package/apps/dpi-sdk/w +20 -0
  223. package/apps/dpi-tui/README.md +54 -0
  224. package/apps/dpi-tui/bin/dpi-tui.mjs +5 -0
  225. package/apps/dpi-tui/package.json +20 -0
  226. package/apps/dpi-tui/src/app.ts +433 -0
  227. package/apps/dpi-tui/src/commands.ts +151 -0
  228. package/apps/dpi-tui/src/main.ts +122 -0
  229. package/apps/dpi-tui/src/pairing.ts +287 -0
  230. package/apps/dpi-tui/src/pickers.ts +238 -0
  231. package/apps/dpi-tui/src/render.ts +164 -0
  232. package/apps/dpi-tui/src/theme.ts +57 -0
  233. package/apps/dpi-tui/tsconfig.json +14 -0
  234. package/bin/device.mjs +5 -0
  235. package/bin/hub.mjs +5 -0
  236. package/bin/tui.mjs +5 -0
  237. package/deploy/Caddyfile +120 -0
  238. package/docs/verification.md +102 -0
  239. package/dpi-network.example.yaml +62 -0
  240. package/images/01_durable_agent_network.svg +185 -0
  241. package/images/02_pi_made_durable.svg +204 -0
  242. package/images/03_restart_mid_tool.svg +168 -0
  243. package/images/07_one_api_every_client.svg +123 -0
  244. package/images/08_device_session_agent.svg +123 -0
  245. package/images/09_compact_keep_history.svg +143 -0
  246. package/images/10_shared_app_state.svg +177 -0
  247. package/images/11_durable_jobs_wait.svg +141 -0
  248. package/images/12_tools_change_mid_run.svg +231 -0
  249. package/images/13_hook_blocks_tool.svg +122 -0
  250. package/images/14_fork_at_any_entry.svg +119 -0
  251. package/images/15_web_client.png +0 -0
  252. package/images/16_terminal_client.svg +43 -0
  253. package/images/17_devices_are_data.svg +182 -0
  254. package/images/18_should_every_agent_be_durable.svg +118 -0
  255. package/images/19_sqlite_on_every_device.svg +155 -0
  256. package/images/20_admission_and_effects.svg +134 -0
  257. package/justfile +33 -0
  258. package/package.json +41 -4
  259. package/scripts/verify.mjs +210 -0
@@ -0,0 +1,97 @@
1
+ > Source: [packages/coding-agent/docs/skills.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/skills.md)
2
+ > Retrieved with Firecrawl: 2026-10-05. Repository snapshot: `b78e6a9085343ec0f308c3d377da72528b4cf7ee`.
3
+ > Relative documentation links point to local copies where available, otherwise to the source snapshot.
4
+
5
+ # Skills
6
+
7
+ Skills give Pi specialized instructions and supporting files for a particular kind of work. Pi advertises each available skill by name and description, then loads its full instructions only when the task calls for them.
8
+
9
+ Use a skill when a workflow needs more context than a prompt template but does not need a new executable integration point. Skills can bundle scripts, references, and assets alongside their instructions.
10
+
11
+ Pi implements the [Agent Skills specification](https://agentskills.io/specification). Most invalid fields produce warnings rather than stopping startup.
12
+
13
+ ## Create a skill
14
+
15
+ A skill is a directory containing `SKILL.md`:
16
+
17
+ ```text
18
+ pdf-tools/
19
+ ├── SKILL.md
20
+ ├── scripts/
21
+ │ └── extract.sh
22
+ ├── references/
23
+ │ └── formats.md
24
+ └── assets/
25
+ └── template.json
26
+ ```
27
+
28
+ Start `SKILL.md` with frontmatter followed by direct instructions:
29
+
30
+ ```markdown
31
+ ---
32
+ name: pdf-tools
33
+ description: Extract text and tables from PDF files. Use when reading, converting, or inspecting PDFs.
34
+ ---
35
+
36
+ # PDF tools
37
+
38
+ Read `references/formats.md` before converting a document. Run scripts relative to this skill directory.
39
+ ```
40
+
41
+ The description determines when the model considers loading the skill. State both what the skill does and when it applies. Avoid descriptions such as “Helps with PDFs,” which do not provide enough routing information.
42
+
43
+ Use relative paths from the skill directory when referring to bundled files. Pi tells the model where the skill lives so it can resolve those paths.
44
+
45
+ ## Understand how skills load
46
+
47
+ At startup, Pi scans configured skill locations and adds each skill’s name, description, and path to the system prompt. It does not add the full instructions.
48
+
49
+ When a task matches, the model reads `SKILL.md` and follows its instructions. This keeps detailed guidance out of context until it is needed. A model might fail to load a relevant skill, so use `/skill:name` when you need to force it.
50
+
51
+ Arguments after `/skill:name` are appended to the loaded instructions as a user request:
52
+
53
+ ```text
54
+ /skill:pdf-tools extract report.pdf
55
+ ```
56
+
57
+ Set `disable-model-invocation: true` in frontmatter when a skill should be available only through its explicit command. The `enableSkillCommands` [setting](settings.md) controls whether skill commands appear in interactive command discovery; manually entered `/skill:name` commands still work.
58
+
59
+ <a id="choose-where-it-loads"></a>
60
+
61
+ ## Add it to Pi
62
+
63
+ Place the skill in your user or project skills directory. Directories containing `SKILL.md` are discovered recursively.
64
+
65
+ Pi also supports the Agent Skills locations `~/.agents/skills/` and `.agents/skills/`. Project `.agents/skills/` directories are discovered from the working directory through its ancestors, stopping at the repository root when one exists.
66
+
67
+ Pi accepts some standalone Markdown skills, but a directory containing `SKILL.md` is the portable form and should be preferred. See [Settings](settings.md#resources) and [Pi Packages](packages.md) for additional locations.
68
+
69
+ Project skills can instruct the model to run scripts or modify files. Review unfamiliar skills and their supporting files before granting project trust.
70
+
71
+ ## Write portable frontmatter
72
+
73
+ The Agent Skills specification defines these fields:
74
+
75
+ | Field | Purpose |
76
+ |---|---|
77
+ | `name` | Command and display name |
78
+ | `description` | Routing description shown to the model |
79
+ | `license` | License name or bundled license file |
80
+ | `compatibility` | Environment requirements |
81
+ | `metadata` | Additional key-value metadata |
82
+ | `allowed-tools` | Experimental pre-approved tool list |
83
+ | `disable-model-invocation` | Hide the skill from automatic model selection |
84
+
85
+ Names use lowercase letters, numbers, and hyphens, with no leading, trailing, or consecutive hyphens. They can contain at most 64 characters; descriptions can contain at most 1024.
86
+
87
+ Pi neither requires nor warns when the declared name differs from the parent directory. Other Agent Skills implementations may enforce that requirement, so matching names remain the portable choice.
88
+
89
+ Malformed `SKILL.md` files and declared skills without descriptions are not loaded. Name collisions keep the first discovered skill and produce a warning.
90
+
91
+ ## Validate and share a skill
92
+
93
+ Run Pi from a location where the skill is discoverable, then inspect the startup diagnostics and `/skill:name` command. Run `/reload` after editing a skill during an active session.
94
+
95
+ Use a [Pi package](packages.md) to distribute one or more skills through npm or git. Keep environment setup inside the skill and declare any required runtime dependencies in the package.
96
+
97
+ For examples, see the [Anthropic skills collection](https://github.com/anthropics/skills) and [Pi skills collection](https://github.com/badlogic/pi-skills).
@@ -0,0 +1,64 @@
1
+ > Source: [packages/coding-agent/docs/slash-commands.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/slash-commands.md)
2
+ > Retrieved with Firecrawl: 2026-10-05. Repository snapshot: `b78e6a9085343ec0f308c3d377da72528b4cf7ee`.
3
+ > Relative documentation links point to local copies where available, otherwise to the source snapshot.
4
+
5
+ # Slash commands
6
+
7
+ 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.
8
+
9
+ 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.
10
+
11
+ ## Models and settings
12
+
13
+ | Command | Description |
14
+ |---|---|
15
+ | `/settings` | Open settings |
16
+ | `/model [provider/model]` | Select a model |
17
+ | `/thinking [level]` | Set the thinking level |
18
+ | `/scoped-models` | Configure the models used by interactive cycling |
19
+ | `/login [provider]` | Add provider authentication |
20
+ | `/logout` | Remove provider authentication |
21
+ | `/llama` | Manage models on the configured llama.cpp router |
22
+
23
+ ## Sessions and context
24
+
25
+ | Command | Description |
26
+ |---|---|
27
+ | `/new` | Start a new session |
28
+ | `/resume` | Switch to another saved session |
29
+ | `/name [name]` | Set the session display name, or show the current name when omitted |
30
+ | `/session` | Show current session information and statistics |
31
+ | `/tree` | Navigate the session tree |
32
+ | `/fork` | Create a new session from an earlier user message |
33
+ | `/clone` | Duplicate the current session at its current position |
34
+ | `/compact [instructions]` | Compact the current context, optionally with custom instructions |
35
+ | `/import <path>` | Import and resume a JSONL session |
36
+
37
+ ## Export and share
38
+
39
+ | Command | Description |
40
+ |---|---|
41
+ | `/copy` | Copy the last assistant message |
42
+ | `/export [path]` | Export the session as HTML or JSONL |
43
+ | `/share` | Upload the session and return a viewer link |
44
+ | `/bug [description]` | Prepare a private bug report for the Pi developers |
45
+
46
+ Review a session before exporting or sharing it. Sessions can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
47
+
48
+ ## Runtime and project
49
+
50
+ | Command | Description |
51
+ |---|---|
52
+ | `/trust` | Save a project trust decision for future Pi processes |
53
+ | `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
54
+ | `/hotkeys` | Show active keyboard shortcuts |
55
+ | `/changelog` | Show changelog entries |
56
+ | `/quit` | Quit Pi |
57
+
58
+ ## Commands added by resources
59
+
60
+ - Extensions can register commands with their own arguments and completion behavior.
61
+ - Each prompt template is available under its template name.
62
+ - Skills are available as `/skill:name` when skill commands are enabled.
63
+
64
+ 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.
@@ -0,0 +1,57 @@
1
+ # Pi documentation sources
2
+
3
+ 46 official source documents fetched with Firecrawl on 2026-10-05.
4
+ Repository snapshot: [`b78e6a9085343ec0f308c3d377da72528b4cf7ee`](https://github.com/earendil-works/pi/tree/b78e6a9085343ec0f308c3d377da72528b4cf7ee).
5
+
6
+ Repository documents use the pinned source snapshot. Website pages are dated captures. Source text is retained with provenance headers and resolved relative Markdown links.
7
+
8
+ Start with [the documentation index](index.md), [how Pi works](how-pi-works.md), and [the SDK](sdk.md). Supporting package references cover pi-ai, pi-agent-core, and Chord.
9
+
10
+ | Local document | Official source |
11
+ | --- | --- |
12
+ | [@earendil-works/chord](chord.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/chord/README.md) |
13
+ | [CLI Integration](cli-integration.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/cli-integration.md) |
14
+ | [Command Line](cli.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/cli.md) |
15
+ | [Codemode](codemode.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/codemode.md) |
16
+ | [Compaction Reference](compaction.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/compaction.md) |
17
+ | [Configuration](configuration.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/configuration.md) |
18
+ | [Run Pi in an isolated environment](containerization.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/containerization.md) |
19
+ | [Custom Providers](custom-provider.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/custom-provider.md) |
20
+ | [Environment Variables](environment-variables.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/environment-variables.md) |
21
+ | [Extensions](extensions.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/extensions.md) |
22
+ | [How Pi Works](how-pi-works.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/how-pi-works.md) |
23
+ | [Pi](index.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/index.md) |
24
+ | [JSON Event Stream](json.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/json.md) |
25
+ | [Keybindings Reference](keybindings.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/keybindings.md) |
26
+ | [Local Models with llama.cpp](llama-cpp.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/llama-cpp.md) |
27
+ | [MCP Servers](mcp.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/mcp.md) |
28
+ | [Message Types](message-types.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/message-types.md) |
29
+ | [Choose a Model](models.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/models.md) |
30
+ | [overview](overview.md) | [Source](https://pi.dev/) |
31
+ | [Pi Packages](packages.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/packages.md) |
32
+ | [@earendil-works/pi-agent-core](pi-agent-core.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/agent/README.md) |
33
+ | [@earendil-works/pi-ai](pi-ai.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/ai/README.md) |
34
+ | [Prompt Templates](prompt-templates.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/prompt-templates.md) |
35
+ | [Providers](providers.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/providers.md) |
36
+ | [Quickstart](quickstart.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/quickstart.md) |
37
+ | [Pi](readme.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/README.md) |
38
+ | [RPC Commands](rpc-commands.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/rpc-commands.md) |
39
+ | [RPC Extension UI](rpc-extension-ui.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/rpc-extension-ui.md) |
40
+ | [RPC Mode](rpc.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/rpc.md) |
41
+ | [SDK](sdk.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/sdk.md) |
42
+ | [Run Pi safely](security.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/security.md) |
43
+ | [Session File Format](session-format.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/session-format.md) |
44
+ | [Sessions and Context](sessions.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/sessions.md) |
45
+ | [Settings Reference](settings.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/settings.md) |
46
+ | [Configure shell commands](shell-aliases.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/shell-aliases.md) |
47
+ | [Skills](skills.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/skills.md) |
48
+ | [Slash commands](slash-commands.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/slash-commands.md) |
49
+ | [Configure your terminal](terminal-setup.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/terminal-setup.md) |
50
+ | [Run Pi on Android with Termux](termux.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/termux.md) |
51
+ | [Customize Pi with themes](themes.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/themes.md) |
52
+ | [Run Pi in tmux](tmux.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/tmux.md) |
53
+ | [Pi](toolkit.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/README.md) |
54
+ | [Terminal UI](tui.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/tui.md) |
55
+ | [Use Pi in the terminal](usage.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/usage.md) |
56
+ | [Virtual Models](virtual-models.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/virtual-models.md) |
57
+ | [Run Pi on Windows](windows.md) | [Source](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/windows.md) |
@@ -0,0 +1,223 @@
1
+ > Source: [packages/coding-agent/docs/terminal-setup.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/terminal-setup.md)
2
+ > Retrieved with Firecrawl: 2026-10-05. Repository snapshot: `b78e6a9085343ec0f308c3d377da72528b4cf7ee`.
3
+ > Relative documentation links point to local copies where available, otherwise to the source snapshot.
4
+
5
+ # Configure your terminal
6
+
7
+ Most modern terminals work with Pi without additional setup. Use this page when modified keys, scrolling, links, images, colors, or input-method editor (IME) positioning do not behave as expected.
8
+
9
+ Pi uses extended-key protocols so terminals can distinguish combinations such as `Shift+Enter` and `Alt+Enter` from plain `Enter`. Terminal proxies, multiplexers, and built-in IDE terminals can change or discard that information.
10
+
11
+ ## Troubleshooting
12
+
13
+ | Symptom | Start here |
14
+ |---|---|
15
+ | `Shift+Enter` submits instead of inserting a line | Your terminal's section below; for tmux, see [Run Pi in tmux](tmux.md) |
16
+ | `Alt+Enter` does not queue a follow-up | [WezTerm](#wezterm), [Alacritty](#alacritty), or [Windows Terminal](#windows-terminal) |
17
+ | Fullscreen scrolling is unusually slow | [iTerm2](#iterm2) |
18
+ | Links work but show no hover preview | [Ghostty](#ghostty) |
19
+ | Inline images or colors are not detected | [Override detected capabilities](#override-detected-capabilities) |
20
+ | An IME candidate window appears in the wrong place | [WezTerm](#wezterm) or [IntelliJ IDEA](#intellij-idea-integrated-terminal) |
21
+ | Modified keys fail only inside tmux | [Run Pi in tmux](tmux.md) |
22
+
23
+ Use `/hotkeys` to inspect Pi's active shortcuts. See [Keybindings](keybindings.md) to change them.
24
+
25
+ ## Kitty
26
+
27
+ Kitty supports the required keyboard protocol without additional configuration.
28
+
29
+ ## iTerm2
30
+
31
+ Regular terminal mode works without additional configuration.
32
+
33
+ ### Fix slow fullscreen scrolling
34
+
35
+ In fullscreen mode, Pi owns the viewport, so iTerm2 sends mouse-wheel reports instead of scrolling native terminal history. Fast trackpad gestures can then move only about one line at a time.
36
+
37
+ To change this behavior:
38
+
39
+ 1. Open **iTerm2 > Settings > Advanced**.
40
+ 2. Search for **Trackpad scrolls fast?**.
41
+ 3. Set it to **No**.
42
+
43
+ This is an iTerm2-wide setting and can also change native trackpad scrolling. The underlying behavior is tracked in [iTerm2 issue 9619](https://gitlab.com/gnachman/iterm2/-/work_items/9619).
44
+
45
+ ## Apple Terminal
46
+
47
+ Pi enables enhanced key reporting when available. If Terminal.app still sends plain Return for `Shift+Enter`, Pi uses a local macOS modifier fallback and treats it as `Shift+Enter`.
48
+
49
+ The fallback works only when Pi runs on the same Mac as Terminal.app. It cannot inspect the local modifier state when Pi runs on another machine over SSH.
50
+
51
+ ## Ghostty
52
+
53
+ Add this mapping to Ghostty's configuration if `Alt+Backspace` does not work:
54
+
55
+ ```text
56
+ keybind = alt+backspace=text:\x1b\x7f
57
+ ```
58
+
59
+ The configuration file is `~/Library/Application Support/com.mitchellh.ghostty/config` on macOS and `~/.config/ghostty/config` on Linux.
60
+
61
+ Older Claude Code configurations may contain:
62
+
63
+ ```text
64
+ keybind = shift+enter=text:\n
65
+ ```
66
+
67
+ This sends a raw linefeed, which Pi cannot distinguish from `Ctrl+J`. Remove the mapping if an older Claude Code installation is the only reason you added it. Pi already binds `Ctrl+J` as a newline alternative, so the mapping may appear to work while still preventing Pi and tmux from receiving a real `Shift+Enter` event.
68
+
69
+ ### Open links in fullscreen mode
70
+
71
+ Links remain clickable in fullscreen mode, but Ghostty does not show its normal hover underline or URL preview while Pi captures mouse input. Hold `Shift+Command` on macOS or `Shift+Ctrl` on Linux to use Ghostty's native link handling.
72
+
73
+ ## WezTerm
74
+
75
+ WezTerm normally reports `Shift+Enter` through xterm extended keys. To enable the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
76
+
77
+ ```lua
78
+ local wezterm = require 'wezterm'
79
+ local config = wezterm.config_builder()
80
+ config.enable_kitty_keyboard = true
81
+ return config
82
+ ```
83
+
84
+ ### Forward Alt+Enter on macOS
85
+
86
+ WezTerm binds `Option+Enter` to fullscreen by default on macOS. To use it for Pi's follow-up queue, add this entry to your `config.keys` table:
87
+
88
+ ```lua
89
+ {
90
+ key = 'Enter',
91
+ mods = 'ALT',
92
+ action = wezterm.action.SendString('\x1b[13;3u'),
93
+ }
94
+ ```
95
+
96
+ A complete minimal configuration is:
97
+
98
+ ```lua
99
+ local wezterm = require 'wezterm'
100
+ local config = wezterm.config_builder()
101
+ config.keys = {
102
+ {
103
+ key = 'Enter',
104
+ mods = 'ALT',
105
+ action = wezterm.action.SendString('\x1b[13;3u'),
106
+ },
107
+ }
108
+ return config
109
+ ```
110
+
111
+ ### Position an IME candidate window in WSL
112
+
113
+ If CJK IME candidates do not follow Pi's text cursor in WSL, show the hardware cursor:
114
+
115
+ ```bash
116
+ export PI_HARDWARE_CURSOR=1
117
+ pi
118
+ ```
119
+
120
+ You can instead set `showHardwareCursor` to `true` in Pi settings.
121
+
122
+ ## Alacritty
123
+
124
+ Alacritty normally reports `Shift+Enter`. On macOS, `Option+Enter` can arrive as plain `Enter`. Add this to `~/.config/alacritty/alacritty.toml` to forward it to Pi:
125
+
126
+ ```toml
127
+ [[keyboard.bindings]]
128
+ key = "Enter"
129
+ mods = "Alt"
130
+ chars = "\u001b[13;3u"
131
+ ```
132
+
133
+ Restart Alacritty after changing the file.
134
+
135
+ ## VS Code integrated terminal
136
+
137
+ VS Code 1.109.5 and newer enable the Kitty keyboard protocol in the integrated terminal by default.
138
+
139
+ For an older version, add a `Shift+Enter` terminal binding to `keybindings.json`:
140
+
141
+ ```json
142
+ {
143
+ "key": "shift+enter",
144
+ "command": "workbench.action.terminal.sendSequence",
145
+ "args": { "text": "\u001b[13;2u" },
146
+ "when": "terminalFocus"
147
+ }
148
+ ```
149
+
150
+ The user `keybindings.json` file is normally located at:
151
+
152
+ - macOS: `~/Library/Application Support/Code/User/keybindings.json`
153
+ - Linux: `~/.config/Code/User/keybindings.json`
154
+ - Windows: `%APPDATA%\\Code\\User\\keybindings.json`
155
+
156
+ ## Zed integrated terminal
157
+
158
+ Add these bindings to Zed's `keymap.json`:
159
+
160
+ ```json
161
+ {
162
+ "context": "Terminal",
163
+ "bindings": {
164
+ "shift-enter": ["terminal::SendText", "\u001b[13;2u"],
165
+ "ctrl--": ["terminal::SendText", "\u001b[45;5u"],
166
+ "ctrl-alt-]": ["terminal::SendText", "\u001b[93;7u"]
167
+ }
168
+ }
169
+ ```
170
+
171
+ ## Windows Terminal
172
+
173
+ Windows Terminal uses Pi's Windows and WSL shortcut defaults. See [Keybindings](keybindings.md) for the complete list.
174
+
175
+ ### Forward Shift+Enter
176
+
177
+ Open Windows Terminal's `settings.json` with `Ctrl+Shift+,` or **Settings > Open JSON file**. Add this object to its `actions` array:
178
+
179
+ ```json
180
+ {
181
+ "command": { "action": "sendInput", "input": "\u001b[13;2u" },
182
+ "keys": "shift+enter"
183
+ }
184
+ ```
185
+
186
+ Fully close and reopen Windows Terminal, then verify that `Shift+Enter` inserts a new line in Pi.
187
+
188
+ ### Use Alt+Enter for follow-ups
189
+
190
+ Windows Terminal binds `Alt+Enter` to fullscreen by default. Pi therefore uses `Ctrl+Q` for follow-ups on Windows and WSL.
191
+
192
+ To use `Alt+Enter` instead, configure Windows Terminal to forward the key and bind `app.message.followUp` to `alt+enter` in Pi's `keybindings.json`. See [Keybindings](keybindings.md#assign-keybindings).
193
+
194
+ ## xfce4-terminal and Terminator
195
+
196
+ These terminals cannot reliably distinguish modified Enter keys from plain `Enter`. Custom bindings such as `Ctrl+Enter` or `Shift+Enter` therefore may not work.
197
+
198
+ Use a terminal with modern extended-key support when you need those shortcuts, such as Kitty, Ghostty, WezTerm, iTerm2, Windows Terminal, or a compatible Alacritty build.
199
+
200
+ ## IntelliJ IDEA integrated terminal
201
+
202
+ IntelliJ IDEA's built-in terminal cannot reliably distinguish `Shift+Enter` from plain `Enter`. Use `Ctrl+J` for a newline or run Pi in a terminal with modern extended-key support.
203
+
204
+ If an IME candidate window does not follow the text cursor, show the hardware cursor:
205
+
206
+ ```bash
207
+ export PI_HARDWARE_CURSOR=1
208
+ pi
209
+ ```
210
+
211
+ ## Override detected capabilities
212
+
213
+ Pi automatically detects OSC 8 hyperlinks, inline image protocols, and truecolor support. A terminal proxy or multiplexer can make that detection inaccurate.
214
+
215
+ | Capability | Environment variable | Setting |
216
+ |---|---|---|
217
+ | Hyperlinks | `PI_HYPERLINKS=1\|0\|auto` | `terminal.hyperlinks: true\|false\|"auto"` |
218
+ | Inline images | `PI_IMAGE_PROTOCOL=kitty\|iterm2\|none\|auto` | `terminal.images: "kitty"\|"iterm2"\|false\|"auto"` |
219
+ | Truecolor | `PI_TRUE_COLOR=1\|0\|auto` | `terminal.trueColor: true\|false\|"auto"` |
220
+
221
+ Settings take precedence over environment variables. An unset value or `auto` preserves automatic detection.
222
+
223
+ Only force a capability supported by the complete terminal path. Unsupported escape sequences can corrupt rendering. See [Environment Variables](environment-variables.md#pi-process-configuration) and [Settings](settings.md) for the canonical value definitions.
@@ -0,0 +1,121 @@
1
+ > Source: [packages/coding-agent/docs/termux.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/termux.md)
2
+ > Retrieved with Firecrawl: 2026-10-05. Repository snapshot: `b78e6a9085343ec0f308c3d377da72528b4cf7ee`.
3
+ > Relative documentation links point to local copies where available, otherwise to the source snapshot.
4
+
5
+ # Run Pi on Android with Termux
6
+
7
+ Pi runs on Android through [Termux](https://termux.dev/), a terminal emulator and Linux environment. Text input, file tools, and shell commands are supported. Pi can copy and paste text through the Android clipboard with Termux:API. Clipboard image paste is not supported.
8
+
9
+ ## Before you begin
10
+
11
+ Install Termux from [GitHub or F-Droid](https://github.com/termux/termux-app#installation). Do not use the deprecated Google Play build.
12
+
13
+ [Termux:API](https://github.com/termux/termux-api#installation) is optional. Install it only when you want Pi to copy or paste Android clipboard text, or when shell commands need Android device APIs.
14
+
15
+ ## Install Pi
16
+
17
+ 1. Update Termux packages:
18
+
19
+ ```bash
20
+ pkg update && pkg upgrade
21
+ ```
22
+
23
+ 2. Install Node.js and Git:
24
+
25
+ ```bash
26
+ pkg install nodejs git
27
+ ```
28
+
29
+ 3. Install Pi:
30
+
31
+ ```bash
32
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent
33
+ ```
34
+
35
+ 4. Verify the installation:
36
+
37
+ ```bash
38
+ pi --version
39
+ ```
40
+
41
+ 5. Open the folder you want to work in and start Pi:
42
+
43
+ ```bash
44
+ cd /path/to/working-folder
45
+ pi
46
+ ```
47
+
48
+ Continue with the main [Quickstart](quickstart.md#3-choose-a-model) to connect a model and run your first task.
49
+
50
+ ## Access Android shared storage
51
+
52
+ Termux cannot access shared Android storage until you grant permission. Run this once:
53
+
54
+ ```bash
55
+ termux-setup-storage
56
+ ```
57
+
58
+ After approval, Android shared storage is available under `/storage/emulated/0` and through the links Termux creates under `~/storage/`.
59
+
60
+ Only grant this permission when Pi should be able to access those files. Commands and tools running in Termux use the same storage permissions as the Termux process.
61
+
62
+ ## Use clipboard commands
63
+
64
+ Pi uses `termux-clipboard-set` to copy text and `termux-clipboard-get` for its clipboard-paste shortcut. Shell commands can use both commands directly. Install the Termux:API app and its command-line package:
65
+
66
+ ```bash
67
+ pkg install termux-api
68
+ ```
69
+
70
+ Verify the integration:
71
+
72
+ ```bash
73
+ printf 'Pi clipboard test' | termux-clipboard-set
74
+ termux-clipboard-get
75
+ ```
76
+
77
+ The second command should print `Pi clipboard test`.
78
+
79
+ The Termux clipboard API supports text only. Pi's clipboard-paste shortcut inserts that text into the editor but cannot attach clipboard images.
80
+
81
+ ## Add Termux-specific instructions
82
+
83
+ Pi detects that it is running in Termux, but it cannot infer how you want it to interact with Android. Add only the environment details relevant to your work to `~/.pi/agent/AGENTS.md`:
84
+
85
+ ````markdown
86
+ # Termux environment
87
+
88
+ - Pi runs in Termux on Android.
89
+ - Shared Android storage is under `/storage/emulated/0`.
90
+ - Open URLs with `termux-open-url "https://example.com"`.
91
+ - Open files with `termux-open <path>`.
92
+ - Do not access shared storage unless the task requires it.
93
+ ````
94
+
95
+ Run `/reload` after changing the file during an active session.
96
+
97
+ ## Troubleshooting
98
+
99
+ ### Clipboard integration fails
100
+
101
+ Confirm that you installed both components:
102
+
103
+ 1. The Termux:API Android app from the same source as Termux
104
+ 2. The `termux-api` command-line package
105
+
106
+ Then run the clipboard verification commands above outside Pi. If they fail there, fix the Termux:API installation before retrying Pi's copy command.
107
+
108
+ ### Shared storage reports permission denied
109
+
110
+ Run `termux-setup-storage`, approve the Android permission request, and retry the path under `~/storage/` or `/storage/emulated/0`.
111
+
112
+ ### Pi is not found after installation
113
+
114
+ Open a new Termux shell and run:
115
+
116
+ ```bash
117
+ npm prefix -g
118
+ command -v pi
119
+ ```
120
+
121
+ Confirm that the global npm binary directory is on `PATH`, then reinstall Pi if the package is missing.