pi, uv 추가
This commit is contained in:
1 parent
40e01678b5
commit
a056dc268a
3 files changed
+440
-17
No files matched your search
@@ -1,12 +1,14 @@
|
||||
# install-sh
|
||||
# 필수 터미널 도구
|
||||
|
||||
터미널 UI 도구 설치 스크립트 모음
|
||||
터미널에서 사용하는 유용한 CLI 도구 모음
|
||||
|
||||
## 지원 도구
|
||||
|
||||
- [bottom](https://github.com/ClementTsang/bottom) - 호스트 모니터링
|
||||
- [lazygit](https://github.com/jesseduffield/lazygit) - Git 터미널 UI
|
||||
- [ctop](https://github.com/bcicen/ctop) - 컨테이너 모니터링
|
||||
- [uv](https://docs.astral.sh/uv/) - Python 패키지 관리자
|
||||
- [pi](https://pi.dev/) - CLI AI 코딩 어시스턴트 + 추천 패키지 일괄 설치
|
||||
|
||||
## 설치
|
||||
|
||||
@@ -27,26 +29,42 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazy
|
||||
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-ctop.sh?ref_type=heads" | bash
|
||||
```
|
||||
|
||||
### Windows
|
||||
**uv:**
|
||||
```bash
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
```
|
||||
|
||||
**PowerShell**:
|
||||
**pi (Pi Coding Agent + 추천 패키지):**
|
||||
```bash
|
||||
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-pi.sh?ref_type=heads" | bash
|
||||
```
|
||||
|
||||
bottom:
|
||||
### Windows (PowerShell):
|
||||
|
||||
**bottom:**
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-bottom.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bottom.ps1' -OutFile $t; & $t"
|
||||
```
|
||||
|
||||
lazygit:
|
||||
**lazygit:**
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-lazygit.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazygit.ps1' -OutFile $t; & $t"
|
||||
```
|
||||
|
||||
ctop:
|
||||
**ctop:**
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-ctop.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-ctop.ps1' -OutFile $t; & $t"
|
||||
```
|
||||
|
||||
**uv:**
|
||||
```powershell
|
||||
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
||||
```
|
||||
|
||||
**pi (Pi Coding Agent + 추천 패키지):**
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-pi.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-pi.ps1' -OutFile $t; & $t"
|
||||
```
|
||||
|
||||
## 도구별 사용법
|
||||
|
||||
@@ -106,18 +124,65 @@ Docker/Podman 컨테이너 모니터링 터미널 UI 도구입니다.
|
||||
ctop
|
||||
```
|
||||
|
||||
| 단축키 | 동작 |
|
||||
| ----------- | -------------------- |
|
||||
| `q` / `Esc` | 종료 |
|
||||
| `↑` `↓` | 컨테이너 선택 |
|
||||
| `l` | 컨테이너 로그 보기 |
|
||||
| `a` | 모든 컨테이너 표시 |
|
||||
| `f` | 필터 |
|
||||
| `S` | 정지 |
|
||||
| `R` | 재시작 |
|
||||
| 단축키 | 동작 |
|
||||
| ----------- | ------------------ |
|
||||
| `q` / `Esc` | 종료 |
|
||||
| `↑` `↓` | 컨테이너 선택 |
|
||||
| `l` | 컨테이너 로그 보기 |
|
||||
| `a` | 모든 컨테이너 표시 |
|
||||
| `f` | 필터 |
|
||||
| `S` | 정지 |
|
||||
| `R` | 재시작 |
|
||||
|
||||
> **macOS Apple Silicon 참고**: ctop은 native arm64 빌드를 제공하지 않습니다. Rosetta 2를 통해 amd64 바이너리로 실행됩니다.
|
||||
|
||||
### Pi Coding Agent
|
||||
|
||||
CLI 기반 AI 코딩 어시스턴트입니다. `install-pi` 스크립트는 Pi 본체와 함께 다음 추천 패키지를 일괄 설치합니다.
|
||||
|
||||
| 패키지 | 설명 |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
|
||||
| [pi-subagents](https://pi.dev/packages/pi-subagents) | 하위 에이전트에 작업 위임 — 코드 리뷰, 스카우팅, 구현, 병렬 감사, 오케스트레이션, 백그라운드 작업 |
|
||||
| [context-mode](https://pi.dev/packages/context-mode) | 컨텍스트 윈도우 보호 — 샌드박스 도구, 세션 연속성, BM25 지식 베이스, think-in-code 패러다임 |
|
||||
| [pi-mcp-adapter](https://pi.dev/packages/pi-mcp-adapter) | MCP 서버를 Pi에서 사용 — 수백 개 툴 정의 대신 하나의 프록시 툴로 |
|
||||
| [pi-web-access](https://pi.dev/packages/pi-web-access) | 웹 검색, 콘텐츠 추출, 영상 이해 — 설정 없는 Exa 검색, Perplexity, Gemini, YouTube |
|
||||
| [@plannotator/pi-extension](https://pi.dev/packages/@plannotator/pi-extension) | 파일 기반 플랜 모드 — 브라우저 UI로 에이전트 플랜 검토, 주석, 승인 |
|
||||
| [@juicesharp/rpiv-ask-user-question](https://pi.dev/packages/@juicesharp/rpiv-ask-user-question) | 구조화된 질문 도구 — 에이전트가 추측 대신 사용자에게 질문 |
|
||||
| [pi-lens](https://pi.dev/packages/pi-lens) | 실시간 코드 피드백 — LSP 진단, 린터, 포맷터, 타입 체킹, 구조 분석, 읽기 전 수정 가드 |
|
||||
| [@juicesharp/rpiv-todo](https://pi.dev/packages/@juicesharp/rpiv-todo) | 세션 간 유지되는 투두 리스트 — /reload 및 compaction 후에도 작업 보존, 의존성追踪 |
|
||||
| [pi-simplify](https://pi.dev/packages/pi-simplify) | 변경된 코드의 명확성, 일관성, 유지보수성 개선 제안 |
|
||||
| [@juicesharp/rpiv-advisor](https://pi.dev/packages/@juicesharp/rpiv-advisor) | 더 강력한 리뷰어 모델의 제2의 의견 제공 |
|
||||
| [@juicesharp/rpiv-pi](https://pi.dev/packages/@juicesharp/rpiv-pi) | 스킬 기반 개발 워크플로우 — 탐색, 조사, 설계, 계획, 구현, 검증 파이프라인 |
|
||||
| [@samfp/pi-memory](https://pi.dev/packages/@samfp/pi-memory) | 영구 메모리 — 세션 간 교정, 선호도, 프로젝트 패턴 학습 |
|
||||
| [pi-btw](https://pi.dev/packages/pi-btw) | 메인 에이전트 실행을 중단하지 않는 병렬 사이드 대화 (/btw) |
|
||||
| [pi-docparser](https://pi.dev/packages/pi-docparser) | 문서 파싱 도구 — PDF, 오피스 문서, 스프레드시트, 이미지, OCR |
|
||||
| [pi-ollama-cloud](https://pi.dev/packages/pi-ollama-cloud?name=ollama) | Ollama Cloud 제공자 플러그인 — 동적 모델 발견, 웹 검색/패치 도구, 로컬 서버 불필요 |
|
||||
|
||||
|
||||
> **Ollama Cloud 사용 시**: `~/.pi/agent/auth.json`에 API 키를 설정하세요. 자세한 내용은 [pi-ollama-cloud 문서](https://pi.dev/packages/pi-ollama-cloud?name=ollama)를 참조하세요.
|
||||
|
||||
> ~/.pi/agent/auth.json에 "api.key" : "YOUR_API_KEY" 형태로 추가한다.
|
||||
```json
|
||||
{
|
||||
"anthropic": {
|
||||
...
|
||||
},
|
||||
"ollama-cloud": {
|
||||
"type": "api_key",
|
||||
"key": "..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**pi** 사용법
|
||||
|
||||
```bash
|
||||
pi # 대화형 세션 시작
|
||||
pi -p "질문" # 단일 질문 (print 모드)
|
||||
pi --help # 도움말
|
||||
pi list # 설치된 패키지 목록
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
*GitLab: https://gitlab.com/publicproj/install-sh*
|
||||
*GitLab: https://gitlab.com/publicproj/install-sh*
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
#Requires -Version 5.1
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs Pi Coding Agent and recommended packages.
|
||||
|
||||
.DESCRIPTION
|
||||
Auto-detects the platform, installs Pi Coding Agent via npm,
|
||||
then installs recommended Pi packages.
|
||||
|
||||
Supported platforms:
|
||||
- Windows x64 (AMD64 / Intel 64bit)
|
||||
- Windows ARM64
|
||||
|
||||
Prerequisites:
|
||||
- Node.js 18+ (and npm)
|
||||
|
||||
.PARAMETER SkipPackages
|
||||
Skip installing Pi packages (only install Pi itself).
|
||||
|
||||
.EXAMPLE
|
||||
.\install-pi.ps1
|
||||
.\install-pi.ps1 -SkipPackages
|
||||
|
||||
# One-liner install from remote:
|
||||
powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-pi.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-pi.ps1' -OutFile $t; & $t"
|
||||
|
||||
.NOTES
|
||||
If execution policy error occurs:
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[bool] $SkipPackages = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Constants
|
||||
# ────────────────────────────────────────────
|
||||
$PI_NPM_PACKAGE = "@earendil-works/pi-coding-agent"
|
||||
|
||||
# Packages to install after pi is available
|
||||
# Format: @{ Name = "package_name"; Desc = "description" }
|
||||
$Packages = @(
|
||||
@{ Name = "pi-subagents"; Desc = "Delegate work to focused child agents - code review, scouting, implementation, parallel audits, orchestration, background jobs" }
|
||||
@{ Name = "context-mode"; Desc = "Context window protection - sandbox tools, session continuity, BM25 knowledge base, think-in-code paradigm" }
|
||||
@{ Name = "pi-mcp-adapter"; Desc = "Use MCP servers with Pi without burning your context window - one proxy tool instead of hundreds" }
|
||||
@{ Name = "pi-web-access"; Desc = "Web search, content extraction, and video understanding - zero-config Exa search, Perplexity, Gemini, YouTube" }
|
||||
@{ Name = "@plannotator/pi-extension"; Desc = "File-based plan mode with visual browser UI for reviewing, annotating, and approving agent plans" }
|
||||
@{ Name = "@juicesharp/rpiv-ask-user-question"; Desc = "Structured questionnaire tool with typed options - the model asks you instead of guessing" }
|
||||
@{ Name = "pi-lens"; Desc = "Real-time code feedback - LSP diagnostics, linters, formatters, type-checking, structural analysis, read-before-edit guard" }
|
||||
@{ Name = "@juicesharp/rpiv-todo"; Desc = "Persistent todo list across sessions - tasks survive /reload and compaction with dependency tracking" }
|
||||
@{ Name = "pi-simplify"; Desc = "Review recently changed code for clarity, consistency, and maintainability improvements" }
|
||||
@{ Name = "@juicesharp/rpiv-advisor"; Desc = "Second opinion from a stronger reviewer model before the agent acts" }
|
||||
@{ Name = "@juicesharp/rpiv-pi"; Desc = "Skill-based development workflow - discover, research, design, plan, implement, validate pipeline with named subagents" }
|
||||
@{ Name = "@samfp/pi-memory"; Desc = "Persistent memory for Pi - learns corrections, preferences, and project patterns across sessions" }
|
||||
@{ Name = "pi-btw"; Desc = "Parallel side conversations (/btw) without interrupting the main agent run" }
|
||||
@{ Name = "pi-docparser"; Desc = "Document parsing tool - PDFs, Office docs, spreadsheets, images, and OCR via LiteParse" }
|
||||
@{ Name = "pi-ollama-cloud"; Desc = "Ollama Cloud provider plugin - dynamic model discovery, web search and fetch tools, no local server required" }
|
||||
)
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Utility functions
|
||||
# ────────────────────────────────────────────
|
||||
function Info { Write-Host "[INFO] $args" -ForegroundColor Cyan }
|
||||
function Warn { Write-Host "[WARN] $args" -ForegroundColor Yellow }
|
||||
function Success { Write-Host "[OK] $args" -ForegroundColor Green }
|
||||
function ErrExit { Write-Host "[ERROR] $args" -ForegroundColor Red; exit 1 }
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Check prerequisites
|
||||
# ────────────────────────────────────────────
|
||||
Info "Platform: $([System.Environment]::OSVersion.Platform) ($([System.Environment]::GetEnvironmentVariable('PROCESSOR_ARCHITECTURE')))"
|
||||
|
||||
if (-not (Get-Command npm -ErrorAction SilentlyContinue)) {
|
||||
ErrExit "npm is required. Install Node.js 18+: https://nodejs.org/"
|
||||
}
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Step 1: Install Pi Coding Agent
|
||||
# ────────────────────────────────────────────
|
||||
Info "Installing Pi Coding Agent..."
|
||||
|
||||
$piCmd = Get-Command pi -ErrorAction SilentlyContinue
|
||||
if ($piCmd) {
|
||||
$currentVer = & pi --version 2>$null
|
||||
if ($LASTEXITPR -ne 0) { $currentVer = "unknown" }
|
||||
Info "Pi is already installed (version: $currentVer). Skipping installation."
|
||||
} else {
|
||||
npm install -g $PI_NPM_PACKAGE
|
||||
if ($LASTEXITPR -ne 0) {
|
||||
ErrExit "Pi installation failed."
|
||||
}
|
||||
Success "Pi installed via npm"
|
||||
}
|
||||
|
||||
# Verify pi is available
|
||||
$piCmd = Get-Command pi -ErrorAction SilentlyContinue
|
||||
if ($piCmd) {
|
||||
Success "Pi is available: $($piCmd.Source)"
|
||||
} else {
|
||||
# Refresh PATH for current session
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'User') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
|
||||
$piCmd = Get-Command pi -ErrorAction SilentlyContinue
|
||||
if ($piCmd) {
|
||||
Success "Pi is available: $($piCmd.Source)"
|
||||
} else {
|
||||
ErrExit "'pi' command not found. Check your PATH."
|
||||
}
|
||||
}
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Step 2: Install packages
|
||||
# ────────────────────────────────────────────
|
||||
if ($SkipPackages) {
|
||||
Info "Skipping package installation (-SkipPackages flag)."
|
||||
} else {
|
||||
Info ""
|
||||
Info "Installing Pi packages..."
|
||||
Info "────────────────────────────────────────"
|
||||
|
||||
$total = $Packages.Count
|
||||
$count = 0
|
||||
$failed = @()
|
||||
|
||||
foreach ($pkg in $Packages) {
|
||||
$count++
|
||||
$name = $pkg.Name
|
||||
$desc = $pkg.Desc
|
||||
|
||||
Info "[$count/$total] $name - $desc"
|
||||
try {
|
||||
& pi install "npm:$name" 2>&1 | Out-Null
|
||||
if ($LASTEXITPR -eq 0) {
|
||||
Success " -> $name installed"
|
||||
} else {
|
||||
Warn " -> $name failed (install manually later: pi install npm:$name)"
|
||||
$failed += $name
|
||||
}
|
||||
} catch {
|
||||
Warn " -> $name failed (install manually later: pi install npm:$name)"
|
||||
$failed += $name
|
||||
}
|
||||
}
|
||||
|
||||
Info ""
|
||||
Info "────────────────────────────────────────"
|
||||
if ($failed.Count -eq 0) {
|
||||
Success "All packages installed! ($total/$total)"
|
||||
} else {
|
||||
Warn "Some packages failed to install:"
|
||||
foreach ($f in $failed) {
|
||||
Warn " - $f"
|
||||
}
|
||||
Info "You can install failed packages manually with:"
|
||||
foreach ($f in $failed) {
|
||||
Info " pi install npm:$f"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Step 3: Post-install notes
|
||||
# ────────────────────────────────────────────
|
||||
Info ""
|
||||
Info "=================================================="
|
||||
Success "Pi Coding Agent installation complete!"
|
||||
Info "=================================================="
|
||||
Info ""
|
||||
Info "Getting started:"
|
||||
Info " 1. Navigate to your project: cd C:\path\to\project"
|
||||
Info " 2. Start Pi: pi"
|
||||
Info " 3. Log in: /login"
|
||||
Info ""
|
||||
Info "Useful commands:"
|
||||
Info " pi - Start interactive session"
|
||||
Info " pi -p '...' - Ask a single question (print mode)"
|
||||
Info " pi --help - Show help"
|
||||
Info ""
|
||||
Info "List installed packages:"
|
||||
Info " pi list - Show installed packages"
|
||||
Info ""
|
||||
Info "For Ollama Cloud:"
|
||||
Info " Set your API key in $env:USERPROFILE\.pi\agent\auth.json"
|
||||
Info " See: https://pi.dev/packages/pi-ollama-cloud"
|
||||
Executable
+170
@@ -0,0 +1,170 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
# Installs Pi Coding Agent and recommended packages.
|
||||
# Pi: https://pi.dev
|
||||
#
|
||||
# Supported platforms:
|
||||
# macOS : Apple Silicon (arm64), Intel (x86_64)
|
||||
# Linux : x86_64, aarch64
|
||||
#
|
||||
# Prerequisites:
|
||||
# - Node.js 18+ (and npm)
|
||||
# - curl
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Constants
|
||||
# ────────────────────────────────────────────
|
||||
PI_INSTALL_URL="https://pi.dev/install.sh"
|
||||
PI_NPM_PACKAGE="@earendil-works/pi-coding-agent"
|
||||
|
||||
# Packages to install after pi is available
|
||||
# Format: "package_name|description"
|
||||
PACKAGES=(
|
||||
"pi-subagents|Delegate work to focused child agents — code review, scouting, implementation, parallel audits, orchestration, background jobs"
|
||||
"context-mode|Context window protection — sandbox tools, session continuity, BM25 knowledge base, think-in-code paradigm"
|
||||
"pi-mcp-adapter|Use MCP servers with Pi without burning your context window — one proxy tool instead of hundreds"
|
||||
"pi-web-access|Web search, content extraction, and video understanding — zero-config Exa search, Perplexity, Gemini, YouTube"
|
||||
"@plannotator/pi-extension|File-based plan mode with visual browser UI for reviewing, annotating, and approving agent plans"
|
||||
"@juicesharp/rpiv-ask-user-question|Structured questionnaire tool with typed options — the model asks you instead of guessing"
|
||||
"pi-lens|Real-time code feedback — LSP diagnostics, linters, formatters, type-checking, structural analysis, read-before-edit guard"
|
||||
"@juicesharp/rpiv-todo|Persistent todo list across sessions — tasks survive /reload and compaction with dependency tracking"
|
||||
"pi-simplify|Review recently changed code for clarity, consistency, and maintainability improvements"
|
||||
"@juicesharp/rpiv-advisor|Second opinion from a stronger reviewer model before the agent acts"
|
||||
"@juicesharp/rpiv-pi|Skill-based development workflow — discover, research, design, plan, implement, validate pipeline with named subagents"
|
||||
"@samfp/pi-memory|Persistent memory for Pi — learns corrections, preferences, and project patterns across sessions"
|
||||
"pi-btw|Parallel side conversations (/btw) without interrupting the main agent run"
|
||||
"pi-docparser|Document parsing tool — PDFs, Office docs, spreadsheets, images, and OCR via LiteParse"
|
||||
"pi-ollama-cloud|Ollama Cloud provider plugin — dynamic model discovery, web search and fetch tools, no local server required"
|
||||
)
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Utility functions (all stderr output)
|
||||
# ────────────────────────────────────────────
|
||||
info() { echo "[INFO] $*" >&2; }
|
||||
warn() { echo "[WARN] $*" >&2; }
|
||||
error() { echo "[ERROR] $*" >&2; exit 1; }
|
||||
success() { echo "[OK] $*" >&2; }
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Check required commands
|
||||
# ────────────────────────────────────────────
|
||||
for cmd in curl; do
|
||||
command -v "$cmd" &>/dev/null || error "'$cmd' is required."
|
||||
done
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Detect OS / Architecture
|
||||
# ────────────────────────────────────────────
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin|Linux) ;;
|
||||
*)
|
||||
error "Unsupported OS: $OS. This script only supports macOS and Linux."
|
||||
;;
|
||||
esac
|
||||
|
||||
info "Platform: $OS ($ARCH)"
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Step 1: Install Pi Coding Agent
|
||||
# ────────────────────────────────────────────
|
||||
info "Installing Pi Coding Agent..."
|
||||
|
||||
if command -v pi &>/dev/null; then
|
||||
CURRENT_VER="$(pi --version 2>/dev/null || echo 'unknown')"
|
||||
info "Pi is already installed (version: $CURRENT_VER). Skipping installation."
|
||||
else
|
||||
# Try curl-based installer first
|
||||
if curl -fsSL "$PI_INSTALL_URL" 2>/dev/null | sh; then
|
||||
success "Pi installed via curl installer"
|
||||
else
|
||||
# Fallback to npm
|
||||
info "curl install failed. Falling back to npm..."
|
||||
command -v npm &>/dev/null || error "npm is required. Install Node.js 18+: https://nodejs.org/"
|
||||
npm install -g "$PI_NPM_PACKAGE"
|
||||
success "Pi installed via npm"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Verify pi is available (may need to re-hash PATH)
|
||||
if command -v pi &>/dev/null; then
|
||||
success "Pi is available: $(command -v pi)"
|
||||
else
|
||||
# Try common locations
|
||||
export PATH="$HOME/.local/bin:$HOME/.npm/bin:$HOME/.nvm/versions/node/$(ls "$HOME/.nvm/versions/node/" 2>/dev/null | tail -1)/bin:$PATH"
|
||||
if command -v pi &>/dev/null; then
|
||||
success "Pi is available: $(command -v pi)"
|
||||
else
|
||||
error "'pi' command not found. Check your PATH."
|
||||
fi
|
||||
fi
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Step 2: Install packages
|
||||
# ────────────────────────────────────────────
|
||||
info ""
|
||||
info "Installing Pi packages..."
|
||||
info "────────────────────────────────────────"
|
||||
|
||||
TOTAL=${#PACKAGES[@]}
|
||||
COUNT=0
|
||||
FAILED=()
|
||||
|
||||
for entry in "${PACKAGES[@]}"; do
|
||||
PKG="${entry%%|*}"
|
||||
DESC="${entry#*|}"
|
||||
COUNT=$((COUNT + 1))
|
||||
|
||||
info "[$COUNT/$TOTAL] $PKG — $DESC"
|
||||
if pi install "npm:$PKG" 2>&1; then
|
||||
success " → $PKG installed"
|
||||
else
|
||||
warn " → $PKG failed (install manually later: pi install npm:$PKG)"
|
||||
FAILED+=("$PKG")
|
||||
fi
|
||||
done
|
||||
|
||||
info ""
|
||||
info "────────────────────────────────────────"
|
||||
if [ ${#FAILED[@]} -eq 0 ]; then
|
||||
success "All packages installed! ($TOTAL/$TOTAL)"
|
||||
else
|
||||
warn "Some packages failed to install:"
|
||||
for pkg in "${FAILED[@]}"; do
|
||||
warn " - $pkg"
|
||||
done
|
||||
info "You can install failed packages manually with:"
|
||||
for pkg in "${FAILED[@]}"; do
|
||||
info " pi install npm:$pkg"
|
||||
done
|
||||
fi
|
||||
|
||||
# ────────────────────────────────────────────
|
||||
# Step 3: Post-install notes
|
||||
# ────────────────────────────────────────────
|
||||
info ""
|
||||
info "══════════════════════════════════════════"
|
||||
success "Pi Coding Agent installation complete!"
|
||||
info "══════════════════════════════════════════"
|
||||
info ""
|
||||
info "Getting started:"
|
||||
info " 1. Navigate to your project: cd /path/to/project"
|
||||
info " 2. Start Pi: pi"
|
||||
info " 3. Log in: /login"
|
||||
info ""
|
||||
info "Useful commands:"
|
||||
info " pi — Start interactive session"
|
||||
info " pi -p '...' — Ask a single question (print mode)"
|
||||
info " pi --help — Show help"
|
||||
info ""
|
||||
info "List installed packages:"
|
||||
info " pi list — Show installed packages"
|
||||
info ""
|
||||
info "For Ollama Cloud:"
|
||||
info " Set your API key in ~/.pi/agent/auth.json"
|
||||
info " See: https://pi.dev/packages/pi-ollama-cloud"
|
||||
Reference in new issue
Block a user