Skip to content

Commit 3be42c4

Browse files
h4x0rclaude
andcommitted
ci: add GitHub Actions CI/release, cargo-deny, rustfmt, clippy, Renovate
- CI workflow: fmt check, clippy -D warnings, cargo-deny (advisories + licenses + sources), cargo test (matrix: ubuntu + macos), frontend lint + vitest + playwright, Tauri build check. All actions hash-pinned. - Release workflow: triggered on v* tags, builds Tauri desktop bundles (macOS aarch64/x86_64 .dmg, Linux .deb/.AppImage, Windows .msi) and standalone CLI tarballs with SHA256 checksums via GitHub Releases. - cargo-deny: license allowlist, advisory exemptions for portable-pty transitive deps (async-std, serial), source registry lockdown. - rustfmt.toml + clippy.toml: enforce consistent formatting and lints. - renovate.json: automated dependency updates with GitHub Actions auto-merge, vulnerability alerts enabled. - Fix license mismatch: workspace Cargo.toml said MIT, now Apache-2.0 matching the LICENSE file. All crates inherit license.workspace. - Apply cargo fmt across entire workspace (formatting-only changes). - Update README: add CI/release badges, replace non-existent brew/winget install methods with GitHub Releases + from-source instructions, update test counts (1,400+), add contributing build/test commands, update roadmap to reflect v0.1.0 actual state vs aspirational features. - Update .gitignore: target/, .DS_Store, test artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b968544 commit 3be42c4

104 files changed

Lines changed: 3106 additions & 1353 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
RUSTFLAGS: "-Dwarnings"
15+
16+
jobs:
17+
fmt:
18+
name: Rustfmt
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
23+
with:
24+
toolchain: stable
25+
components: rustfmt
26+
- run: cargo fmt --all -- --check
27+
28+
clippy:
29+
name: Clippy
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
34+
with:
35+
toolchain: stable
36+
components: clippy
37+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
38+
with:
39+
path: |
40+
~/.cargo/registry
41+
~/.cargo/git
42+
target
43+
key: clippy-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
44+
restore-keys: clippy-${{ runner.os }}-
45+
- run: cargo clippy --workspace --all-targets -- -D warnings
46+
47+
deny:
48+
name: Cargo Deny
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
- uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
53+
with:
54+
command: check advisories licenses sources
55+
56+
test:
57+
name: Test (${{ matrix.os }})
58+
runs-on: ${{ matrix.os }}
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
os: [ubuntu-latest, macos-latest]
63+
steps:
64+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65+
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
66+
with:
67+
toolchain: stable
68+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
69+
with:
70+
path: |
71+
~/.cargo/registry
72+
~/.cargo/git
73+
target
74+
key: test-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
75+
restore-keys: test-${{ runner.os }}-
76+
- run: cargo test --workspace
77+
78+
frontend:
79+
name: Frontend (lint + test + build)
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
83+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
84+
with:
85+
node-version: 20
86+
cache: npm
87+
- run: npm ci
88+
- run: npx tsc --noEmit
89+
- run: npx vitest run
90+
- run: npx playwright install --with-deps chromium
91+
- run: npx playwright test
92+
93+
# Ensure the Tauri app compiles (without bundling)
94+
tauri-build:
95+
name: Tauri build check
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99+
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
100+
with:
101+
toolchain: stable
102+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
103+
with:
104+
node-version: 20
105+
cache: npm
106+
- run: npm ci
107+
- name: Install system dependencies (Linux)
108+
run: |
109+
sudo apt-get update
110+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
111+
- run: npm run build
112+
- run: cargo build --manifest-path src-tauri/Cargo.toml

.github/workflows/release.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
name: Create GitHub Release
14+
runs-on: ubuntu-latest
15+
outputs:
16+
release_id: ${{ steps.create.outputs.id }}
17+
upload_url: ${{ steps.create.outputs.upload_url }}
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- name: Create release
21+
id: create
22+
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
23+
with:
24+
draft: true
25+
generate_release_notes: true
26+
27+
build-tauri:
28+
name: Build Tauri (${{ matrix.platform }})
29+
needs: create-release
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- platform: macos-latest
35+
target: aarch64-apple-darwin
36+
- platform: macos-latest
37+
target: x86_64-apple-darwin
38+
- platform: ubuntu-22.04
39+
target: x86_64-unknown-linux-gnu
40+
- platform: windows-latest
41+
target: x86_64-pc-windows-msvc
42+
runs-on: ${{ matrix.platform }}
43+
steps:
44+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
46+
with:
47+
toolchain: stable
48+
targets: ${{ matrix.target }}
49+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
50+
with:
51+
node-version: 20
52+
cache: npm
53+
- run: npm ci
54+
55+
- name: Install system dependencies (Linux)
56+
if: runner.os == 'Linux'
57+
run: |
58+
sudo apt-get update
59+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
60+
61+
- name: Build Tauri app
62+
uses: tauri-apps/tauri-action@42a8e7afed21ef2e1b5d4e3bdd3b7e075e1f52d2 # v0.5.18
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
with:
66+
releaseId: ${{ needs.create-release.outputs.release_id }}
67+
args: --target ${{ matrix.target }}
68+
69+
build-cli:
70+
name: Build CLI (${{ matrix.target }})
71+
needs: create-release
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
include:
76+
- os: macos-latest
77+
target: aarch64-apple-darwin
78+
binary: shepherd
79+
- os: macos-latest
80+
target: x86_64-apple-darwin
81+
binary: shepherd
82+
- os: ubuntu-22.04
83+
target: x86_64-unknown-linux-gnu
84+
binary: shepherd
85+
- os: windows-latest
86+
target: x86_64-pc-windows-msvc
87+
binary: shepherd.exe
88+
runs-on: ${{ matrix.os }}
89+
steps:
90+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
91+
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
92+
with:
93+
toolchain: stable
94+
targets: ${{ matrix.target }}
95+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
96+
with:
97+
path: |
98+
~/.cargo/registry
99+
~/.cargo/git
100+
target
101+
key: cli-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
102+
restore-keys: cli-${{ matrix.target }}-
103+
104+
- name: Build CLI binaries
105+
run: |
106+
cargo build --release --target ${{ matrix.target }} --package shepherd-cli
107+
cargo build --release --target ${{ matrix.target }} --package shepherd-server
108+
109+
- name: Package CLI (Unix)
110+
if: runner.os != 'Windows'
111+
run: |
112+
mkdir -p dist
113+
cp target/${{ matrix.target }}/release/shepherd dist/
114+
cp target/${{ matrix.target }}/release/shep dist/
115+
cp target/${{ matrix.target }}/release/shepherd-server dist/
116+
cd dist && tar czf shepherd-cli-${{ matrix.target }}.tar.gz shepherd shep shepherd-server
117+
shasum -a 256 shepherd-cli-${{ matrix.target }}.tar.gz > shepherd-cli-${{ matrix.target }}.tar.gz.sha256
118+
119+
- name: Package CLI (Windows)
120+
if: runner.os == 'Windows'
121+
shell: pwsh
122+
run: |
123+
New-Item -ItemType Directory -Force -Path dist
124+
Copy-Item target/${{ matrix.target }}/release/shepherd.exe dist/
125+
Copy-Item target/${{ matrix.target }}/release/shep.exe dist/
126+
Copy-Item target/${{ matrix.target }}/release/shepherd-server.exe dist/
127+
Compress-Archive -Path dist/shepherd.exe,dist/shep.exe,dist/shepherd-server.exe -DestinationPath dist/shepherd-cli-${{ matrix.target }}.zip
128+
Get-FileHash dist/shepherd-cli-${{ matrix.target }}.zip -Algorithm SHA256 | Format-List Hash > dist/shepherd-cli-${{ matrix.target }}.zip.sha256
129+
130+
- name: Upload CLI artifacts
131+
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
132+
with:
133+
files: |
134+
dist/shepherd-cli-*
135+
136+
publish-release:
137+
name: Publish release
138+
needs: [build-tauri, build-cli]
139+
runs-on: ubuntu-latest
140+
steps:
141+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
142+
- name: Publish release (remove draft)
143+
env:
144+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145+
run: |
146+
gh release edit ${{ github.ref_name }} --draft=false

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ node_modules/
44
dist/
55
src-tauri/target/
66
src-tauri/gen/
7+
target/
8+
.DS_Store
9+
tarpaulin-report.json
10+
test-results/
11+
playwright-report/

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exclude = [
1212
[workspace.package]
1313
version = "0.1.0"
1414
edition = "2021"
15-
license = "MIT"
15+
license = "Apache-2.0"
1616

1717
[workspace.dependencies]
1818
shepherd-core = { path = "crates/shepherd-core" }

README.md

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
</p>
2121

2222
<p align="center">
23+
<a href="https://github.com/SecurityRonin/Shepherd/actions/workflows/ci.yml"><img src="https://github.com/SecurityRonin/Shepherd/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
24+
<a href="https://github.com/SecurityRonin/Shepherd/releases"><img src="https://img.shields.io/github/v/release/SecurityRonin/Shepherd?include_prereleases&label=release" alt="Release" /></a>
2325
<a href="https://github.com/sponsors/h4x0r"><img src="https://img.shields.io/badge/sponsor-♥-ea4aaa" alt="Sponsor" /></a>
2426
<img src="https://img.shields.io/badge/status-alpha-orange" alt="Status: Alpha" />
2527
<img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License: Apache 2.0" />
26-
<img src="https://img.shields.io/badge/binary-~600KB-blue" alt="Binary: ~600KB" />
2728
<img src="https://img.shields.io/badge/platform-macOS%20·%20Linux%20·%20Windows-lightgrey" alt="Platforms" />
2829
</p>
2930

@@ -42,14 +43,13 @@ Shepherd fixes that.
4243
**Install:**
4344

4445
```bash
45-
# macOS
46-
brew install shepherd-codes/tap/shepherd
46+
# Download a pre-built release (macOS, Linux, Windows)
47+
# → https://github.com/SecurityRonin/Shepherd/releases
4748

48-
# Linux / from source
49-
curl -fsSL https://shepherd.codes/install.sh | sh
50-
51-
# Windows
52-
winget install shepherd-codes.shepherd
49+
# Or build from source
50+
git clone https://github.com/SecurityRonin/Shepherd.git
51+
cd Shepherd && cargo build --release
52+
# Binaries: target/release/shepherd, target/release/shep, target/release/shepherd-server
5353
```
5454

5555
Installs both `shepherd` and `shep` (same binary, your choice).
@@ -348,21 +348,34 @@ AGENTS (your existing tools, unchanged)
348348
349349
<h2 id="install">Install</h2>
350350
351-
See **[Get started in 60 seconds](#get-started-in-60-seconds)** at the top for the full quickstart.
351+
### Pre-built releases (recommended)
352352
353-
```bash
354-
# macOS
355-
brew install shepherd-codes/tap/shepherd
353+
Download the latest release for your platform from [GitHub Releases](https://github.com/SecurityRonin/Shepherd/releases).
356354
357-
# Linux
358-
curl -fsSL https://shepherd.codes/install.sh | sh
355+
Each release includes:
359356
360-
# Windows
361-
winget install shepherd-codes.shepherd
357+
| Platform | Desktop App | CLI-only |
358+
|----------|-------------|----------|
359+
| macOS (Apple Silicon) | `.dmg` | `shepherd-cli-aarch64-apple-darwin.tar.gz` |
360+
| macOS (Intel) | `.dmg` | `shepherd-cli-x86_64-apple-darwin.tar.gz` |
361+
| Linux (x86_64) | `.deb`, `.AppImage` | `shepherd-cli-x86_64-unknown-linux-gnu.tar.gz` |
362+
| Windows (x86_64) | `.msi` | `shepherd-cli-x86_64-pc-windows-msvc.zip` |
362363
363-
# From source (installs both `shepherd` and `shep`)
364+
The CLI tarball contains `shepherd`, `shep` (alias), and `shepherd-server`. Put them on your PATH.
365+
366+
### From source
367+
368+
```bash
364369
git clone https://github.com/SecurityRonin/Shepherd.git
365-
cd Shepherd && bash scripts/install.sh && npm install && npm run build
370+
cd Shepherd
371+
372+
# CLI only (no GUI)
373+
cargo build --release
374+
# → target/release/shepherd, target/release/shep, target/release/shepherd-server
375+
376+
# Desktop app (requires Node.js + Tauri prerequisites)
377+
npm install && npm run build
378+
cargo tauri build
366379
```
367380

368381
Both `shepherd` and `shep` are installed — they're the same binary. Use whichever you prefer. Most examples in this README use `shep`.
@@ -430,9 +443,11 @@ Restart Shepherd. Your agent shows up in the New Task dropdown.
430443

431444
## Roadmap
432445

433-
**v1.0** (current): Core engine, Kanban board, 9 agents, YOLO engine, quality gates, PR pipeline, CLI with shell completions, LLM client (OpenAI/Anthropic/Ollama), name generator, logo generator, North Star PMF wizard, contextual triggers, nono.sh sandbox, ecosystem auto-install (Superpowers + context-mode + Alaya), new project wizard, iTerm2 session adoption (9 agents, session picker, permission prompt detection, bridge script). 1,100+ tests.
446+
**v0.1.0** (current): Core engine with embedded Axum server, task dispatch loop, PTY agent execution, session monitoring, YOLO rules engine, Kanban board (React + Zustand + xterm.js), WebSocket real-time events, CLI with auto-server-spawn and shell completions, 9 agent adapters, iTerm2 session adoption, quality gates, name/logo generators, North Star PMF wizard, nono.sh sandbox, ecosystem auto-install. 1,400+ tests. 99.7% Rust code coverage. CI with fmt, clippy, cargo-deny, Vitest, and Playwright.
434447

435-
**v1.1**: Best-of-N (run same task on multiple agents, compare outputs). Issue tracker integration (Linear, GitHub Issues, Jira). Event-driven automations.
448+
**v0.2**: Full multi-agent coordination (concurrent dispatch, agent-to-agent handoff). One-click PR pipeline. Docker isolation mode. Homebrew tap + winget package.
449+
450+
**v1.0**: Best-of-N (run same task on multiple agents, compare outputs). Issue tracker integration (Linear, GitHub Issues, Jira). Event-driven automations. Cloud sync (Shepherd Pro).
436451

437452
**v2.0**: Mobile monitoring (push notifications, approve from phone). Team dashboards. Browser UI for remote access. Adapter registry.
438453

@@ -443,11 +458,25 @@ Shepherd is Apache 2.0 licensed and built in the open.
443458
```bash
444459
git clone https://github.com/SecurityRonin/Shepherd.git
445460
cd Shepherd
446-
cargo build
447-
npm install && npm run dev
461+
462+
# Backend
463+
cargo fmt --all -- --check # formatting
464+
cargo clippy --workspace # lints
465+
cargo deny check # license + advisory audit
466+
cargo test --workspace # 1,350+ Rust tests
467+
468+
# Frontend
469+
npm install
470+
npx tsc --noEmit # type check
471+
npx vitest run # 187 unit tests
472+
npx playwright test # 8 e2e browser tests
473+
474+
# Run the desktop app in dev mode
475+
npm run dev # starts Vite on :1420
476+
cargo tauri dev # launches Tauri with hot reload
448477
```
449478

450-
PRs welcome. Check [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
479+
PRs welcome. CI enforces fmt, clippy, cargo-deny, and all test suites.
451480

452481
If you find Shepherd useful, star the repo. It helps others find it.
453482

0 commit comments

Comments
 (0)