@eminent337/aery 0.1.115 → 0.1.116

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 (270) hide show
  1. package/CHANGELOG.md +4172 -16
  2. package/README.md +621 -34
  3. package/dist/bun/cli.d.ts.map +1 -1
  4. package/dist/bun/cli.js +2 -1
  5. package/dist/bun/cli.js.map +1 -1
  6. package/dist/cli/args.d.ts.map +1 -1
  7. package/dist/cli/args.js +3 -0
  8. package/dist/cli/args.js.map +1 -1
  9. package/dist/cli/config-selector.d.ts +1 -1
  10. package/dist/cli/config-selector.d.ts.map +1 -1
  11. package/dist/cli/config-selector.js +1 -1
  12. package/dist/cli/config-selector.js.map +1 -1
  13. package/dist/cli.d.ts.map +1 -1
  14. package/dist/cli.js +4 -3
  15. package/dist/cli.js.map +1 -1
  16. package/dist/config.d.ts +11 -7
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +66 -46
  19. package/dist/config.js.map +1 -1
  20. package/dist/core/agent-session.d.ts +5 -5
  21. package/dist/core/agent-session.d.ts.map +1 -1
  22. package/dist/core/agent-session.js +37 -36
  23. package/dist/core/agent-session.js.map +1 -1
  24. package/dist/core/bash-executor.d.ts.map +1 -1
  25. package/dist/core/bash-executor.js +2 -2
  26. package/dist/core/bash-executor.js.map +1 -1
  27. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  28. package/dist/core/compaction/branch-summarization.js +1 -1
  29. package/dist/core/compaction/branch-summarization.js.map +1 -1
  30. package/dist/core/compaction/compaction.d.ts.map +1 -1
  31. package/dist/core/compaction/compaction.js +3 -3
  32. package/dist/core/compaction/compaction.js.map +1 -1
  33. package/dist/core/custom-openai-compatible.d.ts +1 -0
  34. package/dist/core/custom-openai-compatible.d.ts.map +1 -1
  35. package/dist/core/custom-openai-compatible.js +30 -4
  36. package/dist/core/custom-openai-compatible.js.map +1 -1
  37. package/dist/core/export-html/template.css +45 -1
  38. package/dist/core/export-html/template.js +68 -4
  39. package/dist/core/extensions/index.d.ts +1 -1
  40. package/dist/core/extensions/index.d.ts.map +1 -1
  41. package/dist/core/extensions/index.js.map +1 -1
  42. package/dist/core/extensions/runner.d.ts +3 -2
  43. package/dist/core/extensions/runner.d.ts.map +1 -1
  44. package/dist/core/extensions/runner.js +40 -0
  45. package/dist/core/extensions/runner.js.map +1 -1
  46. package/dist/core/extensions/types.d.ts +17 -3
  47. package/dist/core/extensions/types.d.ts.map +1 -1
  48. package/dist/core/extensions/types.js.map +1 -1
  49. package/dist/core/model-registry.d.ts +6 -0
  50. package/dist/core/model-registry.d.ts.map +1 -1
  51. package/dist/core/model-registry.js +59 -2
  52. package/dist/core/model-registry.js.map +1 -1
  53. package/dist/core/model-resolver.d.ts.map +1 -1
  54. package/dist/core/model-resolver.js +9 -1
  55. package/dist/core/model-resolver.js.map +1 -1
  56. package/dist/core/provider-display-names.d.ts +2 -0
  57. package/dist/core/provider-display-names.d.ts.map +1 -0
  58. package/dist/core/provider-display-names.js +35 -0
  59. package/dist/core/provider-display-names.js.map +1 -0
  60. package/dist/core/resource-loader.d.ts.map +1 -1
  61. package/dist/core/resource-loader.js +1 -1
  62. package/dist/core/resource-loader.js.map +1 -1
  63. package/dist/core/sdk.d.ts +3 -3
  64. package/dist/core/sdk.d.ts.map +1 -1
  65. package/dist/core/sdk.js +18 -10
  66. package/dist/core/sdk.js.map +1 -1
  67. package/dist/core/session-manager.d.ts +3 -3
  68. package/dist/core/session-manager.d.ts.map +1 -1
  69. package/dist/core/session-manager.js +1 -1
  70. package/dist/core/session-manager.js.map +1 -1
  71. package/dist/core/settings-manager.d.ts.map +1 -1
  72. package/dist/core/settings-manager.js +2 -2
  73. package/dist/core/settings-manager.js.map +1 -1
  74. package/dist/core/system-prompt.d.ts.map +1 -1
  75. package/dist/core/system-prompt.js +5 -5
  76. package/dist/core/system-prompt.js.map +1 -1
  77. package/dist/core/tools/bash.d.ts +2 -2
  78. package/dist/core/tools/bash.d.ts.map +1 -1
  79. package/dist/core/tools/bash.js +105 -125
  80. package/dist/core/tools/bash.js.map +1 -1
  81. package/dist/core/tools/find.d.ts.map +1 -1
  82. package/dist/core/tools/find.js +1 -1
  83. package/dist/core/tools/find.js.map +1 -1
  84. package/dist/core/tools/grep.d.ts.map +1 -1
  85. package/dist/core/tools/grep.js +1 -1
  86. package/dist/core/tools/grep.js.map +1 -1
  87. package/dist/core/tools/output-accumulator.d.ts +50 -0
  88. package/dist/core/tools/output-accumulator.d.ts.map +1 -0
  89. package/dist/core/tools/output-accumulator.js +178 -0
  90. package/dist/core/tools/output-accumulator.js.map +1 -0
  91. package/dist/core/tools/read.d.ts.map +1 -1
  92. package/dist/core/tools/read.js +70 -13
  93. package/dist/core/tools/read.js.map +1 -1
  94. package/dist/core/tools/render-utils.d.ts.map +1 -1
  95. package/dist/core/tools/render-utils.js +2 -2
  96. package/dist/core/tools/render-utils.js.map +1 -1
  97. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  98. package/dist/modes/interactive/components/bash-execution.js +1 -1
  99. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  100. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  101. package/dist/modes/interactive/components/config-selector.js +23 -1
  102. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  103. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
  104. package/dist/modes/interactive/components/earendil-announcement.js +2 -2
  105. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
  106. package/dist/modes/interactive/components/extension-selector.d.ts +2 -0
  107. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  108. package/dist/modes/interactive/components/extension-selector.js +6 -1
  109. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  110. package/dist/modes/interactive/components/keybinding-hints.d.ts +5 -0
  111. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  112. package/dist/modes/interactive/components/keybinding-hints.js +19 -5
  113. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  114. package/dist/modes/interactive/components/login-dialog.d.ts +1 -3
  115. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  116. package/dist/modes/interactive/components/login-dialog.js +9 -17
  117. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  118. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  119. package/dist/modes/interactive/components/oauth-selector.js +24 -27
  120. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  121. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  122. package/dist/modes/interactive/components/settings-selector.js +4 -2
  123. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  124. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  125. package/dist/modes/interactive/components/tree-selector.js +2 -1
  126. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  127. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  128. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  129. package/dist/modes/interactive/interactive-mode.js +9 -1
  130. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  131. package/dist/modes/interactive/theme/dark.json +1 -1
  132. package/dist/modes/interactive/theme/light.json +1 -1
  133. package/dist/modes/interactive/theme/theme-schema.json +1 -1
  134. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  135. package/dist/modes/interactive/theme/theme.js +8 -10
  136. package/dist/modes/interactive/theme/theme.js.map +1 -1
  137. package/dist/modes/print-mode.d.ts +2 -2
  138. package/dist/modes/print-mode.d.ts.map +1 -1
  139. package/dist/modes/print-mode.js +2 -2
  140. package/dist/modes/print-mode.js.map +1 -1
  141. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  142. package/dist/modes/rpc/rpc-mode.js +4 -0
  143. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  144. package/dist/utils/ansi.d.ts +2 -0
  145. package/dist/utils/ansi.d.ts.map +1 -0
  146. package/dist/utils/ansi.js +52 -0
  147. package/dist/utils/ansi.js.map +1 -0
  148. package/dist/utils/clipboard-image.d.ts.map +1 -1
  149. package/dist/utils/clipboard-image.js +3 -3
  150. package/dist/utils/clipboard-image.js.map +1 -1
  151. package/dist/utils/clipboard.d.ts.map +1 -1
  152. package/dist/utils/clipboard.js +9 -2
  153. package/dist/utils/clipboard.js.map +1 -1
  154. package/dist/utils/html.d.ts +7 -0
  155. package/dist/utils/html.d.ts.map +1 -0
  156. package/dist/utils/html.js +40 -0
  157. package/dist/utils/html.js.map +1 -0
  158. package/dist/utils/mime.d.ts +1 -0
  159. package/dist/utils/mime.d.ts.map +1 -1
  160. package/dist/utils/mime.js +59 -16
  161. package/dist/utils/mime.js.map +1 -1
  162. package/dist/utils/paths.d.ts +2 -0
  163. package/dist/utils/paths.d.ts.map +1 -1
  164. package/dist/utils/paths.js +16 -0
  165. package/dist/utils/paths.js.map +1 -1
  166. package/dist/utils/pi-user-agent.d.ts +2 -0
  167. package/dist/utils/pi-user-agent.d.ts.map +1 -0
  168. package/dist/utils/pi-user-agent.js +5 -0
  169. package/dist/utils/pi-user-agent.js.map +1 -0
  170. package/dist/utils/syntax-highlight.d.ts +12 -0
  171. package/dist/utils/syntax-highlight.d.ts.map +1 -0
  172. package/dist/utils/syntax-highlight.js +118 -0
  173. package/dist/utils/syntax-highlight.js.map +1 -0
  174. package/dist/utils/tools-manager.d.ts.map +1 -1
  175. package/dist/utils/tools-manager.js +76 -7
  176. package/dist/utils/tools-manager.js.map +1 -1
  177. package/dist/utils/uuid.d.ts +2 -0
  178. package/dist/utils/uuid.d.ts.map +1 -0
  179. package/dist/utils/uuid.js +40 -0
  180. package/dist/utils/uuid.js.map +1 -0
  181. package/dist/utils/version-check.d.ts +7 -0
  182. package/dist/utils/version-check.d.ts.map +1 -1
  183. package/dist/utils/version-check.js +12 -5
  184. package/dist/utils/version-check.js.map +1 -1
  185. package/docs/compaction.md +16 -16
  186. package/docs/custom-provider.md +40 -32
  187. package/docs/development.md +4 -4
  188. package/docs/docs.json +20 -5
  189. package/docs/extensions.md +152 -102
  190. package/docs/index.md +16 -7
  191. package/docs/json.md +7 -7
  192. package/docs/keybindings.md +3 -3
  193. package/docs/models.md +48 -8
  194. package/docs/packages.md +41 -36
  195. package/docs/prompt-templates.md +2 -2
  196. package/docs/providers.md +52 -36
  197. package/docs/quickstart.md +20 -20
  198. package/docs/rpc.md +9 -9
  199. package/docs/sdk.md +31 -53
  200. package/docs/session-format.md +10 -10
  201. package/docs/sessions.md +9 -9
  202. package/docs/settings.md +12 -6
  203. package/docs/skills.md +4 -4
  204. package/docs/terminal-setup.md +6 -6
  205. package/docs/termux.md +6 -6
  206. package/docs/themes.md +7 -7
  207. package/docs/tmux.md +1 -1
  208. package/docs/tui.md +8 -8
  209. package/docs/usage.md +41 -39
  210. package/examples/extensions/README.md +3 -5
  211. package/examples/extensions/antigravity-image-gen.ts +9 -9
  212. package/examples/extensions/auto-commit-on-exit.ts +1 -1
  213. package/examples/extensions/bash-spawn-hook.ts +2 -2
  214. package/examples/extensions/built-in-tool-renderer.ts +1 -1
  215. package/examples/extensions/custom-compaction.ts +1 -1
  216. package/examples/extensions/custom-header.ts +2 -2
  217. package/examples/extensions/custom-provider-anthropic/index.ts +2 -2
  218. package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
  219. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  220. package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
  221. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  222. package/examples/extensions/doom-overlay/README.md +2 -2
  223. package/examples/extensions/doom-overlay/doom/build.sh +2 -2
  224. package/examples/extensions/doom-overlay/index.ts +1 -1
  225. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  226. package/examples/extensions/handoff.ts +42 -5
  227. package/examples/extensions/hidden-thinking-label.ts +1 -1
  228. package/examples/extensions/inline-bash.ts +2 -2
  229. package/examples/extensions/input-transform.ts +3 -3
  230. package/examples/extensions/interactive-shell.ts +1 -1
  231. package/examples/extensions/mac-system-theme.ts +2 -2
  232. package/examples/extensions/minimal-mode.ts +1 -1
  233. package/examples/extensions/modal-editor.ts +1 -1
  234. package/examples/extensions/model-status.ts +1 -1
  235. package/examples/extensions/overlay-qa-tests.ts +6 -6
  236. package/examples/extensions/overlay-test.ts +1 -1
  237. package/examples/extensions/preset.ts +2 -2
  238. package/examples/extensions/provider-payload.ts +1 -1
  239. package/examples/extensions/rainbow-editor.ts +1 -1
  240. package/examples/extensions/rpc-demo.ts +1 -1
  241. package/examples/extensions/sandbox/index.ts +3 -3
  242. package/examples/extensions/sandbox/package-lock.json +7 -7
  243. package/examples/extensions/sandbox/package.json +1 -1
  244. package/examples/extensions/shutdown-command.ts +5 -5
  245. package/examples/extensions/ssh.ts +2 -2
  246. package/examples/extensions/subagent/README.md +2 -2
  247. package/examples/extensions/subagent/agents/aery-pods.md +1 -1
  248. package/examples/extensions/subagent/agents.ts +1 -1
  249. package/examples/extensions/subagent/index.ts +2 -2
  250. package/examples/extensions/titlebar-spinner.ts +1 -1
  251. package/examples/extensions/tool-override.ts +2 -2
  252. package/examples/extensions/truncated-tool.ts +1 -1
  253. package/examples/extensions/with-deps/package-lock.json +4 -4
  254. package/examples/extensions/with-deps/package.json +1 -1
  255. package/examples/extensions/working-indicator.ts +4 -4
  256. package/examples/extensions/working-message-test.ts +1 -1
  257. package/examples/sdk/01-minimal.ts +14 -10
  258. package/examples/sdk/02-custom-model.ts +12 -8
  259. package/examples/sdk/03-custom-prompt.ts +24 -16
  260. package/examples/sdk/04-skills.ts +2 -2
  261. package/examples/sdk/05-tools.ts +8 -4
  262. package/examples/sdk/06-extensions.ts +11 -7
  263. package/examples/sdk/07-context-files.ts +2 -2
  264. package/examples/sdk/08-prompt-templates.ts +2 -2
  265. package/examples/sdk/09-api-keys-and-oauth.ts +8 -4
  266. package/examples/sdk/10-settings.ts +4 -4
  267. package/examples/sdk/11-sessions.ts +4 -0
  268. package/examples/sdk/12-full-control.ts +11 -7
  269. package/examples/sdk/README.md +5 -8
  270. package/package.json +8 -14
package/README.md CHANGED
@@ -1,66 +1,653 @@
1
- > 🌐 **[eminent337.github.io](https://eminent337.github.io)** — Landing page
1
+ <p align="center">
2
+ <a href="https://eminent337.github.io">
3
+ <img alt="pi logo" src="https://eminent337.github.io/logo-auto.svg" width="128">
4
+ </a>
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://discord.com/invite/3cU7Bz4UPx"><img alt="Discord" src="https://img.shields.io/badge/discord-community-5865F2?style=flat-square&logo=discord&logoColor=white" /></a>
8
+ <a href="https://www.npmjs.com/package/@eminent337/aery"><img alt="npm" src="https://img.shields.io/npm/v/@eminent337/aery?style=flat-square" /></a>
9
+ </p>
10
+ <p align="center">
11
+ <a href="https://eminent337.github.io">eminent337.github.io</a> domain graciously donated by
12
+ <br /><br />
13
+ <a href="https://exe.dev"><img src="docs/images/exy.png" alt="Exy mascot" width="48" /><br />exe.dev</a>
14
+ </p>
2
15
 
3
- # Aery
16
+ > New issues and PRs from new contributors are auto-closed by default. Maintainers review auto-closed issues daily. See [CONTRIBUTING.md](../../CONTRIBUTING.md).
4
17
 
5
- > AI coding agent for the terminal. Built by Aryee.
18
+ ---
6
19
 
7
- [![npm version](https://img.shields.io/npm/v/@eminent337/aery?color=7eb8d4&label=version)](https://www.npmjs.com/package/@eminent337/aery)
8
- [![npm downloads](https://img.shields.io/npm/dm/@eminent337/aery?color=7eb8d4&label=downloads)](https://www.npmjs.com/package/@eminent337/aery)
9
- [![license](https://img.shields.io/npm/l/@eminent337/aery?color=7eb8d4)](https://github.com/eminent337/aery/blob/main/LICENSE)
10
- [![GitHub stars](https://img.shields.io/github/stars/eminent337/aery?color=7eb8d4)](https://github.com/eminent337/aery)
20
+ Pi is a minimal terminal coding harness. Adapt pi to your workflows, not the other way around, without having to fork and modify pi internals. Extend it with TypeScript [Extensions](#extensions), [Skills](#skills), [Prompt Templates](#prompt-templates), and [Themes](#themes). Put your extensions, skills, prompt templates, and themes in [Pi Packages](#pi-packages) and share them with others via npm or git.
11
21
 
12
- Aery is a powerful, extensible AI coding agent that lives in your terminal. It reads your codebase, edits files, runs commands, and manages git workflows through natural language with automatic model failover across 300+ providers.
22
+ Pi ships with powerful defaults but skips features like sub agents and plan mode. Instead, you can ask pi to build what you want or install a third party pi package that matches your workflow.
13
23
 
14
- ## Install
24
+ Pi runs in four modes: interactive, print or JSON, RPC for process integration, and an SDK for embedding in your own apps. See [openclaw/openclaw](https://github.com/openclaw/openclaw) for a real-world SDK integration.
25
+
26
+ ## Share your OSS coding agent sessions
27
+
28
+ If you use pi for open source work, please share your coding agent sessions.
29
+
30
+ Public OSS session data helps improve models, prompts, tools, and evaluations using real development workflows.
31
+
32
+ For the full explanation, see [this post on X](https://x.com/badlogicgames/status/2037811643774652911).
33
+
34
+ To publish sessions, use [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). Read its README.md for setup instructions. All you need is a Hugging Face account, the Hugging Face CLI, and `pi-share-hf`.
35
+
36
+ You can also watch [this video](https://x.com/badlogicgames/status/2041151967695634619), where I show how I publish my `pi-mono` sessions.
37
+
38
+ I regularly publish my own `pi-mono` work sessions here:
39
+
40
+ - [badlogicgames/pi-mono on Hugging Face](https://huggingface.co/datasets/badlogicgames/pi-mono)
41
+
42
+ ## Table of Contents
43
+
44
+ - [Quick Start](#quick-start)
45
+ - [Providers & Models](#providers--models)
46
+ - [Interactive Mode](#interactive-mode)
47
+ - [Editor](#editor)
48
+ - [Commands](#commands)
49
+ - [Keyboard Shortcuts](#keyboard-shortcuts)
50
+ - [Message Queue](#message-queue)
51
+ - [Sessions](#sessions)
52
+ - [Branching](#branching)
53
+ - [Compaction](#compaction)
54
+ - [Settings](#settings)
55
+ - [Context Files](#context-files)
56
+ - [Customization](#customization)
57
+ - [Prompt Templates](#prompt-templates)
58
+ - [Skills](#skills)
59
+ - [Extensions](#extensions)
60
+ - [Themes](#themes)
61
+ - [Pi Packages](#pi-packages)
62
+ - [Programmatic Usage](#programmatic-usage)
63
+ - [Philosophy](#philosophy)
64
+ - [CLI Reference](#cli-reference)
65
+
66
+ ---
67
+
68
+ ## Quick Start
69
+
70
+ ```bash
71
+ curl -fsSL https://eminent337.github.io/install.sh | sh
72
+ ```
73
+
74
+ Or with npm:
15
75
 
16
76
  ```bash
17
77
  npm install -g @eminent337/aery
18
78
  ```
19
79
 
20
- Or from source:
80
+ Authenticate with an API key:
21
81
 
22
82
  ```bash
23
- git clone https://github.com/eminent337/aery && cd aery && ./install.sh
83
+ export ANTHROPIC_API_KEY=sk-ant-...
84
+ pi
24
85
  ```
25
86
 
26
- ## Quick Start
87
+ Or use your existing subscription:
27
88
 
28
89
  ```bash
29
- aery
90
+ pi
91
+ /login # Then select provider
30
92
  ```
31
93
 
32
- ## Why Aery?
94
+ Then just talk to pi. By default, pi gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [pi packages](#pi-packages).
95
+
96
+ **Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [tmux](docs/tmux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)
97
+
98
+ ---
99
+
100
+ ## Providers & Models
101
+
102
+ For each built-in provider, pi maintains a list of tool-capable models, updated with every release. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L).
103
+
104
+ **Subscriptions:**
105
+ - Anthropic Claude Pro/Max
106
+ - OpenAI ChatGPT Plus/Pro (Codex)
107
+ - GitHub Copilot
108
+
109
+ **API keys:**
110
+ - Anthropic
111
+ - OpenAI
112
+ - Azure OpenAI
113
+ - DeepSeek
114
+ - Google Gemini
115
+ - Google Vertex
116
+ - Amazon Bedrock
117
+ - Mistral
118
+ - Groq
119
+ - Cerebras
120
+ - Cloudflare AI Gateway
121
+ - Cloudflare Workers AI
122
+ - xAI
123
+ - OpenRouter
124
+ - Vercel AI Gateway
125
+ - ZAI
126
+ - OpenCode Zen
127
+ - OpenCode Go
128
+ - Hugging Face
129
+ - Fireworks
130
+ - Together AI
131
+ - Kimi For Coding
132
+ - MiniMax
133
+ - Xiaomi MiMo
134
+ - Xiaomi MiMo Token Plan (China)
135
+ - Xiaomi MiMo Token Plan (Amsterdam)
136
+ - Xiaomi MiMo Token Plan (Singapore)
137
+
138
+ See [docs/providers.md](docs/providers.md) for detailed setup instructions.
139
+
140
+ **Custom providers & models:** Add providers via `~/.aery/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md).
141
+
142
+ ---
143
+
144
+ ## Interactive Mode
145
+
146
+ <p align="center"><img src="docs/images/interactive-mode.png" alt="Interactive Mode" width="600"></p>
147
+
148
+ The interface from top to bottom:
149
+
150
+ - **Startup header** - Shows shortcuts (`/hotkeys` for all), loaded AGENTS.md files, prompt templates, skills, and extensions
151
+ - **Messages** - Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI
152
+ - **Editor** - Where you type; border color indicates thinking level
153
+ - **Footer** - Working directory, session name, total token/cache usage, cost, context usage, current model
154
+
155
+ The editor can be temporarily replaced by other UI, like built-in `/settings` or custom UI from extensions (e.g., a Q&A tool that lets the user answer model questions in a structured format). [Extensions](#extensions) can also replace the editor, add widgets above/below it, a status line, custom footer, or overlays.
156
+
157
+ ### Editor
158
+
159
+ | Feature | How |
160
+ |---------|-----|
161
+ | File reference | Type `@` to fuzzy-search project files |
162
+ | Path completion | Tab to complete paths |
163
+ | Multi-line | Shift+Enter (or Ctrl+Enter on Windows Terminal) |
164
+ | Images | Ctrl+V to paste (Alt+V on Windows), or drag onto terminal |
165
+ | Bash commands | `!command` runs and sends output to LLM, `!!command` runs without sending |
166
+
167
+ Standard editing keybindings for delete word, undo, etc. See [docs/keybindings.md](docs/keybindings.md).
168
+
169
+ ### Commands
170
+
171
+ Type `/` in the editor to trigger commands. [Extensions](#extensions) can register custom commands, [skills](#skills) are available as `/skill:name`, and [prompt templates](#prompt-templates) expand via `/templatename`.
172
+
173
+ | Command | Description |
174
+ |---------|-------------|
175
+ | `/login`, `/logout` | OAuth authentication |
176
+ | `/model` | Switch models |
177
+ | `/scoped-models` | Enable/disable models for Ctrl+P cycling |
178
+ | `/settings` | Thinking level, theme, message delivery, transport |
179
+ | `/resume` | Pick from previous sessions |
180
+ | `/new` | Start a new session |
181
+ | `/name <name>` | Set session display name |
182
+ | `/session` | Show session info (file, ID, messages, tokens, cost) |
183
+ | `/tree` | Jump to any point in the session and continue from there |
184
+ | `/fork` | Create a new session from a previous user message |
185
+ | `/clone` | Duplicate the current active branch into a new session |
186
+ | `/compact [prompt]` | Manually compact context, optional custom instructions |
187
+ | `/copy` | Copy last assistant message to clipboard |
188
+ | `/export [file]` | Export session to HTML file |
189
+ | `/share` | Upload as private GitHub gist with shareable HTML link |
190
+ | `/reload` | Reload keybindings, extensions, skills, prompts, and context files (themes hot-reload automatically) |
191
+ | `/hotkeys` | Show all keyboard shortcuts |
192
+ | `/changelog` | Display version history |
193
+ | `/quit` | Quit pi |
194
+
195
+ ### Keyboard Shortcuts
196
+
197
+ See `/hotkeys` for the full list. Customize via `~/.aery/agent/keybindings.json`. See [docs/keybindings.md](docs/keybindings.md).
198
+
199
+ **Commonly used:**
200
+
201
+ | Key | Action |
202
+ |-----|--------|
203
+ | Ctrl+C | Clear editor |
204
+ | Ctrl+C twice | Quit |
205
+ | Escape | Cancel/abort |
206
+ | Escape twice | Open `/tree` |
207
+ | Ctrl+L | Open model selector |
208
+ | Ctrl+P / Shift+Ctrl+P | Cycle scoped models forward/backward |
209
+ | Shift+Tab | Cycle thinking level |
210
+ | Ctrl+O | Collapse/expand tool output |
211
+ | Ctrl+T | Collapse/expand thinking blocks |
212
+
213
+ ### Message Queue
214
+
215
+ Submit messages while the agent is working:
216
+
217
+ - **Enter** queues a *steering* message, delivered after the current assistant turn finishes executing its tool calls
218
+ - **Alt+Enter** queues a *follow-up* message, delivered only after the agent finishes all work
219
+ - **Escape** aborts and restores queued messages to editor
220
+ - **Alt+Up** retrieves queued messages back to editor
221
+
222
+ On Windows Terminal, `Alt+Enter` is fullscreen by default. Remap it in [docs/terminal-setup.md](docs/terminal-setup.md) so pi can receive the follow-up shortcut.
223
+
224
+ Configure delivery in [settings](docs/settings.md): `steeringMode` and `followUpMode` can be `"one-at-a-time"` (default, waits for response) or `"all"` (delivers all queued at once). `transport` selects provider transport preference (`"sse"`, `"websocket"`, or `"auto"`) for providers that support multiple transports.
33
225
 
34
- - **Multi-provider** — works with NVIDIA, OpenRouter, Anthropic, OpenAI, Gemini, and 300+ more
35
- - **Auto-router** — automatically picks the best model for each task (simple vs complex)
36
- - **Model failover** — switches to next working model on rate limits or errors (402/429)
37
- - **Free model support** — works with free OpenRouter models, handles their limitations automatically
38
- - **27 extensions** — agent teams, loop scheduler, session memory, health scoring, and more
226
+ ---
39
227
 
40
- ## Extensions
228
+ ## Sessions
41
229
 
42
- All features are implemented as extensions in `~/.aery/agent/extensions/`. Add your own or modify existing ones without touching the core.
230
+ Sessions are stored as JSONL files with a tree structure. Each entry has an `id` and `parentId`, enabling in-place branching without creating new files. See [docs/session-format.md](docs/session-format.md) for file format.
43
231
 
44
- ## Configuration
232
+ ### Management
45
233
 
234
+ Sessions auto-save to `~/.aery/agent/sessions/` organized by working directory.
235
+
236
+ ```bash
237
+ pi -c # Continue most recent session
238
+ pi -r # Browse and select from past sessions
239
+ pi --no-session # Ephemeral mode (don't save)
240
+ pi --session <path|id> # Use specific session file or ID
241
+ pi --fork <path|id> # Fork specific session file or ID into a new session
46
242
  ```
47
- ~/.aery/agent/
48
- ├── settings.json — theme, extensions, defaults
49
- ├── auth.json — API keys
50
- ├── profiles.json — provider profiles
51
- ├── models.json — custom model definitions
52
- └── AGENTS.md — system prompt injected every session
243
+
244
+ Use `/session` in interactive mode to see the current session ID before reusing it with `--session <id>` or `--fork <id>`.
245
+
246
+ ### Branching
247
+
248
+ **`/tree`** - Navigate the session tree in-place. Select any previous point, continue from there, and switch between branches. All history preserved in a single file.
249
+
250
+ <p align="center"><img src="docs/images/tree-view.png" alt="Tree View" width="600"></p>
251
+
252
+ - Search by typing, fold/unfold and jump between branches with Ctrl+←/Ctrl+→ or Alt+←/Alt+→, page with ←/→
253
+ - Filter modes (Ctrl+O): default → no-tools → user-only → labeled-only → all
254
+ - Press Shift+L to label entries as bookmarks and Shift+T to toggle label timestamps
255
+
256
+ **`/fork`** - Create a new session file from a previous user message on the active branch. Opens a selector, copies the active path up to that point, and places the selected prompt in the editor for modification.
257
+
258
+ **`/clone`** - Duplicate the current active branch into a new session file at the current position. The new session keeps the full active-path history and opens with an empty editor.
259
+
260
+ **`--fork <path|id>`** - Fork an existing session file or partial session UUID directly from the CLI. This copies the full source session into a new session file in the current project.
261
+
262
+ ### Compaction
263
+
264
+ Long sessions can exhaust context windows. Compaction summarizes older messages while keeping recent ones.
265
+
266
+ **Manual:** `/compact` or `/compact <custom instructions>`
267
+
268
+ **Automatic:** Enabled by default. Triggers on context overflow (recovers and retries) or when approaching the limit (proactive). Configure via `/settings` or `settings.json`.
269
+
270
+ Compaction is lossy. The full history remains in the JSONL file; use `/tree` to revisit. Customize compaction behavior via [extensions](#extensions). See [docs/compaction.md](docs/compaction.md) for internals.
271
+
272
+ ---
273
+
274
+ ## Settings
275
+
276
+ Use `/settings` to modify common options, or edit JSON files directly:
277
+
278
+ | Location | Scope |
279
+ |----------|-------|
280
+ | `~/.aery/agent/settings.json` | Global (all projects) |
281
+ | `.aery/settings.json` | Project (overrides global) |
282
+
283
+ See [docs/settings.md](docs/settings.md) for all options.
284
+
285
+ ### Telemetry and update checks
286
+
287
+ Pi has two separate startup features:
288
+
289
+ - **Update check:** fetches `https://eminent337.github.io/api/latest-version` to check whether a newer Pi version exists. Disable it with `AERY_SKIP_VERSION_CHECK=1`. Disabling update checks only turns off this check.
290
+ - **Install/update telemetry:** after first install or a changelog-detected update, sends an anonymous version ping to `https://eminent337.github.io/api/report-install`. Opt out by setting `enableInstallTelemetry` to `false` in `settings.json`, or by setting `AERY_TELEMETRY=0`. This does not disable update checks; Pi may still contact `eminent337.github.io` for the latest version unless update checks are disabled or offline mode is enabled.
291
+
292
+ Use `--offline` or `AERY_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
293
+
294
+ ---
295
+
296
+ ## Context Files
297
+
298
+ Pi loads `AGENTS.md` (or `CLAUDE.md`) at startup from:
299
+ - `~/.aery/agent/AGENTS.md` (global)
300
+ - Parent directories (walking up from cwd)
301
+ - Current directory
302
+
303
+ Use for project instructions, conventions, common commands. All matching files are concatenated.
304
+
305
+ Disable context file loading with `--no-context-files` (or `-nc`).
306
+
307
+ ### System Prompt
308
+
309
+ Replace the default system prompt with `.pi/SYSTEM.md` (project) or `~/.aery/agent/SYSTEM.md` (global). Append without replacing via `APPEND_SYSTEM.md`.
310
+
311
+ ---
312
+
313
+ ## Customization
314
+
315
+ ### Prompt Templates
316
+
317
+ Reusable prompts as Markdown files. Type `/name` to expand.
318
+
319
+ ```markdown
320
+ <!-- ~/.aery/agent/prompts/review.md -->
321
+ Review this code for bugs, security issues, and performance problems.
322
+ Focus on: {{focus}}
53
323
  ```
54
324
 
55
- ## Key Commands
325
+ Place in `~/.aery/agent/prompts/`, `.aery/prompts/`, or a [pi package](#pi-packages) to share with others. See [docs/prompt-templates.md](docs/prompt-templates.md).
56
326
 
327
+ ### Skills
328
+
329
+ On-demand capability packages following the [Agent Skills standard](https://agentskills.io). Invoke via `/skill:name` or let the agent load them automatically.
330
+
331
+ ```markdown
332
+ <!-- ~/.aery/agent/skills/my-skill/SKILL.md -->
333
+ # My Skill
334
+ Use this skill when the user asks about X.
335
+
336
+ ## Steps
337
+ 1. Do this
338
+ 2. Then that
57
339
  ```
58
- /provider — switch provider/model profile
59
- /loop 1h ... — schedule recurring agent task
60
- /health — run code quality checks
61
- /checkpoint — save/restore working state
340
+
341
+ Place in `~/.aery/agent/skills/`, `~/.agents/skills/`, `.aery/skills/`, or `.agents/skills/` (from `cwd` up through parent directories) or a [pi package](#pi-packages) to share with others. See [docs/skills.md](docs/skills.md).
342
+
343
+ ### Extensions
344
+
345
+ <p align="center"><img src="docs/images/doom-extension.png" alt="Doom Extension" width="600"></p>
346
+
347
+ TypeScript modules that extend pi with custom tools, commands, keyboard shortcuts, event handlers, and UI components.
348
+
349
+ ```typescript
350
+ export default function (pi: ExtensionAPI) {
351
+ pi.registerTool({ name: "deploy", ... });
352
+ pi.registerCommand("stats", { ... });
353
+ pi.on("tool_call", async (event, ctx) => { ... });
354
+ }
62
355
  ```
63
356
 
357
+ The default export can also be `async`. pi waits for async extension factories before startup continues, which is useful for one-time initialization such as fetching remote model lists before calling `pi.registerProvider()`.
358
+
359
+ **What's possible:**
360
+ - Custom tools (or replace built-in tools entirely)
361
+ - Sub-agents and plan mode
362
+ - Custom compaction and summarization
363
+ - Permission gates and path protection
364
+ - Custom editors and UI components
365
+ - Status lines, headers, footers
366
+ - Git checkpointing and auto-commit
367
+ - SSH and sandbox execution
368
+ - MCP server integration
369
+ - Make pi look like Claude Code
370
+ - Games while waiting (yes, Doom runs)
371
+ - ...anything you can dream up
372
+
373
+ Place in `~/.aery/agent/extensions/`, `.aery/extensions/`, or a [pi package](#pi-packages) to share with others. See [docs/extensions.md](docs/extensions.md) and [examples/extensions/](examples/extensions/).
374
+
375
+ ### Themes
376
+
377
+ Built-in: `dark`, `light`. Themes hot-reload: modify the active theme file and pi immediately applies changes.
378
+
379
+ Place in `~/.aery/agent/themes/`, `.aery/themes/`, or a [pi package](#pi-packages) to share with others. See [docs/themes.md](docs/themes.md).
380
+
381
+ ### Pi Packages
382
+
383
+ Bundle and share extensions, skills, prompts, and themes via npm or git. Find packages on [npmjs.com](https://www.npmjs.com/search?q=keywords%3Api-package) or [Discord](https://discord.com/channels/1456806362351669492/1457744485428629628).
384
+
385
+ > **Security:** Pi packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
386
+
387
+ ```bash
388
+ pi install npm:@foo/pi-tools
389
+ pi install npm:@foo/pi-tools@1.2.3 # pinned version
390
+ pi install git:github.com/user/repo
391
+ pi install git:github.com/user/repo@v1 # tag or commit
392
+ pi install git:git@github.com:user/repo
393
+ pi install git:git@github.com:user/repo@v1 # tag or commit
394
+ pi install https://github.com/user/repo
395
+ pi install https://github.com/user/repo@v1 # tag or commit
396
+ pi install ssh://git@github.com/user/repo
397
+ pi install ssh://git@github.com/user/repo@v1 # tag or commit
398
+ pi remove npm:@foo/pi-tools
399
+ pi uninstall npm:@foo/pi-tools # alias for remove
400
+ pi list
401
+ pi update # update pi and packages (skips pinned packages)
402
+ pi update --extensions # update packages only
403
+ pi update --self # update pi only
404
+ pi update --self --force # reinstall pi even if current
405
+ pi update npm:@foo/pi-tools # update one package
406
+ pi config # enable/disable extensions, skills, prompts, themes
407
+ ```
408
+
409
+ Packages install to `~/.aery/agent/git/` (git) or global npm. Use `-l` for project-local installs (`.aery/git/`, `.aery/npm/`). Git packages install dependencies with `npm install --omit=dev` by default, so runtime deps must be listed under `dependencies`; when `npmCommand` is configured, git packages use plain `install` for compatibility with wrappers. If you use a Node version manager and want package installs to reuse a stable npm context, set `npmCommand` in `settings.json`, for example `["mise", "exec", "node@20", "--", "npm"]`.
410
+
411
+ Create a package by adding a `pi` key to `package.json`:
412
+
413
+ ```json
414
+ {
415
+ "name": "my-pi-package",
416
+ "keywords": ["pi-package"],
417
+ "pi": {
418
+ "extensions": ["./extensions"],
419
+ "skills": ["./skills"],
420
+ "prompts": ["./prompts"],
421
+ "themes": ["./themes"]
422
+ }
423
+ }
424
+ ```
425
+
426
+ Without a `pi` manifest, pi auto-discovers from conventional directories (`extensions/`, `skills/`, `prompts/`, `themes/`).
427
+
428
+ See [docs/packages.md](docs/packages.md).
429
+
430
+ ---
431
+
432
+ ## Programmatic Usage
433
+
434
+ ### SDK
435
+
436
+ ```typescript
437
+ import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "@eminent337/aery";
438
+
439
+ const authStorage = AuthStorage.create();
440
+ const modelRegistry = ModelRegistry.create(authStorage);
441
+ const { session } = await createAgentSession({
442
+ sessionManager: SessionManager.inMemory(),
443
+ authStorage,
444
+ modelRegistry,
445
+ });
446
+
447
+ await session.prompt("What files are in the current directory?");
448
+ ```
449
+
450
+ For advanced multi-session runtime replacement, use `createAgentSessionRuntime()` and `AgentSessionRuntime`.
451
+
452
+ See [docs/sdk.md](docs/sdk.md) and [examples/sdk/](examples/sdk/).
453
+
454
+ ### RPC Mode
455
+
456
+ For non-Node.js integrations, use RPC mode over stdin/stdout:
457
+
458
+ ```bash
459
+ pi --mode rpc
460
+ ```
461
+
462
+ RPC mode uses strict LF-delimited JSONL framing. Clients must split records on `\n` only. Do not use generic line readers like Node `readline`, which also split on Unicode separators inside JSON payloads.
463
+
464
+ See [docs/rpc.md](docs/rpc.md) for the protocol.
465
+
466
+ ---
467
+
468
+ ## Philosophy
469
+
470
+ Pi is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with [extensions](#extensions), [skills](#skills), or installed from third-party [pi packages](#pi-packages). This keeps the core minimal while letting you shape pi to fit how you work.
471
+
472
+ **No MCP.** Build CLI tools with READMEs (see [Skills](#skills)), or build an extension that adds MCP support. [Why?](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/)
473
+
474
+ **No sub-agents.** There's many ways to do this. Spawn pi instances via tmux, or build your own with [extensions](#extensions), or install a package that does it your way.
475
+
476
+ **No permission popups.** Run in a container, or build your own confirmation flow with [extensions](#extensions) inline with your environment and security requirements.
477
+
478
+ **No plan mode.** Write plans to files, or build it with [extensions](#extensions), or install a package.
479
+
480
+ **No built-in to-dos.** They confuse models. Use a TODO.md file, or build your own with [extensions](#extensions).
481
+
482
+ **No background bash.** Use tmux. Full observability, direct interaction.
483
+
484
+ Read the [blog post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/) for the full rationale.
485
+
486
+ ---
487
+
488
+ ## CLI Reference
489
+
490
+ ```bash
491
+ pi [options] [@files...] [messages...]
492
+ ```
493
+
494
+ ### Package Commands
495
+
496
+ ```bash
497
+ pi install <source> [-l] # Install package, -l for project-local
498
+ pi remove <source> [-l] # Remove package
499
+ pi uninstall <source> [-l] # Alias for remove
500
+ pi update [source|self|pi] # Update pi and packages (skips pinned packages)
501
+ pi update --extensions # Update packages only
502
+ pi update --self # Update pi only
503
+ pi update --self --force # Reinstall pi even if current
504
+ pi update --extension <src> # Update one package
505
+ pi list # List installed packages
506
+ pi config # Enable/disable package resources
507
+ ```
508
+
509
+ ### Modes
510
+
511
+ | Flag | Description |
512
+ |------|-------------|
513
+ | (default) | Interactive mode |
514
+ | `-p`, `--print` | Print response and exit |
515
+ | `--mode json` | Output all events as JSON lines (see [docs/json.md](docs/json.md)) |
516
+ | `--mode rpc` | RPC mode for process integration (see [docs/rpc.md](docs/rpc.md)) |
517
+ | `--export <in> [out]` | Export session to HTML |
518
+
519
+ In print mode, pi also reads piped stdin and merges it into the initial prompt:
520
+
521
+ ```bash
522
+ cat README.md | pi -p "Summarize this text"
523
+ ```
524
+
525
+ ### Model Options
526
+
527
+ | Option | Description |
528
+ |--------|-------------|
529
+ | `--provider <name>` | Provider (anthropic, openai, google, etc.) |
530
+ | `--model <pattern>` | Model pattern or ID (supports `provider/id` and optional `:<thinking>`) |
531
+ | `--api-key <key>` | API key (overrides env vars) |
532
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
533
+ | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
534
+ | `--list-models [search]` | List available models |
535
+
536
+ ### Session Options
537
+
538
+ | Option | Description |
539
+ |--------|-------------|
540
+ | `-c`, `--continue` | Continue most recent session |
541
+ | `-r`, `--resume` | Browse and select session |
542
+ | `--session <path\|id>` | Use specific session file or partial UUID |
543
+ | `--fork <path\|id>` | Fork specific session file or partial UUID into a new session |
544
+ | `--session-dir <dir>` | Custom session storage directory |
545
+ | `--no-session` | Ephemeral mode (don't save) |
546
+
547
+ ### Tool Options
548
+
549
+ | Option | Description |
550
+ |--------|-------------|
551
+ | `--tools <list>`, `-t <list>` | Allowlist specific tool names across built-in, extension, and custom tools |
552
+ | `--no-builtin-tools`, `-nbt` | Disable built-in tools by default but keep extension/custom tools enabled |
553
+ | `--no-tools`, `-nt` | Disable all tools by default |
554
+
555
+ Available built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
556
+
557
+ ### Resource Options
558
+
559
+ | Option | Description |
560
+ |--------|-------------|
561
+ | `-e`, `--extension <source>` | Load extension from path, npm, or git (repeatable) |
562
+ | `--no-extensions` | Disable extension discovery |
563
+ | `--skill <path>` | Load skill (repeatable) |
564
+ | `--no-skills` | Disable skill discovery |
565
+ | `--prompt-template <path>` | Load prompt template (repeatable) |
566
+ | `--no-prompt-templates` | Disable prompt template discovery |
567
+ | `--theme <path>` | Load theme (repeatable) |
568
+ | `--no-themes` | Disable theme discovery |
569
+ | `--no-context-files`, `-nc` | Disable AGENTS.md and CLAUDE.md context file discovery |
570
+
571
+ Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings.json (e.g., `--no-extensions -e ./my-ext.ts`).
572
+
573
+ ### Other Options
574
+
575
+ | Option | Description |
576
+ |--------|-------------|
577
+ | `--system-prompt <text>` | Replace default prompt (context files and skills still appended) |
578
+ | `--append-system-prompt <text>` | Append to system prompt |
579
+ | `--verbose` | Force verbose startup |
580
+ | `-h`, `--help` | Show help |
581
+ | `-v`, `--version` | Show version |
582
+
583
+ ### File Arguments
584
+
585
+ Prefix files with `@` to include in the message:
586
+
587
+ ```bash
588
+ pi @prompt.md "Answer this"
589
+ pi -p @screenshot.png "What's in this image?"
590
+ pi @code.ts @test.ts "Review these files"
591
+ ```
592
+
593
+ ### Examples
594
+
595
+ ```bash
596
+ # Interactive with initial prompt
597
+ pi "List all .ts files in src/"
598
+
599
+ # Non-interactive
600
+ pi -p "Summarize this codebase"
601
+
602
+ # Non-interactive with piped stdin
603
+ cat README.md | pi -p "Summarize this text"
604
+
605
+ # Different model
606
+ pi --provider openai --model gpt-4o "Help me refactor"
607
+
608
+ # Model with provider prefix (no --provider needed)
609
+ pi --model openai/gpt-4o "Help me refactor"
610
+
611
+ # Model with thinking level shorthand
612
+ pi --model sonnet:high "Solve this complex problem"
613
+
614
+ # Limit model cycling
615
+ pi --models "claude-*,gpt-4o"
616
+
617
+ # Read-only mode
618
+ pi --tools read,grep,find,ls -p "Review the code"
619
+
620
+ # High thinking level
621
+ pi --thinking high "Solve this complex problem"
622
+ ```
623
+
624
+ ### Environment Variables
625
+
626
+ | Variable | Description |
627
+ |----------|-------------|
628
+ | `AERY_CODING_AGENT_DIR` | Override config directory (default: `~/.aery/agent`) |
629
+ | `AERY_CODING_AGENT_SESSION_DIR` | Override session storage directory (overridden by `--session-dir`) |
630
+ | `AERY_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) |
631
+ | `AERY_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
632
+ | `AERY_SKIP_VERSION_CHECK` | Skip the Pi version update check at startup. This prevents the `eminent337.github.io` latest-version request |
633
+ | `AERY_TELEMETRY` | Override install/update telemetry. Use `1`/`true`/`yes` to enable or `0`/`false`/`no` to disable. This does not disable update checks |
634
+ | `AERY_CACHE_RETENTION` | Set to `long` for extended prompt cache (Anthropic: 1h, OpenAI: 24h) |
635
+ | `VISUAL`, `EDITOR` | External editor for Ctrl+G |
636
+
637
+ ---
638
+
639
+ ## Contributing & Development
640
+
641
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines and [docs/development.md](docs/development.md) for setup, forking, and debugging.
642
+
643
+ ---
644
+
64
645
  ## License
65
646
 
66
- MIT — see [LICENSE](LICENSE)
647
+ MIT
648
+
649
+ ## See Also
650
+
651
+ - [@eminent337/aery-ai](https://www.npmjs.com/package/@eminent337/aery-ai): Core LLM toolkit
652
+ - [@eminent337/aery-core](https://www.npmjs.com/package/@eminent337/aery-core): Agent framework
653
+ - [@eminent337/aery-tui](https://www.npmjs.com/package/@eminent337/aery-tui): Terminal UI components