From 6f726a217892de651730bc1c8ab591a451499fe2 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 8 Jan 2026 02:29:51 +0100 Subject: [PATCH] feat(coding-agent): add PI_SKIP_VERSION_CHECK env variable Skip new version check at startup when set. Useful for Nix or other package manager installs where npm install is not used. Also documents PI_CODING_AGENT_DIR and other environment variables in the README. closes #549 Co-authored-by: Aos Dabbagh <25783780+aos@users.noreply.github.com> --- packages/coding-agent/CHANGELOG.md | 4 ++++ packages/coding-agent/README.md | 9 +++++++++ .../src/modes/interactive/interactive-mode.ts | 2 ++ 3 files changed, 15 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 7cffc893..a7626cce 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- `PI_SKIP_VERSION_CHECK` environment variable to disable new version notifications at startup ([#549](https://github.com/badlogic/pi-mono/pull/549) by [@aos](https://github.com/aos)) + ### Breaking Changes - `ctx.ui.custom()` factory signature changed from `(tui, theme, done)` to `(tui, theme, keybindings, done)` for consistency with other input-handling factories diff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.md index 9f654749..9a584030 100644 --- a/packages/coding-agent/README.md +++ b/packages/coding-agent/README.md @@ -1183,6 +1183,15 @@ pi --tools read,grep,find,ls -p "Review the architecture" pi --export session.jsonl output.html ``` +### Environment Variables + +| Variable | Description | +|----------|-------------| +| `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc. | API keys for providers (see [API Keys & OAuth](#api-keys--oauth)) | +| `PI_CODING_AGENT_DIR` | Override the agent config directory (default: `~/.pi/agent`) | +| `PI_SKIP_VERSION_CHECK` | Skip new version check at startup (useful for Nix or other package manager installs) | +| `VISUAL`, `EDITOR` | External editor for Ctrl+G (e.g., `vim`, `code --wait`) | + --- ## Tools diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index 02db8237..3e2e8a19 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -489,6 +489,8 @@ export class InteractiveMode { * Check npm registry for a newer version. */ private async checkForNewVersion(): Promise { + if (process.env.PI_SKIP_VERSION_CHECK) return undefined; + try { const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest"); if (!response.ok) return undefined;