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.
- package/.env.example +7 -0
- package/LICENSE +21 -0
- package/README.md +328 -2
- package/ai_docs/durable_pi/announcement.md +860 -0
- package/ai_docs/durable_pi/changelog.md +51 -0
- package/ai_docs/durable_pi/chord-delta-findings.md +362 -0
- package/ai_docs/durable_pi/coding-agent-integration.md +70 -0
- package/ai_docs/durable_pi/pico-v5-chord-usage.md +391 -0
- package/ai_docs/durable_pi/pico-v5-handoff.md +921 -0
- package/ai_docs/durable_pi/readme.md +617 -0
- package/ai_docs/durable_pi/sources.md +22 -0
- package/ai_docs/durable_pi/spec.md +4696 -0
- package/ai_docs/durable_pi/vacation-planner.md +57 -0
- package/ai_docs/pi/chord.md +268 -0
- package/ai_docs/pi/cli-integration.md +110 -0
- package/ai_docs/pi/cli.md +325 -0
- package/ai_docs/pi/codemode.md +211 -0
- package/ai_docs/pi/compaction.md +467 -0
- package/ai_docs/pi/configuration.md +51 -0
- package/ai_docs/pi/containerization.md +187 -0
- package/ai_docs/pi/custom-provider.md +177 -0
- package/ai_docs/pi/environment-variables.md +102 -0
- package/ai_docs/pi/extensions.md +278 -0
- package/ai_docs/pi/how-pi-works.md +53 -0
- package/ai_docs/pi/index.md +43 -0
- package/ai_docs/pi/json.md +230 -0
- package/ai_docs/pi/keybindings.md +198 -0
- package/ai_docs/pi/llama-cpp.md +118 -0
- package/ai_docs/pi/mcp.md +274 -0
- package/ai_docs/pi/message-types.md +265 -0
- package/ai_docs/pi/models.md +209 -0
- package/ai_docs/pi/overview.md +166 -0
- package/ai_docs/pi/packages.md +133 -0
- package/ai_docs/pi/pi-agent-core.md +568 -0
- package/ai_docs/pi/pi-ai.md +1942 -0
- package/ai_docs/pi/prompt-templates.md +63 -0
- package/ai_docs/pi/providers.md +204 -0
- package/ai_docs/pi/quickstart.md +140 -0
- package/ai_docs/pi/readme.md +99 -0
- package/ai_docs/pi/rpc-commands.md +864 -0
- package/ai_docs/pi/rpc-extension-ui.md +204 -0
- package/ai_docs/pi/rpc.md +197 -0
- package/ai_docs/pi/sdk.md +151 -0
- package/ai_docs/pi/security.md +103 -0
- package/ai_docs/pi/session-format.md +297 -0
- package/ai_docs/pi/sessions.md +70 -0
- package/ai_docs/pi/settings.md +173 -0
- package/ai_docs/pi/shell-aliases.md +97 -0
- package/ai_docs/pi/skills.md +97 -0
- package/ai_docs/pi/slash-commands.md +64 -0
- package/ai_docs/pi/sources.md +57 -0
- package/ai_docs/pi/terminal-setup.md +223 -0
- package/ai_docs/pi/termux.md +121 -0
- package/ai_docs/pi/themes.md +140 -0
- package/ai_docs/pi/tmux.md +59 -0
- package/ai_docs/pi/toolkit.md +168 -0
- package/ai_docs/pi/tui.md +129 -0
- package/ai_docs/pi/usage.md +98 -0
- package/ai_docs/pi/virtual-models.md +118 -0
- package/ai_docs/pi/windows.md +71 -0
- package/apps/dpi-backend/.nvmrc +1 -0
- package/apps/dpi-backend/API.md +99 -0
- package/apps/dpi-backend/README.md +119 -0
- package/apps/dpi-backend/deploy/backend.env.example +9 -0
- package/apps/dpi-backend/deploy/dpi-backend.plist +26 -0
- package/apps/dpi-backend/deploy/dpi-backend.service +22 -0
- package/apps/dpi-backend/package.json +33 -0
- package/apps/dpi-backend/prompts/one_sentence.md +3 -0
- package/apps/dpi-backend/prompts/smart_ass_opus_fix.md +169 -0
- package/apps/dpi-backend/scripts/check-contract.mjs +151 -0
- package/apps/dpi-backend/scripts/migrate-playground.ts +66 -0
- package/apps/dpi-backend/scripts/record-nested-fixture.mts +154 -0
- package/apps/dpi-backend/scripts/token.ts +57 -0
- package/apps/dpi-backend/src/addons.ts +139 -0
- package/apps/dpi-backend/src/auth.ts +20 -0
- package/apps/dpi-backend/src/config.ts +54 -0
- package/apps/dpi-backend/src/contract-check.ts +118 -0
- package/apps/dpi-backend/src/errors.ts +50 -0
- package/apps/dpi-backend/src/extensions.ts +510 -0
- package/apps/dpi-backend/src/faux.ts +80 -0
- package/apps/dpi-backend/src/history.ts +165 -0
- package/apps/dpi-backend/src/idempotency.ts +20 -0
- package/apps/dpi-backend/src/jev.ts +43 -0
- package/apps/dpi-backend/src/jobs.ts +790 -0
- package/apps/dpi-backend/src/main.ts +76 -0
- package/apps/dpi-backend/src/model-catalog.ts +180 -0
- package/apps/dpi-backend/src/pairing-files.ts +142 -0
- package/apps/dpi-backend/src/pairing.ts +459 -0
- package/apps/dpi-backend/src/routes.ts +217 -0
- package/apps/dpi-backend/src/shared-state.ts +85 -0
- package/apps/dpi-backend/src/store.ts +1240 -0
- package/apps/dpi-backend/src/streams.ts +256 -0
- package/apps/dpi-backend/src/tunnel.ts +955 -0
- package/apps/dpi-backend/tsconfig.json +13 -0
- package/apps/dpi-playground/README.md +83 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-CFGc7lHT.js +77 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-DFdKpwm_.css +1 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/anthropic.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/deepseek.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/durable-pi.svg +14 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/gemini.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/grok.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/kimi.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/lab.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/meta.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/minimax.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/openai.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/qwen.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/xiaomi.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/zai.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +16 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/index.html +15 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/package.json +5 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/anthropic.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/deepseek.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/durable-pi.svg +14 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/gemini.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/grok.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/kimi.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/lab.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/meta.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/minimax.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/openai.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/qwen.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/xiaomi.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/zai.png +0 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/App.vue +180 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/commands.ts +119 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/composables.ts +129 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/hub.ts +40 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/icon-path.ts +7 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/ids.ts +2 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/jobs.ts +80 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/link-policy.ts +16 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/markdown-policy.ts +115 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/markdown.ts +60 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair-close.ts +23 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair-handoff.ts +56 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair.ts +166 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/qrcode.ts +323 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/signature.ts +146 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/store.ts +373 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/stream.ts +183 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/AgentView.vue +342 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Composer.vue +198 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ContextBar.vue +254 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DeviceCredentialsDialog.vue +40 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DeviceIcon.vue +56 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DirBrowser.vue +95 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ExtensionsPanel.vue +96 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/HelpDialog.vue +69 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Inspector.vue +425 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/JobCard.vue +221 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/MobileNav.vue +39 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ModelPicker.vue +71 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NetworkSidebar.vue +236 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NewSessionDialog.vue +114 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/OfflinePanel.vue +128 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/PairDeviceWizard.vue +433 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/PromptDialog.vue +89 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/StateEditor.vue +179 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TasksPanel.vue +280 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Toast.vue +11 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TokenManager.vue +175 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TopBar.vue +114 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TranscriptItem.vue +152 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TreeRow.vue +195 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TunnelStatusBar.vue +107 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/extensions.css +105 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/jobs.css +655 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/main.ts +22 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/network.css +675 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/src/style.css +3203 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/tsconfig.json +16 -0
- package/apps/dpi-playground/apps/dpi-playground-fe/vite.config.ts +14 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/package.json +5 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/audit.ts +406 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/client-ip.ts +72 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/credentials.ts +265 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/guard.ts +43 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/http-errors.ts +156 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/identity.ts +60 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/limiter.ts +165 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/main.ts +460 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/monitor.ts +320 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/mux.ts +277 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/pairing.ts +816 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/proxy.ts +128 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/rotation.ts +583 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/seed.ts +11 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/transport.ts +108 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-token.ts +11 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-transport.ts +560 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel.ts +873 -0
- package/apps/dpi-playground/apps/dpi-playground-hub/tsconfig.json +13 -0
- package/apps/dpi-playground/package.json +37 -0
- package/apps/dpi-sdk/README.md +74 -0
- package/apps/dpi-sdk/package.json +20 -0
- package/apps/dpi-sdk/scripts/net.ts +73 -0
- package/apps/dpi-sdk/src/api.ts +631 -0
- package/apps/dpi-sdk/src/app-state.ts +111 -0
- package/apps/dpi-sdk/src/client.ts +330 -0
- package/apps/dpi-sdk/src/errors.ts +16 -0
- package/apps/dpi-sdk/src/jobs.ts +99 -0
- package/apps/dpi-sdk/src/models.ts +472 -0
- package/apps/dpi-sdk/src/node/chunk.ts +488 -0
- package/apps/dpi-sdk/src/node/config.ts +175 -0
- package/apps/dpi-sdk/src/node/drivers.ts +402 -0
- package/apps/dpi-sdk/src/node/ops.ts +114 -0
- package/apps/dpi-sdk/src/node/private-dir.ts +48 -0
- package/apps/dpi-sdk/src/node/registry-migration.ts +549 -0
- package/apps/dpi-sdk/src/node/registry.ts +390 -0
- package/apps/dpi-sdk/src/node/sse-writer.ts +151 -0
- package/apps/dpi-sdk/src/protocol/backoff.ts +31 -0
- package/apps/dpi-sdk/src/protocol/limits.ts +199 -0
- package/apps/dpi-sdk/src/protocol/pairing.ts +311 -0
- package/apps/dpi-sdk/src/protocol/rest-routes.ts +105 -0
- package/apps/dpi-sdk/src/protocol/tunnel.ts +331 -0
- package/apps/dpi-sdk/src/sse.ts +117 -0
- package/apps/dpi-sdk/src/transcript.ts +291 -0
- package/apps/dpi-sdk/tsconfig.json +13 -0
- package/apps/dpi-sdk/w +20 -0
- package/apps/dpi-tui/README.md +54 -0
- package/apps/dpi-tui/bin/dpi-tui.mjs +5 -0
- package/apps/dpi-tui/package.json +20 -0
- package/apps/dpi-tui/src/app.ts +433 -0
- package/apps/dpi-tui/src/commands.ts +151 -0
- package/apps/dpi-tui/src/main.ts +122 -0
- package/apps/dpi-tui/src/pairing.ts +287 -0
- package/apps/dpi-tui/src/pickers.ts +238 -0
- package/apps/dpi-tui/src/render.ts +164 -0
- package/apps/dpi-tui/src/theme.ts +57 -0
- package/apps/dpi-tui/tsconfig.json +14 -0
- package/bin/device.mjs +5 -0
- package/bin/hub.mjs +5 -0
- package/bin/tui.mjs +5 -0
- package/deploy/Caddyfile +120 -0
- package/docs/verification.md +102 -0
- package/dpi-network.example.yaml +62 -0
- package/images/01_durable_agent_network.svg +185 -0
- package/images/02_pi_made_durable.svg +204 -0
- package/images/03_restart_mid_tool.svg +168 -0
- package/images/07_one_api_every_client.svg +123 -0
- package/images/08_device_session_agent.svg +123 -0
- package/images/09_compact_keep_history.svg +143 -0
- package/images/10_shared_app_state.svg +177 -0
- package/images/11_durable_jobs_wait.svg +141 -0
- package/images/12_tools_change_mid_run.svg +231 -0
- package/images/13_hook_blocks_tool.svg +122 -0
- package/images/14_fork_at_any_entry.svg +119 -0
- package/images/15_web_client.png +0 -0
- package/images/16_terminal_client.svg +43 -0
- package/images/17_devices_are_data.svg +182 -0
- package/images/18_should_every_agent_be_durable.svg +118 -0
- package/images/19_sqlite_on_every_device.svg +155 -0
- package/images/20_admission_and_effects.svg +134 -0
- package/justfile +33 -0
- package/package.json +41 -4
- package/scripts/verify.mjs +210 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
> Source: [packages/coding-agent/docs/prompt-templates.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/prompt-templates.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
|
+
# Prompt Templates
|
|
6
|
+
|
|
7
|
+
Prompt templates turn Markdown files into reusable `/` commands. Use one when you want to reuse the same prompt without adding executable behavior or a larger set of supporting instructions.
|
|
8
|
+
|
|
9
|
+
A template can accept arguments and appear in command completion. Pi can load templates from personal configuration, project configuration, an explicit path, or a Pi package. Project configuration loads only after project trust is granted.
|
|
10
|
+
|
|
11
|
+
## Create a template
|
|
12
|
+
|
|
13
|
+
Create `~/.pi/agent/prompts/review.md`:
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
---
|
|
17
|
+
description: Review staged git changes
|
|
18
|
+
argument-hint: "[focus]"
|
|
19
|
+
---
|
|
20
|
+
Review the staged changes. Focus on ${1:-correctness, security, and error handling}.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The filename becomes the command name, so this template is available as `/review`. The `description` appears in command completion. If it is omitted, Pi uses the first non-empty line.
|
|
24
|
+
|
|
25
|
+
`argument-hint` is optional. Use `<angle brackets>` for required arguments and `[square brackets]` for optional arguments.
|
|
26
|
+
|
|
27
|
+
Run `/reload` after adding or changing a template in an active session.
|
|
28
|
+
|
|
29
|
+
<a id="invoke-a-template"></a>
|
|
30
|
+
|
|
31
|
+
## Use a template
|
|
32
|
+
|
|
33
|
+
Type the template command in the editor:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/review
|
|
37
|
+
/review concurrency
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Pi expands the template before the resulting text enters the agent. Extensions receive the raw input first through the `input` event unless an extension command with the same name handles it.
|
|
41
|
+
|
|
42
|
+
Templates support these substitutions:
|
|
43
|
+
|
|
44
|
+
| Syntax | Result |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `$1`, `$2`, … | One positional argument |
|
|
47
|
+
| `$@` or `$ARGUMENTS` | All arguments joined with spaces |
|
|
48
|
+
| `${1:-default}` | First argument, or a default value |
|
|
49
|
+
| `${@:-default}` | All arguments, or a default value |
|
|
50
|
+
| `${@:N}` | Arguments starting at position `N` |
|
|
51
|
+
| `${@:N:L}` | `L` arguments starting at position `N` |
|
|
52
|
+
|
|
53
|
+
Arguments follow shell-like quoting, so `/review "API compatibility"` supplies one argument containing a space.
|
|
54
|
+
|
|
55
|
+
<a id="choose-where-it-loads"></a>
|
|
56
|
+
|
|
57
|
+
## Add it to Pi
|
|
58
|
+
|
|
59
|
+
Place the template in your user or project prompt directory. Conventional prompt directories load direct `.md` children only.
|
|
60
|
+
|
|
61
|
+
Settings and packages can select nested Markdown files; a package manifest can narrow discovery with explicit paths and globs. See [Settings](settings.md#resources) and [Pi Packages](packages.md) for these options.
|
|
62
|
+
|
|
63
|
+
Project templates become commands in the editor after trust is granted. Review their content before trusting an unfamiliar project. See [Security](security.md#understand-project-trust).
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
> Source: [packages/coding-agent/docs/providers.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/providers.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
|
+
# Providers
|
|
6
|
+
|
|
7
|
+
Most hosted providers support one or both of these authentication methods:
|
|
8
|
+
|
|
9
|
+
- Sign in through a browser or device flow backed by OAuth.
|
|
10
|
+
- Provide an API key.
|
|
11
|
+
|
|
12
|
+
Use `/login [provider]` to see the methods supported by a provider. Amazon Bedrock and Google Vertex AI can also use ambient cloud credentials.
|
|
13
|
+
|
|
14
|
+
## Authenticate interactively
|
|
15
|
+
|
|
16
|
+
Run `/login` and select a provider. Pi guides you through its OAuth or API-key flow and saves the resulting credential in [`auth.json`](configuration.md#agent-directory).
|
|
17
|
+
|
|
18
|
+
On a remote or headless machine, an OAuth callback may not reach the local process. When prompted, paste the final redirect URL or authorization code back into Pi.
|
|
19
|
+
|
|
20
|
+
Run `/logout` and select a provider to remove its stored credential. This does not unset environment variables, remove authentication from `models.json`, or revoke the credential at the provider.
|
|
21
|
+
|
|
22
|
+
`auth.json` can contain API keys and OAuth tokens. Keep it private and do not commit it.
|
|
23
|
+
|
|
24
|
+
## Use an API key from the environment
|
|
25
|
+
|
|
26
|
+
Environment variables are useful in CI and anywhere Pi should not store the key. Set the variable before starting Pi:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
30
|
+
pi
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This table covers providers with a single primary API-key variable. Providers that need additional configuration or support ambient credentials are covered under [Provider Specific Config](#provider-specific-config).
|
|
34
|
+
|
|
35
|
+
| Provider | Environment variable |
|
|
36
|
+
|---|---|
|
|
37
|
+
| Anthropic | `ANTHROPIC_API_KEY` |
|
|
38
|
+
| Ant Ling | `ANT_LING_API_KEY` |
|
|
39
|
+
| OpenAI | `OPENAI_API_KEY` |
|
|
40
|
+
| DeepSeek | `DEEPSEEK_API_KEY` |
|
|
41
|
+
| NVIDIA NIM | `NVIDIA_API_KEY` |
|
|
42
|
+
| Google Gemini | `GEMINI_API_KEY` |
|
|
43
|
+
| GitHub Copilot | `COPILOT_GITHUB_TOKEN` |
|
|
44
|
+
| Mistral | `MISTRAL_API_KEY` |
|
|
45
|
+
| Groq | `GROQ_API_KEY` |
|
|
46
|
+
| Cerebras | `CEREBRAS_API_KEY` |
|
|
47
|
+
| xAI | `XAI_API_KEY` |
|
|
48
|
+
| OpenRouter | `OPENROUTER_API_KEY` |
|
|
49
|
+
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` |
|
|
50
|
+
| ZAI Coding Plan (Global) | `ZAI_API_KEY` |
|
|
51
|
+
| ZAI Coding Plan (China) | `ZAI_CODING_CN_API_KEY` |
|
|
52
|
+
| OpenCode Zen and Go | `OPENCODE_API_KEY` |
|
|
53
|
+
| Radius | `RADIUS_API_KEY` |
|
|
54
|
+
| TypeSafe ([classifier models](models.md#use-classifier-models)) | `TYPESAFE_API_KEY` |
|
|
55
|
+
| Hugging Face | `HF_TOKEN` |
|
|
56
|
+
| Fireworks | `FIREWORKS_API_KEY` |
|
|
57
|
+
| Together AI | `TOGETHER_API_KEY` |
|
|
58
|
+
| Baseten | `BASETEN_API_KEY` |
|
|
59
|
+
| Kimi For Coding | `KIMI_API_KEY` |
|
|
60
|
+
| Meta | `META_API_KEY` |
|
|
61
|
+
| MiniMax | `MINIMAX_API_KEY` |
|
|
62
|
+
| MiniMax (China) | `MINIMAX_CN_API_KEY` |
|
|
63
|
+
| Moonshot AI (Global and China) | `MOONSHOT_API_KEY` |
|
|
64
|
+
| Qwen Token Plan and Individual | `QWEN_TOKEN_PLAN_API_KEY` |
|
|
65
|
+
| Qwen Token Plan (China) | `QWEN_TOKEN_PLAN_CN_API_KEY` |
|
|
66
|
+
| Xiaomi MiMo | `XIAOMI_API_KEY` |
|
|
67
|
+
| Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` |
|
|
68
|
+
| Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` |
|
|
69
|
+
| Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` |
|
|
70
|
+
|
|
71
|
+
Anthropic also recognizes `ANTHROPIC_OAUTH_TOKEN` as an API credential and `ANTHROPIC_AUTH_TOKEN` as bearer authentication.
|
|
72
|
+
|
|
73
|
+
With no key or token set, Anthropic uses workload identity federation when `ANTHROPIC_FEDERATION_RULE_ID`, `ANTHROPIC_ORGANIZATION_ID` and `ANTHROPIC_IDENTITY_TOKEN_FILE` are set: the Anthropic SDK exchanges the identity token for a short-lived access token and refreshes it itself (re-reading the identity token file, so keep that file fresh for long sessions). `ANTHROPIC_SERVICE_ACCOUNT_ID` and `ANTHROPIC_WORKSPACE_ID` are passed through when set.
|
|
74
|
+
|
|
75
|
+
## Load an API key from a command
|
|
76
|
+
|
|
77
|
+
To use a secret manager without writing the resolved key to disk, set a provider's `key` in `auth.json` to a command prefixed with `!`:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"anthropic": {
|
|
82
|
+
"type": "api_key",
|
|
83
|
+
"key": "!security find-generic-password -ws 'anthropic'"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Pi runs the command when the key is first needed and caches its standard output for the process lifetime. Empty output, a timeout, or a nonzero exit leaves the key unresolved until Pi restarts.
|
|
89
|
+
|
|
90
|
+
## Provider Specific Config
|
|
91
|
+
|
|
92
|
+
The providers below have additional setup, need additional settings, or can use credentials supplied by their platform.
|
|
93
|
+
|
|
94
|
+
A stored API-key credential can include an `env` object. Its values take priority over the process environment for that provider:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"cloudflare-workers-ai": {
|
|
99
|
+
"type": "api_key",
|
|
100
|
+
"key": "...",
|
|
101
|
+
"env": {
|
|
102
|
+
"CLOUDFLARE_ACCOUNT_ID": "account-id"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Radius
|
|
109
|
+
|
|
110
|
+
Radius is a service crafted for Pi by the builders of Pi, Earendil Works. It provides a customizable AI gateway with organization-level controls and analytics built in, and artifacts for sharing what you create with Pi.
|
|
111
|
+
|
|
112
|
+
To get started, run `/login radius` in Pi. This adds Radius as a provider, and its models appear in `/model` like any other provider's.
|
|
113
|
+
|
|
114
|
+
Radius also has an MCP server, so Pi can manage Radius for you.
|
|
115
|
+
|
|
116
|
+
Radius is currently in early alpha and evolving quickly. See [radius.earendil.com](https://radius.earendil.com) for more.
|
|
117
|
+
|
|
118
|
+
Radius authentication uses its gateway catalog and caches refreshed model metadata for later offline startup. A custom Radius gateway configured in `models.json` uses its own catalog rather than inheriting the public `radius.pi.dev` catalog.
|
|
119
|
+
|
|
120
|
+
### Azure OpenAI
|
|
121
|
+
|
|
122
|
+
Set an API key plus either a base URL or resource name:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
export AZURE_OPENAI_API_KEY=...
|
|
126
|
+
export AZURE_OPENAI_BASE_URL=https://your-resource.ai.azure.com
|
|
127
|
+
# Or:
|
|
128
|
+
export AZURE_OPENAI_RESOURCE_NAME=your-resource
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Resource root URLs under `ai.azure.com`, `cognitiveservices.azure.com`, and `openai.azure.com` are normalized to the OpenAI API path.
|
|
132
|
+
|
|
133
|
+
### Amazon Bedrock
|
|
134
|
+
|
|
135
|
+
Bedrock can use a bearer token or an ambient AWS credential source:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Named profile
|
|
139
|
+
export AWS_PROFILE=your-profile
|
|
140
|
+
|
|
141
|
+
# IAM keys
|
|
142
|
+
export AWS_ACCESS_KEY_ID=AKIA...
|
|
143
|
+
export AWS_SECRET_ACCESS_KEY=...
|
|
144
|
+
# Required for temporary credentials
|
|
145
|
+
export AWS_SESSION_TOKEN=...
|
|
146
|
+
|
|
147
|
+
# Bedrock bearer token
|
|
148
|
+
export AWS_BEARER_TOKEN_BEDROCK=...
|
|
149
|
+
|
|
150
|
+
# Region, when not supplied by the profile or AWS SDK configuration
|
|
151
|
+
export AWS_REGION=us-west-2
|
|
152
|
+
# AWS_DEFAULT_REGION is also supported
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Pi also supports ECS task credentials and IRSA through the standard `AWS_CONTAINER_CREDENTIALS_*` and `AWS_WEB_IDENTITY_TOKEN_FILE` variables.
|
|
156
|
+
|
|
157
|
+
### Cloudflare AI Gateway
|
|
158
|
+
|
|
159
|
+
The gateway requires a token, account ID, and gateway ID:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
export CLOUDFLARE_API_KEY=...
|
|
163
|
+
export CLOUDFLARE_ACCOUNT_ID=...
|
|
164
|
+
export CLOUDFLARE_GATEWAY_ID=...
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The account and gateway IDs can come from the process environment or the credential's `env` object in `auth.json`.
|
|
168
|
+
|
|
169
|
+
`CLOUDFLARE_API_KEY` authenticates Pi to the gateway. Upstream access can use Cloudflare unified billing, credentials stored in the gateway, or an `Authorization` header configured for the provider in `models.json`.
|
|
170
|
+
|
|
171
|
+
### Cloudflare Workers AI
|
|
172
|
+
|
|
173
|
+
Workers AI requires a token and account ID:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
export CLOUDFLARE_API_KEY=...
|
|
177
|
+
export CLOUDFLARE_ACCOUNT_ID=...
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The account ID can also be stored in the credential's `env` object.
|
|
181
|
+
|
|
182
|
+
### Google Vertex AI
|
|
183
|
+
|
|
184
|
+
Use a Google Cloud API key:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
export GOOGLE_CLOUD_API_KEY=...
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
To use Application Default Credentials, configure a project and location:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
export GOOGLE_CLOUD_PROJECT=your-project
|
|
194
|
+
# GCLOUD_PROJECT is also supported
|
|
195
|
+
export GOOGLE_CLOUD_LOCATION=us-central1
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Then authenticate:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
gcloud auth application-default login
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
To use a service-account key file instead, set `GOOGLE_APPLICATION_CREDENTIALS` along with the project and location.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
> Source: [packages/coding-agent/docs/quickstart.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/quickstart.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
|
+
# Quickstart
|
|
6
|
+
|
|
7
|
+
Pi runs in your terminal and works with files on your machine. To use it, you need access to a model through a supported provider. This can be a subscription, an API key, or a local model.
|
|
8
|
+
|
|
9
|
+
For native Windows setup, read [Windows Setup](windows.md). For Android, read [Termux Setup](termux.md).
|
|
10
|
+
|
|
11
|
+
## 1. Install Pi
|
|
12
|
+
|
|
13
|
+
On macOS or Linux, you can use the installer:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -fsSL https://pi.dev/install.sh | sh
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The installer pins all dependencies and updates Pi with `pi update`. Alternatively, install Pi from npm, which does not pin transitive dependencies. This requires Node.js 22.19 or newer:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Pi does not require dependency lifecycle scripts for a normal npm installation.
|
|
26
|
+
|
|
27
|
+
With Nix on macOS or Linux, install the latest release from Pi's flake. Nix builds Pi from source:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
nix profile add github:earendil-works/pi/stable
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Older Nix versions use `nix profile install` instead. Update with `nix profile upgrade pi`; `pi update` cannot update a Nix installation. To pin a release, use a tag such as `github:earendil-works/pi/v1.0.0`.
|
|
34
|
+
|
|
35
|
+
Verify the installation:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pi --version
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 2. Start Pi
|
|
42
|
+
|
|
43
|
+
Change to the folder you want Pi to work with, then start it:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd /path/to/folder
|
|
47
|
+
pi
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The working folder helps Pi discover relevant files, instructions, and configuration. Pi also uses it to group saved sessions.
|
|
51
|
+
|
|
52
|
+
<p align="center"><img src="https://raw.githubusercontent.com/earendil-works/pi/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/docs/images/interactive-mode.png" alt="Pi running in a terminal with a conversation, input editor, and status footer" width="750"></p>
|
|
53
|
+
|
|
54
|
+
The interface shows your conversation, an editor for prompts and commands, and a footer with the current folder, model, and session status. See [Use Pi in the terminal](usage.md) to learn how to add files, run commands, direct ongoing work, and manage results.
|
|
55
|
+
|
|
56
|
+
## 3. Choose a model
|
|
57
|
+
|
|
58
|
+
A **model** generates Pi's responses. A **provider** is the service or account Pi uses to access that model.
|
|
59
|
+
|
|
60
|
+
In Pi, run:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
/login
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Choose a provider, then follow the prompts to use a subscription or store an API key. Run `/model` afterward if you want to select a different available model.
|
|
67
|
+
|
|
68
|
+
See [Choose a model and provider](models.md) for supported providers, environment-variable authentication, local models, and custom endpoints.
|
|
69
|
+
|
|
70
|
+
## 4. Give Pi a task
|
|
71
|
+
|
|
72
|
+
Pi shows each file read, search, command, and edit it performs. It does not ask before every tool call.
|
|
73
|
+
|
|
74
|
+
Enter a task that matches your work, for example:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
Summarize @meeting-notes.md and save the action items to action-items.md.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Explain how this repository is structured and how to run its checks.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
Compare @previous.csv with @current.csv and summarize the important changes.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Type `@` in the editor to search for a file instead of entering its full path. When Pi finishes, review its response and any changed files. Use version control or backups for important work. For untrusted or unattended work, use a container or another sandbox. See [Security](security.md).
|
|
89
|
+
|
|
90
|
+
## Continue later
|
|
91
|
+
|
|
92
|
+
Pi saves sessions automatically. Exit Pi, then resume the most recent session for the same working folder with:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pi --continue
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Use `/resume` to choose another saved session. See [Continue or branch a session](sessions.md) for session naming, branching, compaction, export, and sharing.
|
|
99
|
+
|
|
100
|
+
## Next steps
|
|
101
|
+
|
|
102
|
+
- [Use Pi interactively](usage.md) to learn input, commands, shortcuts, and queued messages.
|
|
103
|
+
- [Add instructions](configuration.md#context-files) that Pi should follow whenever it works in a folder.
|
|
104
|
+
- [Choose a model and provider](models.md).
|
|
105
|
+
|
|
106
|
+
### Choose how to customize Pi
|
|
107
|
+
|
|
108
|
+
Start with the least powerful mechanism that meets your need:
|
|
109
|
+
|
|
110
|
+
| Need | Start with |
|
|
111
|
+
|---|---|
|
|
112
|
+
| Give Pi persistent instructions for a folder | [`AGENTS.md`](configuration.md#context-files) |
|
|
113
|
+
| Reuse a prompt from the `/` menu | [Prompt template](prompt-templates.md) |
|
|
114
|
+
| Add task-specific instructions and supporting files | [Skill](skills.md) |
|
|
115
|
+
| Add executable tools, commands, or event handlers | [Extension](extensions.md) |
|
|
116
|
+
| Build a custom terminal component | [Terminal UI](tui.md) |
|
|
117
|
+
| Connect an unsupported model service | [Custom provider](custom-provider.md) |
|
|
118
|
+
| Install or distribute several resources | [Pi package](packages.md) |
|
|
119
|
+
|
|
120
|
+
## Uninstall Pi
|
|
121
|
+
|
|
122
|
+
If you installed Pi with npm, run:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npm uninstall -g @earendil-works/pi-coding-agent
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If you used the installer, run it again and choose **Uninstall Pi**:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
curl -fsSL https://pi.dev/install.sh | sh
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
If you installed Pi with Nix, run:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
nix profile remove pi
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
None of these methods removes configuration, credentials, sessions, or installed Pi packages from `~/.pi/agent/`.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
> Source: [packages/coding-agent/README.md](https://github.com/earendil-works/pi/blob/b78e6a9085343ec0f308c3d377da72528b4cf7ee/packages/coding-agent/README.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
|
+
<p align="center">
|
|
6
|
+
<a href="https://pi.dev">
|
|
7
|
+
<img alt="Pi logo" src="https://pi.dev/logo-auto.svg" width="128">
|
|
8
|
+
</a>
|
|
9
|
+
</p>
|
|
10
|
+
<p align="center">
|
|
11
|
+
<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>
|
|
12
|
+
<a href="https://www.npmjs.com/package/@earendil-works/pi-coding-agent"><img alt="npm" src="https://img.shields.io/npm/v/@earendil-works/pi-coding-agent?style=flat-square&logo=npm&logoColor=white" /></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
> New issues and PRs from new contributors are closed automatically. Maintainers review closed submissions daily. See [CONTRIBUTING.md](https://github.com/earendil-works/pi/blob/main/CONTRIBUTING.md).
|
|
16
|
+
|
|
17
|
+
# Pi
|
|
18
|
+
|
|
19
|
+
Pi is a minimal, extensible agent harness that you can make your own.
|
|
20
|
+
|
|
21
|
+
Adapt Pi to your workflows, not the other way around. Customize Pi with [extensions](extensions.md), [skills](skills.md), [prompt templates](prompt-templates.md), and [themes](themes.md). Bundle them as [Pi packages](packages.md) and share via npm or git.
|
|
22
|
+
|
|
23
|
+
Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way.
|
|
24
|
+
|
|
25
|
+
Use Pi [interactively](usage.md), automate it in [print or JSON mode](cli.md), control it over [RPC](rpc.md), or build apps with the [Pi TypeScript SDK](sdk.md). See [OpenClaw](https://github.com/OpenClaw/OpenClaw) for a real-world integration.
|
|
26
|
+
|
|
27
|
+
## Getting started
|
|
28
|
+
|
|
29
|
+
Install the command-line interface:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl -fsSL https://pi.dev/install.sh | sh
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
On Windows:
|
|
36
|
+
|
|
37
|
+
```shell
|
|
38
|
+
powershell -c "irm https://pi.dev/install.ps1 | iex"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The installer pins all dependencies and updates Pi with `pi update`. Alternatively, install directly with npm, which does not pin transitive dependencies:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Pi requires Node.js 22.19 or newer. The macOS, Linux, and Windows installers can install it if needed. Pi does not require dependency lifecycle scripts for a normal npm installation.
|
|
48
|
+
|
|
49
|
+
On macOS and Linux, Nix users can install the latest release with `nix profile add github:earendil-works/pi/stable`. See the [quickstart](quickstart.md#1-install-pi) for updating and pinning releases.
|
|
50
|
+
|
|
51
|
+
Start Pi in the directory where you want it to work:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd /path/to/project
|
|
55
|
+
pi
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
For a built-in AI provider, run `/login` inside Pi to connect a subscription or API key. Then give Pi a task.
|
|
59
|
+
|
|
60
|
+
See the [documentation](index.md) for full setup and usage instructions.
|
|
61
|
+
|
|
62
|
+
## Share your OSS coding agent sessions
|
|
63
|
+
|
|
64
|
+
If you use Pi for open source work, please share your coding agent sessions.
|
|
65
|
+
|
|
66
|
+
Public OSS session data helps improve models, prompts, tools, and evaluations using real development workflows.
|
|
67
|
+
|
|
68
|
+
For the full explanation, see [this post on X](https://x.com/badlogicgames/status/2037811643774652911).
|
|
69
|
+
|
|
70
|
+
To publish sessions, use [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf) using a Hugging Face account and the Hugging Face CLI.
|
|
71
|
+
|
|
72
|
+
- [Demo video](https://x.com/badlogicgames/status/2041151967695634619) on how to publish Pi sessions
|
|
73
|
+
- Published Pi development sessions: [`badlogicgames/pi-mono` on Hugging Face](https://huggingface.co/datasets/badlogicgames/pi-mono).
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
Clone the repository, install its dependencies, and run Pi from source:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git clone https://github.com/earendil-works/pi
|
|
81
|
+
cd pi
|
|
82
|
+
npm install --ignore-scripts
|
|
83
|
+
./pi-test.sh
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`pi-test.sh` can be called from any directory and preserves the caller's working directory.
|
|
87
|
+
|
|
88
|
+
Before submitting changes, run:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm run check
|
|
92
|
+
./test.sh
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Read [CONTRIBUTING.md](https://github.com/earendil-works/pi/blob/main/CONTRIBUTING.md) before opening an issue or pull request. It defines the contribution gate, issue quality bar, and required checks. Read [AGENTS.md](https://github.com/earendil-works/pi/blob/main/AGENTS.md) for repository-specific implementation, testing, dependency, and release rules.
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT
|