개발
추가 지침은 AGENTS.md를 참조하세요.
설정
git clone https://github.com/earendil-works/pi-mono
cd pi-mono
npm install
npm run build소스에서 실행:
/path/to/pi-mono/pi-test.sh스크립트는 모든 디렉터리에서 실행될 수 있습니다. Pi 호출자의 현재 작업 디렉터리를 유지합니다.
포크/리브랜딩
package.json를 통해 구성:
{
"piConfig": {
"name": "pi",
"configDir": ".pi"
}
}포크의 name, configDir 및 bin 필드를 변경합니다. CLI 배너, 구성 경로 및 환경 변수 이름에 영향을 줍니다.
경로 확인
세 가지 실행 모드: npm 설치, 독립형 바이너리, 소스의 tsx.
**패키지 자산에는 항상 src/config.ts**를 사용하세요.
import { getPackageDir, getThemeDir } from "./config.js";패키지 자산에 __dirname를 직접 사용하지 마십시오.
디버그 명령
/debug(숨김)이 ~/.pi/agent/pi-debug.log에 씁니다:
- ANSI 코드로 렌더링된 TUI 라인
- LLM에 보낸 마지막 메시지
테스트
./test.sh # Run non-LLM tests (no API keys needed)
npm test # Run all tests
npm test -- test/specific.test.ts # Run specific test프로젝트 구조
packages/
ai/ # LLM provider abstraction
agent/ # Agent loop and message types
tui/ # Terminal UI components
coding-agent/ # CLI and interactive mode