Skip to content

Commit 15d712e

Browse files
grichaclaude
andcommitted
Complete binary distribution setup and update documentation
- Add build:binaries script to package.json - Update TODO.md to mark all binary distribution tasks complete - Add manual download documentation with platform table - Add uninstall documentation Binary distribution system was already implemented: - scripts/build-binaries.ts cross-compiles for all 5 platforms - install.sh handles platform detection and PATH modification - release.yml uploads binaries to GitHub Releases - update-checker.ts shows curl upgrade command 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d3e20a1 commit 15d712e

3 files changed

Lines changed: 51 additions & 59 deletions

File tree

TODO.md

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -16,64 +16,7 @@
1616

1717
## Tasks
1818

19-
### Binary Distribution via Curl Install Script
20-
21-
Switch from npm-based distribution to standalone binary distribution with curl install script (like OpenCode/Claude Code).
22-
23-
**Benefits:**
24-
- No runtime dependency (currently requires Bun installed globally)
25-
- Single binary, faster cold starts with bytecode compilation
26-
- Simpler: `curl -fsSL https://raw.githubusercontent.com/gricha/perry/main/install.sh | bash`
27-
28-
#### Phase 1: Binary Build System
29-
30-
- [ ] Create binary build script using Bun's `--compile` flag for all platforms:
31-
- `perry-linux-x64` (glibc)
32-
- `perry-linux-arm64` (glibc)
33-
- `perry-darwin-x64` (Intel Mac)
34-
- `perry-darwin-arm64` (Apple Silicon)
35-
- `perry-windows-x64.exe`
36-
- [ ] Use `--minify --bytecode` flags for optimized binaries
37-
- [ ] Handle web UI assets embedding (investigate Bun file embedding)
38-
- [ ] Add `build:binaries` script to package.json
39-
- [ ] Test compiled binary runs basic commands locally
40-
41-
#### Phase 2: Install Script
42-
43-
- [ ] Create `install.sh` at repository root with:
44-
- Platform detection (Darwin/Linux via uname)
45-
- Architecture detection (x64/arm64)
46-
- GitHub releases API to fetch latest version
47-
- Download binary from GitHub releases
48-
- Install to `$HOME/.perry/bin` (or `$PERRY_INSTALL_DIR`)
49-
- PATH modification (.bashrc, .zshrc, config.fish, .profile)
50-
- Post-install verification (`perry --version`)
51-
- [ ] Support `--version` flag for specific version install
52-
- [ ] Support `--no-modify-path` flag
53-
- [ ] GitHub Actions detection (add to `$GITHUB_PATH`)
54-
55-
#### Phase 3: Release Workflow
56-
57-
- [ ] Add `binaries` job to `.github/workflows/release.yml`:
58-
- Cross-compile for all targets using Bun
59-
- Create archives (tar.gz for Linux/macOS, zip for Windows)
60-
- Upload to GitHub Releases
61-
- Generate SHA256 checksums
62-
- [ ] Keep npm publish as alternative install method
63-
64-
#### Phase 4: Update Checker
65-
66-
- [ ] Modify `src/update-checker.ts`:
67-
- Query GitHub releases API instead of npm registry
68-
- Update upgrade message to show curl command
69-
- [ ] (Optional) Add `perry upgrade` self-update command
70-
71-
#### Phase 5: Documentation
72-
73-
- [ ] Update `docs/docs/installation.md` with curl install as primary method
74-
- [ ] Update README.md
75-
- [ ] Document manual download from GitHub Releases
76-
- [ ] Document uninstall process
19+
_No tasks pending._
7720

7821
---
7922

docs/docs/installation.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,33 @@ curl -fsSL https://raw.githubusercontent.com/gricha/perry/main/install.sh | bash
2727
curl -fsSL https://raw.githubusercontent.com/gricha/perry/main/install.sh | bash -s -- --no-modify-path
2828
```
2929

30+
## Manual Download
31+
32+
Download pre-built binaries directly from [GitHub Releases](https://github.com/gricha/perry/releases):
33+
34+
| Platform | Architecture | Download |
35+
|----------|--------------|----------|
36+
| Linux | x64 | `perry-VERSION-linux-x64.tar.gz` |
37+
| Linux | arm64 | `perry-VERSION-linux-arm64.tar.gz` |
38+
| macOS | Intel | `perry-VERSION-darwin-x64.tar.gz` |
39+
| macOS | Apple Silicon | `perry-VERSION-darwin-arm64.tar.gz` |
40+
| Windows | x64 | `perry-VERSION-windows-x64.zip` |
41+
42+
Extract and add to your PATH:
43+
44+
```bash
45+
# Linux/macOS
46+
tar -xzf perry-*.tar.gz
47+
sudo mv perry-*/perry /usr/local/bin/
48+
sudo mv perry-*/web /usr/local/share/perry/
49+
50+
# Or install to home directory
51+
mkdir -p ~/.perry/bin
52+
mv perry-*/perry ~/.perry/bin/
53+
mv perry-*/web ~/.perry/
54+
export PATH="$PATH:$HOME/.perry/bin"
55+
```
56+
3057
## From Source
3158

3259
```bash
@@ -50,3 +77,24 @@ Builds the Ubuntu 24.04 base image with dev tools. Takes 5-10 minutes, only need
5077
```bash
5178
perry info
5279
```
80+
81+
## Uninstall
82+
83+
To uninstall Perry:
84+
85+
```bash
86+
# Remove binary and web assets
87+
rm -rf ~/.perry
88+
89+
# Remove config and state (optional - keeps your workspaces config)
90+
rm -rf ~/.config/perry
91+
92+
# Remove PATH entries from shell configs
93+
# Edit ~/.bashrc, ~/.zshrc, ~/.profile to remove the Perry lines
94+
```
95+
96+
If you installed with npm:
97+
98+
```bash
99+
npm uninstall -g @gricha/perry
100+
```

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"format:check": "oxfmt --check src/ test/",
2525
"check": "bun run lint && bun run format:check && bun x tsc --noEmit",
2626
"lint:web": "cd web && bun run lint",
27-
"validate": "bun run check && bun run build && bun run test && bun run lint:web && bun run test:web"
27+
"validate": "bun run check && bun run build && bun run test && bun run lint:web && bun run test:web",
28+
"build:binaries": "bun run scripts/build-binaries.ts"
2829
},
2930
"engines": {
3031
"bun": ">=1.3.5"

0 commit comments

Comments
 (0)