Pi logo

Pi

Community
znlgis
pi

Use when you need a minimal, extensible terminal AI coding agent harness in TypeScript — npm @earendil-works/pi-coding-agent 1.4.0, extensions/skills/prompt templates, multi-provider (OpenAI/Anthropic/Google) routing, container isolation (Docker/Gondolin/OpenShell); also for `pi: command not found`, Node >=22.19.0 engine errors, and EACCES on a global install. Pi: minimalist terminal coding agent.

Overview

Publisherznlgis
Repositoryopengis-skills
Skill namepi
Stars
76
Forks
12
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by znlgis on GitHub. Read the source before you install it.

Installation

Install the Pi AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/znlgis/opengis-skills/tree/main/ai/pi
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/znlgis/opengis-skills.git /tmp/opengis-skills
mkdir -p .claude/skills
cp -r /tmp/opengis-skills/ai/pi .claude/skills/pi
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pi in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pi on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pi is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

项目地址: https://github.com/earendil-works/pi

官网 / 文档: https://pi.dev | https://pi.dev/docs/latest

npm: @earendil-works/pi-coding-agent(最新 1.4.0,截至 2026-10;另有 legacy-node20 0.74.2 通道)

许可证: MIT

概述

Pi 是一个面向工程化场景的 Agent Harness,不仅是单一 CLI。

  • @earendil-works/pi-coding-agent:交互式终端编码 Agent
  • @earendil-works/pi-agent-core:Agent 运行时(工具调用 + 状态管理)
  • @earendil-works/pi-ai:统一多模型 Provider API
  • @earendil-works/pi-tui:终端 UI 渲染库

适用场景:

  • 终端内多步代码任务(读改代码、执行命令、追踪上下文)
  • 自建可扩展 Agent(Extensions / Skills / Prompt Templates)
  • 需要模型供应商可替换、可审计、可容器化的团队环境

环境与安装

前置要求

  • Node.js >=22.19.0
  • npm(或等价 Node 包管理器)

常用安装方式

bash
# 全局安装 coding agent CLI
npm install -g @earendil-works/pi-coding-agent

# 验证版本
pi --version

如需源码开发:

bash
git clone https://github.com/earendil-works/pi.git
cd pi
npm install --ignore-scripts
npm run build

上游仓库是 monorepo,官方开发流程以 npm install --ignore-scripts、npm run build、npm run check 为主。


核心能力速览

能力说明
多模型统一接入OpenAI / Anthropic / Google 等 Provider 统一抽象
Agent 运行时工具调用、会话状态、任务分解与执行
CLI + TUI终端交互式编码体验,适配日常研发流程
可扩展机制Extensions、Skills、Prompt 模板、主题
容器化方案Gondolin / Docker / OpenShell 等隔离模式
工程化发布Monorepo + release 流程 + 依赖锁定策略

命令参考

Pi 是最小化的 Agent Harness,CLI 主要用于验证安装。以下为基本探测命令:

bash
pi --help
pi --version

开发仓库常用校验命令(在 pi 源码目录):

bash
npm run build
npm run check
npm run test

典型工作流

1) 本地终端编码助手

  1. 在项目目录启动 pi
  2. 让 Agent 分析需求并分步执行
  3. 审阅改动与命令输出
  4. 人工确认后提交

2) 团队扩展能力

  1. 基于 Extensions 定义团队工具接入方式
  2. 把可复用提示流程沉淀为 Skills
  3. 在仓库内版本化管理配置,确保团队一致性

3) 强隔离执行

  1. 对高权限任务采用容器/沙箱模式
  2. 将内置工具与 ! 命令路由到隔离环境
  3. 保留宿主机 Provider 凭据与审计链路

安全与最佳实践

Pi 默认继承启动进程权限,不自带强制权限沙箱。生产建议:

  • 对不受信任的任务启用容器化(Docker / Gondolin / OpenShell)
  • 将敏感凭据放在最小权限环境变量中
  • 固定依赖版本并审查 lockfile 变更
  • 在 CI 中执行 npm ci --ignore-scripts + 安全审计

常见问题(FAQ)

问题解决建议
pi 命令不可用检查 Node 版本与全局安装路径,重新安装 @earendil-works/pi-coding-agent
依赖安装失败使用官方推荐的 npm install --ignore-scripts,并检查网络代理
模型调用异常核对 Provider API Key、Base URL 与模型名称配置
想限制工具权限使用容器化/沙箱运行,不要直接在高权限宿主机执行不受信任的任务
团队想统一规范将 Skills/模板/配置文件纳入仓库版本控制并走 PR 审查
安装报 EBADENGINE / Unsupported engineNode 版本低于 22.19.0:升级 Node,或改用 legacy-node20 通道的 0.74.2
全局安装报 EACCES不要用 sudo npm i -g:改 npm config set prefix ~/.npm-global 后重装,或改用 nvm/npx
npm install 在源码里跑构建脚本失败monorepo 用官方流程:npm install --ignore-scripts && npm run build

AI 使用建议

  • 用户提到「Pi」「Agent Harness」「终端编码代理」「多 Provider 统一接入」时优先加载本技能。
  • 回答部署问题时先确认是 个人本地使用 还是 团队隔离部署。
  • 涉及权限控制时明确说明:Pi 默认不提供强制沙箱,应结合容器方案。
  • 涉及版本差异时提醒以 pi --version 与 Releases 页面为准。

相关技能


参考资源

Frequently asked questions

What does the Pi AI skill do?

Use when you need a minimal, extensible terminal AI coding agent harness in TypeScript — npm @earendil-works/pi-coding-agent 1.4.0, extensions/skills/prompt templates, multi-provider (OpenAI/Anthropic/Google) routing, container isolation (Docker/Gondolin/OpenShell); also for `pi: command not found`, Node >=22.19.0 engine errors, and EACCES on a global install. Pi: minimalist terminal coding agent.

Why use Pi on TypingMind?

Because you install it once and use it with any model. Pi is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pi in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/znlgis/opengis-skills/tree/main/ai/pi. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Pi?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pi?

As many as you like. As long as a model supports skills, you can use Pi with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pi AI skill free?

Yes. It is published on GitHub by znlgis under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇