Skip to content

Commit ddd06b8

Browse files
claudlosclaude
andcommitted
Add standalone binary distribution, setup command, and docs site
- Add `cloding setup` command to detect and install all 5 CLI tools - Compile to standalone binaries via Bun (no Node.js required) - Add curl/irm one-line installers (install.sh, install.ps1) - Add GitHub Actions workflow for automated binary releases on tag - Add VitePress docs site with auto-deploy to GitHub Pages - Update README with new install methods and setup command - Make models.json/version Bun-compatible (require() + build-time define) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 52f6856 commit ddd06b8

23 files changed

+1808
-22
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
34+
- name: Install dependencies
35+
run: npm install
36+
37+
- name: Build with VitePress
38+
run: npm run docs:build
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: docs/.vitepress/dist
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
needs: build
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@v2
20+
with:
21+
bun-version: latest
22+
23+
- name: Build all targets
24+
run: bun run build.js
25+
26+
- name: List artifacts
27+
run: ls -lah dist/
28+
29+
- name: Create GitHub Release
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
generate_release_notes: true
33+
files: |
34+
dist/cloding-linux-x64
35+
dist/cloding-linux-arm64
36+
dist/cloding-darwin-x64
37+
dist/cloding-darwin-arm64
38+
dist/cloding-win-x64.exe
39+
install.sh
40+
install.ps1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ coverage.xml
5555

5656
# mypy
5757
.mypy_cache/
58+
59+
# VitePress
60+
docs/.vitepress/dist/
61+
docs/.vitepress/cache/

README.md

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,42 @@ Claude Opus 4.6 costs $5/$25 per Mtok.
1717
Qwen 3 Coder Next costs $0.12/$0.75 per Mtok.
1818
That's 42x cheaper on input, 33x cheaper on output.
1919

20-
## Quick Start
20+
## Installation
21+
22+
### Standalone Binary (recommended)
23+
24+
No Node.js required — download a single binary:
25+
26+
**macOS / Linux:**
27+
28+
```bash
29+
curl -fsSL https://raw.githubusercontent.com/claudlos/cloding/master/install.sh | bash
30+
```
31+
32+
**Windows (PowerShell):**
33+
34+
```powershell
35+
irm https://raw.githubusercontent.com/claudlos/cloding/master/install.ps1 | iex
36+
```
37+
38+
### npm
39+
40+
If you already have Node.js 18+:
2141

2242
```bash
23-
# Install cloding
2443
npm install -g cloding
44+
```
2545

26-
# Install at least one tool CLI (Claude is default)
27-
npm install -g @anthropic-ai/claude-code
46+
## Quick Start
2847

29-
# Required for default/OpenRouter shortcuts
48+
```bash
49+
# Set your OpenRouter API key
3050
export OPENROUTER_API_KEY=sk-or-v1-your-key-here
3151

32-
# Start interactive session (default model: qwen)
52+
# Install all CLI tools (Claude Code, Gemini, Codex, Copilot, OpenCode)
53+
cloding setup
54+
55+
# Start coding
3356
cloding
3457
```
3558

@@ -43,6 +66,30 @@ cloding --list-models # list shortcuts and prices
4366
cloding -h # help
4467
```
4568

69+
## Setup Command
70+
71+
`cloding setup` detects and installs all supported CLI tools:
72+
73+
```bash
74+
cloding setup # check status + install missing tools
75+
cloding setup --check # status report only, no installation
76+
cloding setup --force # reinstall all tools
77+
```
78+
79+
It checks for:
80+
81+
**Prerequisites** (detected, not installed):
82+
- Node.js 18+
83+
- Python 3.11+ (for pipeline mode)
84+
- Docker (for Docker mode)
85+
86+
**CLI Tools** (detected + installed automatically):
87+
- Claude Code — via native installer
88+
- Gemini CLI — via npm
89+
- Codex CLI — via npm
90+
- GitHub Copilot CLI — via npm
91+
- OpenCode — via npm
92+
4693
## Authentication
4794

4895
Each Anthropic model (haiku, sonnet, opus) supports three routing modes:
@@ -157,6 +204,14 @@ cloding -m copilot # use GitHub paid plan
157204

158205
Unknown flags are passed through to the underlying CLI.
159206

207+
### Setup
208+
209+
```bash
210+
cloding setup # detect + install missing CLI tools
211+
cloding setup --check # status report only
212+
cloding setup --force # reinstall all tools
213+
```
214+
160215
### Docker Mode
161216

162217
```bash
@@ -212,21 +267,13 @@ Pipeline flags:
212267

213268
## Prerequisites
214269

215-
- Node.js 18+
216-
- Node.js 24+ if you want to run `copilot` / `cloding -m copilot`
217-
- OpenRouter key for default/OpenRouter shortcuts
218-
- Docker (optional, for Docker mode)
219-
- Python 3.11+ (optional, for pipeline mode)
220-
221-
Install CLIs you plan to use:
270+
- **OpenRouter key** — for default/OpenRouter shortcuts ([get one here](https://openrouter.ai/keys))
271+
- **Node.js 18+** — required for CLI tool installs (Claude Code, Gemini, etc.)
272+
- **Node.js 24+** — if you want to run `copilot` / `cloding -m copilot`
273+
- **Docker** — optional, for Docker mode
274+
- **Python 3.11+** — optional, for pipeline mode
222275

223-
```bash
224-
npm install -g @anthropic-ai/claude-code
225-
npm install -g @google/gemini-cli
226-
npm install -g @openai/codex
227-
npm install -g @github/copilot
228-
npm install -g opencode-ai
229-
```
276+
> **Tip:** Run `cloding setup` to automatically detect and install all CLI tools.
230277
231278
## Custom Models
232279

0 commit comments

Comments
 (0)