Skip to content

Commit 4bc2acc

Browse files
committed
Add Homebrew formula, release workflow, and rename slate-agent to codiv
1 parent 038cd9c commit 4bc2acc

9 files changed

Lines changed: 181 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
name: Build ${{ matrix.target }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
include:
21+
- os: macos-latest
22+
target: aarch64-apple-darwin
23+
- os: macos-13
24+
target: x86_64-apple-darwin
25+
- os: ubuntu-latest
26+
target: x86_64-unknown-linux-gnu
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install Rust
31+
uses: dtolnay/rust-toolchain@stable
32+
33+
- name: Build
34+
run: cargo build --workspace --release
35+
36+
- name: Package
37+
run: |
38+
TAG="${GITHUB_REF#refs/tags/}"
39+
DIR="codiv-${TAG}-${{ matrix.target }}"
40+
mkdir "$DIR"
41+
cp target/release/codiv target/release/codivd "$DIR/"
42+
cp LICENSE README.md "$DIR/"
43+
tar czf "${DIR}.tar.gz" "$DIR"
44+
45+
- name: Upload artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: codiv-${{ matrix.target }}
49+
path: codiv-*.tar.gz
50+
51+
release:
52+
name: Create Release
53+
needs: build
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/download-artifact@v4
57+
with:
58+
merge-multiple: true
59+
60+
- name: Create GitHub Release
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
generate_release_notes: true
64+
files: codiv-*.tar.gz
65+
66+
update-formula:
67+
name: Update Homebrew Formula
68+
needs: release
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v4
72+
with:
73+
ref: main
74+
75+
- name: Update formula SHA256 hashes
76+
env:
77+
GH_TOKEN: ${{ github.token }}
78+
run: |
79+
TAG="${GITHUB_REF#refs/tags/}"
80+
gh release download "$TAG" --dir tarballs
81+
82+
SHA_ARM=$(shasum -a 256 tarballs/codiv-${TAG}-aarch64-apple-darwin.tar.gz | awk '{print $1}')
83+
SHA_INTEL=$(shasum -a 256 tarballs/codiv-${TAG}-x86_64-apple-darwin.tar.gz | awk '{print $1}')
84+
SHA_LINUX=$(shasum -a 256 tarballs/codiv-${TAG}-x86_64-unknown-linux-gnu.tar.gz | awk '{print $1}')
85+
86+
sed -i "s|SHA256_ARM_PLACEHOLDER|${SHA_ARM}|g" Formula/codiv.rb
87+
sed -i "s|SHA256_INTEL_PLACEHOLDER|${SHA_INTEL}|g" Formula/codiv.rb
88+
sed -i "s|SHA256_LINUX_PLACEHOLDER|${SHA_LINUX}|g" Formula/codiv.rb
89+
90+
# Also update the version/URLs
91+
sed -i "s|VERSION_PLACEHOLDER|${TAG}|g" Formula/codiv.rb
92+
93+
- name: Commit updated formula
94+
run: |
95+
git config user.name "github-actions[bot]"
96+
git config user.email "github-actions[bot]@users.noreply.github.com"
97+
git add Formula/codiv.rb
98+
git commit -m "Update Homebrew formula for ${GITHUB_REF#refs/tags/}" || echo "No changes to commit"
99+
git push

Formula/codiv.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class Codiv < Formula
2+
desc "Terminal-native AI coding assistant built in Rust"
3+
homepage "https://codiv.ai"
4+
version "VERSION_PLACEHOLDER"
5+
license "GPL-3.0-only"
6+
7+
on_macos do
8+
on_arm do
9+
url "https://github.com/razorback16/codiv/releases/download/VERSION_PLACEHOLDER/codiv-VERSION_PLACEHOLDER-aarch64-apple-darwin.tar.gz"
10+
sha256 "SHA256_ARM_PLACEHOLDER"
11+
end
12+
13+
on_intel do
14+
url "https://github.com/razorback16/codiv/releases/download/VERSION_PLACEHOLDER/codiv-VERSION_PLACEHOLDER-x86_64-apple-darwin.tar.gz"
15+
sha256 "SHA256_INTEL_PLACEHOLDER"
16+
end
17+
end
18+
19+
on_linux do
20+
on_intel do
21+
url "https://github.com/razorback16/codiv/releases/download/VERSION_PLACEHOLDER/codiv-VERSION_PLACEHOLDER-x86_64-unknown-linux-gnu.tar.gz"
22+
sha256 "SHA256_LINUX_PLACEHOLDER"
23+
end
24+
end
25+
26+
def install
27+
bin.install "codiv"
28+
bin.install "codivd"
29+
end
30+
31+
test do
32+
assert_match "codiv", shell_output("#{bin}/codiv --help")
33+
end
34+
end

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,40 @@ codiv (TUI client) codivd (daemon)
3333
| `codiv-tools` | Shared library — tool implementations (bash, read, write, edit, glob, grep) and agent guides |
3434
| `codiv-common` | Shared types — IPC messages, config, utilities |
3535

36-
## Getting Started
36+
## Install
3737

38-
### Prerequisites
38+
### Homebrew (macOS / Linux)
3939

40-
- Rust toolchain (stable)
41-
- An API key for at least one LLM provider (Anthropic, OpenAI, or Google)
40+
```bash
41+
brew tap razorback16/codiv https://github.com/razorback16/codiv.git
42+
brew install codiv
43+
```
44+
45+
This installs both `codiv` and `codivd`.
4246

43-
### Build
47+
### Cargo Install (from Git)
4448

4549
```bash
46-
cargo build --workspace
50+
cargo install --git https://github.com/razorback16/codiv.git codiv
51+
cargo install --git https://github.com/razorback16/codiv.git codivd
4752
```
4853

49-
### Install
54+
Requires the Rust toolchain — install via [rustup](https://rustup.rs/).
55+
56+
### Build from Source
5057

5158
```bash
59+
git clone https://github.com/razorback16/codiv.git
60+
cd codiv
5261
cargo build --workspace --release
5362
ln -sf "$(pwd)/target/release/codiv" /usr/local/bin/codiv
63+
ln -sf "$(pwd)/target/release/codivd" /usr/local/bin/codivd
5464
```
5565

66+
### Prerequisites
67+
68+
- An API key for at least one LLM provider (Anthropic, OpenAI, or Google)
69+
5670
### Run
5771

5872
```bash

website/src/components/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="footer-inner container">
77
<span class="footer-left">Codiv &mdash; GPLv3 License</span>
88
<a
9-
href="https://github.com/razorback16/slate-agent"
9+
href="https://github.com/razorback16/codiv"
1010
class="footer-link"
1111
target="_blank"
1212
rel="noopener noreferrer"

website/src/components/Header.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import ThemeToggle from './ThemeToggle.astro';
2121

2222
<nav class="nav">
2323
<a href="/docs/getting-started/installation/" class="nav-link">Docs</a>
24-
<a href="https://github.com/razorback16/slate-agent" class="nav-link" target="_blank" rel="noopener noreferrer">
24+
<a href="https://github.com/razorback16/codiv" class="nav-link" target="_blank" rel="noopener noreferrer">
2525
GitHub
2626
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" style="display:inline;vertical-align:middle;margin-left:2px;">
2727
<path d="M7 17L17 7M17 7H7M17 7v10"/>

website/src/components/Hero.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</p>
1111
<div class="hero-ctas">
1212
<a href="/docs/getting-started/installation/" class="btn btn-primary">Get Started</a>
13-
<a href="https://github.com/razorback16/slate-agent" class="btn btn-outline">View on GitHub</a>
13+
<a href="https://github.com/razorback16/codiv" class="btn btn-outline">View on GitHub</a>
1414
</div>
1515
</div>
1616
</section>

website/src/content/docs/contributing/code-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ order: 2
1010
Codiv is a Cargo workspace with four crates:
1111

1212
```
13-
slate-agent/
13+
codiv/
1414
├── Cargo.toml # Workspace root
1515
├── codiv/ # TUI client
1616
├── codivd/ # Async daemon

website/src/content/docs/contributing/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Logs are written to `/tmp/codiv-debug.log`. This is useful for debugging IPC iss
8888
## Project Structure
8989

9090
```
91-
slate-agent/
91+
codiv/
9292
├── codiv/ # TUI client crate
9393
│ └── src/
9494
├── codivd/ # Daemon crate

website/src/content/docs/getting-started/installation.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,46 @@ order: 1
99

1010
Before installing Codiv, make sure you have:
1111

12-
- **Rust toolchain** (stable) — install via [rustup](https://rustup.rs/)
1312
- **An LLM API key** from at least one supported provider:
1413
- [Anthropic](https://console.anthropic.com/) (Claude)
1514
- [OpenAI](https://platform.openai.com/) (GPT)
1615
- [Google](https://aistudio.google.com/) (Gemini)
1716

18-
## Build from Source
17+
## Homebrew (macOS / Linux)
1918

20-
Clone the repository and build all workspace crates:
19+
The easiest way to install Codiv:
20+
21+
```bash
22+
brew tap razorback16/codiv https://github.com/razorback16/codiv.git
23+
brew install codiv
24+
```
25+
26+
This installs both `codiv` (TUI client) and `codivd` (daemon).
27+
28+
## Cargo Install (from Git)
29+
30+
If you have the [Rust toolchain](https://rustup.rs/) installed:
2131

2232
```bash
23-
git clone https://github.com/razorback16/slate-agent.git
24-
cd slate-agent
25-
cargo build --workspace
33+
cargo install --git https://github.com/razorback16/codiv.git codiv
34+
cargo install --git https://github.com/razorback16/codiv.git codivd
2635
```
2736

28-
This compiles the `codiv` client, `codivd` daemon, and all shared library crates.
37+
Both commands are needed — `codiv` is the TUI client and `codivd` is the daemon it connects to.
2938

30-
## Install
39+
## Build from Source
3140

32-
For a release build with optimizations, run:
41+
Clone the repository and build all workspace crates:
3342

3443
```bash
44+
git clone https://github.com/razorback16/codiv.git
45+
cd codiv
3546
cargo build --workspace --release
3647
ln -sf "$(pwd)/target/release/codiv" /usr/local/bin/codiv
48+
ln -sf "$(pwd)/target/release/codivd" /usr/local/bin/codivd
3749
```
3850

39-
This creates a symlink so `codiv` is available on your `PATH`.
51+
This compiles the `codiv` client, `codivd` daemon, and all shared library crates, then symlinks both binaries to your `PATH`.
4052

4153
## Verify
4254

0 commit comments

Comments
 (0)