Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Commit d7b91c3

Browse files
yysjasmineclaude
andcommitted
chore: restore root .gitattributes to pin line endings
A previous vendor-import commit (2a6d162) deleted the root .gitattributes, so git for Windows (on both developer machines and the CI runner) started applying autocrlf=true to our installer scripts. The built .exe ended up with CRLF line endings inside shared/*.sh; WSL bash then tripped on the \r tokens ("$'\r': command not found", "invalid option name...set: pipefail") when the installer ran on a user's machine. Add a scoped root .gitattributes that: - pins linux/ macos/ shared/ scripts/ config/ docs as LF (WSL needs LF) - pins windows/*.ps1 and *.iss as CRLF (native Windows tooling) - deliberately does NOT match repos/** so vendored upstreams keep their own line-ending conventions and our vendor diffs stay clean Index is renormalized for our own files only. No content changes — just line endings. README / installer.iss / install-deps.ps1 show in this diff purely because git re-committed them under the new rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5269e67 commit d7b91c3

5 files changed

Lines changed: 1186 additions & 1160 deletions

File tree

.gitattributes

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Line-ending policy for agent_pack's own files.
2+
#
3+
# The root .gitattributes only governs files we author directly (installers,
4+
# shared helpers, CI scripts, docs). Vendored upstreams under repos/ bring
5+
# their own .gitattributes and their own line-ending conventions — we
6+
# deliberately do NOT touch those, to keep vendored diffs clean.
7+
8+
# Installer scripts and shared helpers — must be LF so WSL bash / macOS bash
9+
# don't choke on \r tokens (see the CRLF-pollution pitfall in our runbooks).
10+
/linux/**/*.sh text eol=lf
11+
/macos/**/*.sh text eol=lf
12+
/shared/**/*.sh text eol=lf
13+
/scripts/**/*.sh text eol=lf
14+
15+
# Python helpers shipped inside the installer payload.
16+
/shared/**/*.py text eol=lf
17+
18+
# Windows-side glue — PowerShell + Inno Setup prefer CRLF.
19+
/windows/**/*.ps1 text eol=crlf
20+
/windows/**/*.iss text eol=crlf
21+
22+
# Config and docs at repo root — keep LF for cross-platform diff stability.
23+
/config/**/*.json text eol=lf
24+
/.github/**/*.yml text eol=lf
25+
/.github/**/*.yaml text eol=lf
26+
*.md text eol=lf

README.md

Lines changed: 182 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -1,182 +1,182 @@
1-
# Agent Pack
2-
3-
Multi-platform one-click installer for [Hermes Agent](https://github.com/NousResearch/hermes-agent) and [OpenClaw](https://github.com/openclaw/openclaw).
4-
5-
[中文 README](README.zh-CN.md)
6-
7-
## What It Does
8-
9-
- Installs Hermes Agent and/or OpenClaw via each product's official installer
10-
- Configures an LLM provider (OpenRouter, OpenAI, Anthropic, or custom)
11-
- Ships with bundled Sensenova skills already placed inside each product's `skills/` directory
12-
- Launches the installed agent(s) automatically when setup finishes — no manual shell-restart step
13-
14-
## How It Works
15-
16-
Agent Pack is the source of truth for its vendored copies of Hermes Agent and OpenClaw (under `repos/`). At install time, each installer clones this monorepo fresh from GitHub (once, shared across products), copies out the relevant subdirectory, and invokes the bundled `scripts/install.sh` with `--source-ready` so it skips its own clone/pull and uses the freshly copied source. Runtime dependencies (Python, Node.js, uv, git, build tools) are still handled by the product installer.
17-
18-
```
19-
Step 1: Collect LLM provider credentials up front (one interactive pass)
20-
Step 2: Select products (Hermes / OpenClaw / Both)
21-
Step 3: Clone agent_pack once, copy out repos/<product>, run its install.sh
22-
- Hermes: install.sh --source-ready --skip-setup --dir <target>
23-
- OpenClaw: install.sh --install-method git --source-ready --git-dir <target> \
24-
--no-onboard --no-prompt
25-
Step 4: Write LLM provider config per product immediately after it installs
26-
(~/.hermes/config.yaml, ~/.openclaw/openclaw.json; OpenClaw is configured
27-
via its own CLI, which also registers the model under models.providers)
28-
Step 5: Launch the installed agent(s) in the current window
29-
- Hermes only: exec hermes
30-
- OpenClaw only: exec openclaw gateway --verbose (+ opens dashboard in browser)
31-
- Both: openclaw gateway runs in the background (log at
32-
~/.openclaw/gateway.log), hermes takes over the foreground,
33-
and the OpenClaw dashboard opens in the browser
34-
```
35-
36-
Bundled skills live inside `repos/hermes-agent/skills/` and `repos/openclaw/skills/`, so they are installed as part of each product's normal install — no extra step needed.
37-
38-
The up-front LLM prompt means the user only interacts once; the long-running installs and the final product launch then run unattended. Per-product config is written as soon as each install succeeds, so a later product's failure never strands a working one without credentials.
39-
40-
### China-region mirrors
41-
42-
When the installer detects a China region (or `AGENTPACK_CN=1` is set), it prefixes the clone URL with a GitHub proxy — defaults are `https://ghproxy.cn/` then `https://ghfast.top/`, tried in order on failure. Override the list in `config/defaults.json` under `agent_pack.cn_mirrors`.
43-
44-
## Platform Prerequisites
45-
46-
Platform-level prerequisites are **not** auto-installed — install them manually once, then run the Agent Pack installer. Runtime dependencies (Python, Node.js, uv, git, build tools) **are** auto-installed by the product installers, so you don't need those.
47-
48-
### Windows
49-
50-
Requires **WSL2 + a Linux distro** (the Inno Setup installer calls `wsl.exe` under the hood).
51-
52-
1. Open **PowerShell as Administrator** and run:
53-
```powershell
54-
wsl --install
55-
```
56-
2. **Reboot** when prompted.
57-
3. On first boot, Windows launches the new Ubuntu distro — set a UNIX username and password.
58-
4. (Optional, only if `wsl --install` didn't pick one) install a distro from the Microsoft Store, e.g. Ubuntu.
59-
60-
Reference: <https://learn.microsoft.com/windows/wsl/install>
61-
62-
### macOS
63-
64-
Requires **Xcode Command Line Tools** (for `git`, `clang`) and **Homebrew** (used by the installer to `brew install` runtime deps).
65-
66-
1. Install the Command Line Tools:
67-
```bash
68-
xcode-select --install
69-
```
70-
2. Install Homebrew (skip if `brew --version` already prints a version):
71-
```bash
72-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
73-
```
74-
3. On Apple Silicon, add brew to your shell (the installer auto-sources this too, but do it once for your own shell):
75-
```bash
76-
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
77-
eval "$(/opt/homebrew/bin/brew shellenv)"
78-
```
79-
80-
References: <https://developer.apple.com/download/all/> · <https://brew.sh>
81-
82-
### Linux
83-
84-
No manual prerequisites — the installer handles `apt`/`yum` dependencies itself. You only need `bash`, `curl`, and `sudo` (standard on every mainstream distro).
85-
86-
## Download
87-
88-
Pre-built installers live on the [GitHub Releases page](https://github.com/SenseTime-FVG/agent_pack/releases/latest). Grab the one for your platform:
89-
90-
| Platform | Download | How to Use |
91-
|----------|----------|------------|
92-
| Windows | [`AgentPack-1.0.0-windows-x64.exe`](https://github.com/SenseTime-FVG/agent_pack/releases/latest/download/AgentPack-1.0.0-windows-x64.exe) | Double-click and follow the wizard; installation runs inside WSL2, and the PowerShell window is taken over by the installed agent when setup finishes |
93-
| macOS | [`AgentPack-1.0.0-macos-universal.pkg`](https://github.com/SenseTime-FVG/agent_pack/releases/latest/download/AgentPack-1.0.0-macos-universal.pkg) | Double-click, then complete setup in the Terminal window that opens; the same window becomes the agent's REPL / gateway once installation finishes |
94-
| Linux | [`AgentPack-1.0.0-linux.sh`](https://github.com/SenseTime-FVG/agent_pack/releases/latest/download/AgentPack-1.0.0-linux.sh) *or* the one-liner below | Download and run `chmod +x AgentPack-1.0.0-linux.sh && ./AgentPack-1.0.0-linux.sh`, or paste `curl -fsSL https://raw.githubusercontent.com/SenseTime-FVG/agent_pack/main/linux/install.sh \| bash` — either way the shell that ran the installer is handed over to the agent via `exec` |
95-
96-
## Building from Source
97-
98-
### Windows (.exe)
99-
100-
Requires [Inno Setup 6](https://jrsoftware.org/isinfo.php) installed.
101-
102-
```powershell
103-
cd windows
104-
iscc installer.iss
105-
```
106-
107-
Output: `dist/AgentPack-1.0.0-windows-x64.exe`
108-
109-
### macOS (.pkg)
110-
111-
Run on a macOS machine:
112-
113-
```bash
114-
cd macos
115-
./build-pkg.sh
116-
```
117-
118-
Output: `dist/AgentPack-1.0.0-macos-universal.pkg`
119-
120-
### Linux
121-
122-
No build step needed. Distribute `linux/install.sh` and `linux/lib/` together, or host the full repo and use:
123-
124-
```bash
125-
curl -fsSL https://raw.githubusercontent.com/SenseTime-FVG/agent_pack/main/linux/install.sh | bash
126-
```
127-
128-
## Configuration
129-
130-
All configurable values live in a single file: [`config/defaults.json`](config/defaults.json).
131-
132-
### Bundled Skills
133-
134-
Skills are committed directly to the bundled product repos:
135-
136-
- Hermes: `repos/hermes-agent/skills/` (excludes `system-admin-skill`)
137-
- OpenClaw: `repos/openclaw/skills/` (all skills)
138-
139-
To update the skill set, edit the `skills/` directory of the relevant repo and commit. There is no separate skill-sync step or manifest file.
140-
141-
### Product Install Sources
142-
143-
`config/defaults.json` declares where the vendored source tree is fetched from and where each product gets installed:
144-
145-
```json
146-
"agent_pack": {
147-
"repo_url": "https://github.com/SenseTime-FVG/agent_pack.git",
148-
"branch": "main",
149-
"cn_mirrors": ["https://ghproxy.cn/", "https://ghfast.top/"]
150-
},
151-
"hermes": { "branch": "main", "install_dir": "$HOME/.agent-pack/repos/hermes-agent" },
152-
"openclaw": { "install_dir": "$HOME/.agent-pack/repos/openclaw" }
153-
```
154-
155-
All platforms (Windows, macOS, Linux) clone `agent_pack.repo_url` at install time and copy out `repos/<product>/`. There is no longer a separate "bundled" install path — the Windows `.exe` and macOS `.pkg` bundle only the glue scripts, not the product sources.
156-
157-
### LLM Providers
158-
159-
The installer guides users through provider setup. Provider defaults (name, base URL, default model, signup URL) are read from `config/defaults.json`:
160-
161-
- **OpenRouter** (default) — 200+ models, free tier available
162-
- **OpenAI**`gpt-4o-mini` default
163-
- **Anthropic** — Claude Sonnet default
164-
- **Custom** — Any OpenAI-compatible endpoint
165-
166-
Resulting config is written to `~/.hermes/config.yaml` and `~/.openclaw/openclaw.json`.
167-
168-
## Project Structure
169-
170-
```text
171-
agent_pack/
172-
|- config/ # Single source of truth: defaults.json (repo URL, mirrors, LLM providers)
173-
|- shared/ # verify-llm.py + fetch-agent-pack.sh (clones agent_pack with CN fallback)
174-
|- repos/ # Vendored hermes-agent and openclaw sources (with skills bundled in)
175-
|- windows/ # Inno Setup installer + PowerShell/WSL bridge scripts
176-
|- macos/ # .pkg builder + pre/postinstall scripts
177-
\- linux/ # Bash installer (install.sh + lib/)
178-
```
179-
180-
## License
181-
182-
MIT
1+
# Agent Pack
2+
3+
Multi-platform one-click installer for [Hermes Agent](https://github.com/NousResearch/hermes-agent) and [OpenClaw](https://github.com/openclaw/openclaw).
4+
5+
[中文 README](README.zh-CN.md)
6+
7+
## What It Does
8+
9+
- Installs Hermes Agent and/or OpenClaw via each product's official installer
10+
- Configures an LLM provider (OpenRouter, OpenAI, Anthropic, or custom)
11+
- Ships with bundled Sensenova skills already placed inside each product's `skills/` directory
12+
- Launches the installed agent(s) automatically when setup finishes — no manual shell-restart step
13+
14+
## How It Works
15+
16+
Agent Pack is the source of truth for its vendored copies of Hermes Agent and OpenClaw (under `repos/`). At install time, each installer clones this monorepo fresh from GitHub (once, shared across products), copies out the relevant subdirectory, and invokes the bundled `scripts/install.sh` with `--source-ready` so it skips its own clone/pull and uses the freshly copied source. Runtime dependencies (Python, Node.js, uv, git, build tools) are still handled by the product installer.
17+
18+
```
19+
Step 1: Collect LLM provider credentials up front (one interactive pass)
20+
Step 2: Select products (Hermes / OpenClaw / Both)
21+
Step 3: Clone agent_pack once, copy out repos/<product>, run its install.sh
22+
- Hermes: install.sh --source-ready --skip-setup --dir <target>
23+
- OpenClaw: install.sh --install-method git --source-ready --git-dir <target> \
24+
--no-onboard --no-prompt
25+
Step 4: Write LLM provider config per product immediately after it installs
26+
(~/.hermes/config.yaml, ~/.openclaw/openclaw.json; OpenClaw is configured
27+
via its own CLI, which also registers the model under models.providers)
28+
Step 5: Launch the installed agent(s) in the current window
29+
- Hermes only: exec hermes
30+
- OpenClaw only: exec openclaw gateway --verbose (+ opens dashboard in browser)
31+
- Both: openclaw gateway runs in the background (log at
32+
~/.openclaw/gateway.log), hermes takes over the foreground,
33+
and the OpenClaw dashboard opens in the browser
34+
```
35+
36+
Bundled skills live inside `repos/hermes-agent/skills/` and `repos/openclaw/skills/`, so they are installed as part of each product's normal install — no extra step needed.
37+
38+
The up-front LLM prompt means the user only interacts once; the long-running installs and the final product launch then run unattended. Per-product config is written as soon as each install succeeds, so a later product's failure never strands a working one without credentials.
39+
40+
### China-region mirrors
41+
42+
When the installer detects a China region (or `AGENTPACK_CN=1` is set), it prefixes the clone URL with a GitHub proxy — defaults are `https://ghproxy.cn/` then `https://ghfast.top/`, tried in order on failure. Override the list in `config/defaults.json` under `agent_pack.cn_mirrors`.
43+
44+
## Platform Prerequisites
45+
46+
Platform-level prerequisites are **not** auto-installed — install them manually once, then run the Agent Pack installer. Runtime dependencies (Python, Node.js, uv, git, build tools) **are** auto-installed by the product installers, so you don't need those.
47+
48+
### Windows
49+
50+
Requires **WSL2 + a Linux distro** (the Inno Setup installer calls `wsl.exe` under the hood).
51+
52+
1. Open **PowerShell as Administrator** and run:
53+
```powershell
54+
wsl --install
55+
```
56+
2. **Reboot** when prompted.
57+
3. On first boot, Windows launches the new Ubuntu distro — set a UNIX username and password.
58+
4. (Optional, only if `wsl --install` didn't pick one) install a distro from the Microsoft Store, e.g. Ubuntu.
59+
60+
Reference: <https://learn.microsoft.com/windows/wsl/install>
61+
62+
### macOS
63+
64+
Requires **Xcode Command Line Tools** (for `git`, `clang`) and **Homebrew** (used by the installer to `brew install` runtime deps).
65+
66+
1. Install the Command Line Tools:
67+
```bash
68+
xcode-select --install
69+
```
70+
2. Install Homebrew (skip if `brew --version` already prints a version):
71+
```bash
72+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
73+
```
74+
3. On Apple Silicon, add brew to your shell (the installer auto-sources this too, but do it once for your own shell):
75+
```bash
76+
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
77+
eval "$(/opt/homebrew/bin/brew shellenv)"
78+
```
79+
80+
References: <https://developer.apple.com/download/all/> · <https://brew.sh>
81+
82+
### Linux
83+
84+
No manual prerequisites — the installer handles `apt`/`yum` dependencies itself. You only need `bash`, `curl`, and `sudo` (standard on every mainstream distro).
85+
86+
## Download
87+
88+
Pre-built installers live on the [GitHub Releases page](https://github.com/SenseTime-FVG/agent_pack/releases/latest). Grab the one for your platform:
89+
90+
| Platform | Download | How to Use |
91+
|----------|----------|------------|
92+
| Windows | [`AgentPack-1.0.0-windows-x64.exe`](https://github.com/SenseTime-FVG/agent_pack/releases/latest/download/AgentPack-1.0.0-windows-x64.exe) | Double-click and follow the wizard; installation runs inside WSL2, and the PowerShell window is taken over by the installed agent when setup finishes |
93+
| macOS | [`AgentPack-1.0.0-macos-universal.pkg`](https://github.com/SenseTime-FVG/agent_pack/releases/latest/download/AgentPack-1.0.0-macos-universal.pkg) | Double-click, then complete setup in the Terminal window that opens; the same window becomes the agent's REPL / gateway once installation finishes |
94+
| Linux | [`AgentPack-1.0.0-linux.sh`](https://github.com/SenseTime-FVG/agent_pack/releases/latest/download/AgentPack-1.0.0-linux.sh) *or* the one-liner below | Download and run `chmod +x AgentPack-1.0.0-linux.sh && ./AgentPack-1.0.0-linux.sh`, or paste `curl -fsSL https://raw.githubusercontent.com/SenseTime-FVG/agent_pack/main/linux/install.sh \| bash` — either way the shell that ran the installer is handed over to the agent via `exec` |
95+
96+
## Building from Source
97+
98+
### Windows (.exe)
99+
100+
Requires [Inno Setup 6](https://jrsoftware.org/isinfo.php) installed.
101+
102+
```powershell
103+
cd windows
104+
iscc installer.iss
105+
```
106+
107+
Output: `dist/AgentPack-1.0.0-windows-x64.exe`
108+
109+
### macOS (.pkg)
110+
111+
Run on a macOS machine:
112+
113+
```bash
114+
cd macos
115+
./build-pkg.sh
116+
```
117+
118+
Output: `dist/AgentPack-1.0.0-macos-universal.pkg`
119+
120+
### Linux
121+
122+
No build step needed. Distribute `linux/install.sh` and `linux/lib/` together, or host the full repo and use:
123+
124+
```bash
125+
curl -fsSL https://raw.githubusercontent.com/SenseTime-FVG/agent_pack/main/linux/install.sh | bash
126+
```
127+
128+
## Configuration
129+
130+
All configurable values live in a single file: [`config/defaults.json`](config/defaults.json).
131+
132+
### Bundled Skills
133+
134+
Skills are committed directly to the bundled product repos:
135+
136+
- Hermes: `repos/hermes-agent/skills/` (excludes `system-admin-skill`)
137+
- OpenClaw: `repos/openclaw/skills/` (all skills)
138+
139+
To update the skill set, edit the `skills/` directory of the relevant repo and commit. There is no separate skill-sync step or manifest file.
140+
141+
### Product Install Sources
142+
143+
`config/defaults.json` declares where the vendored source tree is fetched from and where each product gets installed:
144+
145+
```json
146+
"agent_pack": {
147+
"repo_url": "https://github.com/SenseTime-FVG/agent_pack.git",
148+
"branch": "main",
149+
"cn_mirrors": ["https://ghproxy.cn/", "https://ghfast.top/"]
150+
},
151+
"hermes": { "branch": "main", "install_dir": "$HOME/.agent-pack/repos/hermes-agent" },
152+
"openclaw": { "install_dir": "$HOME/.agent-pack/repos/openclaw" }
153+
```
154+
155+
All platforms (Windows, macOS, Linux) clone `agent_pack.repo_url` at install time and copy out `repos/<product>/`. There is no longer a separate "bundled" install path — the Windows `.exe` and macOS `.pkg` bundle only the glue scripts, not the product sources.
156+
157+
### LLM Providers
158+
159+
The installer guides users through provider setup. Provider defaults (name, base URL, default model, signup URL) are read from `config/defaults.json`:
160+
161+
- **OpenRouter** (default) — 200+ models, free tier available
162+
- **OpenAI**`gpt-4o-mini` default
163+
- **Anthropic** — Claude Sonnet default
164+
- **Custom** — Any OpenAI-compatible endpoint
165+
166+
Resulting config is written to `~/.hermes/config.yaml` and `~/.openclaw/openclaw.json`.
167+
168+
## Project Structure
169+
170+
```text
171+
agent_pack/
172+
|- config/ # Single source of truth: defaults.json (repo URL, mirrors, LLM providers)
173+
|- shared/ # verify-llm.py + fetch-agent-pack.sh (clones agent_pack with CN fallback)
174+
|- repos/ # Vendored hermes-agent and openclaw sources (with skills bundled in)
175+
|- windows/ # Inno Setup installer + PowerShell/WSL bridge scripts
176+
|- macos/ # .pkg builder + pre/postinstall scripts
177+
\- linux/ # Bash installer (install.sh + lib/)
178+
```
179+
180+
## License
181+
182+
MIT

0 commit comments

Comments
 (0)