Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Router Binaries
name: CLI Binaries

on:
push:
tags:
- "router-v*"
- "cli-v*"
workflow_dispatch:
inputs:
tag:
description: "Release tag to publish (e.g. router-v0.1.0)"
description: "Release tag to publish (e.g. cli-v0.1.0)"
required: true
type: string

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: router/go.mod
go-version-file: cli/go.mod

- name: Build binary
shell: bash
Expand All @@ -59,17 +59,17 @@ jobs:
set -euo pipefail
mkdir -p dist

binary_name="agentation-router"
binary_name="agentation"
if [[ "$GOOS" == "windows" ]]; then
binary_name="${binary_name}.exe"
fi

target_dir="dist/agentation-router-${GOOS}-${GOARCH}"
target_dir="dist/agentation-${GOOS}-${GOARCH}"
mkdir -p "$target_dir"

go build -trimpath -ldflags="-s -w" -o "$target_dir/$binary_name" ./router/cmd/agentation-router
go build -trimpath -ldflags="-s -w" -o "$target_dir/$binary_name" ./cli/cmd/agentation

cp router/README.md "$target_dir/README.md"
cp cli/README.md "$target_dir/README.md"
cp LICENSE "$target_dir/LICENSE"

- name: Archive build
Expand All @@ -80,7 +80,7 @@ jobs:
ARCHIVE_EXT: ${{ matrix.archive_ext }}
run: |
set -euo pipefail
base="agentation-router-${GOOS}-${GOARCH}"
base="agentation-${GOOS}-${GOARCH}"
pushd dist >/dev/null

if [[ "$ARCHIVE_EXT" == "zip" ]]; then
Expand All @@ -94,10 +94,10 @@ jobs:
- name: Upload archive artifact
uses: actions/upload-artifact@v4
with:
name: router-${{ matrix.goos }}-${{ matrix.goarch }}
name: cli-${{ matrix.goos }}-${{ matrix.goarch }}
path: |
dist/agentation-router-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
dist/agentation-router-${{ matrix.goos }}-${{ matrix.goarch }}.zip
dist/agentation-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
dist/agentation-${{ matrix.goos }}-${{ matrix.goarch }}.zip
if-no-files-found: ignore

publish:
Expand All @@ -108,22 +108,22 @@ jobs:
uses: actions/download-artifact@v4
with:
path: dist
pattern: router-*
pattern: cli-*
merge-multiple: true

- name: Generate checksums
shell: bash
run: |
set -euo pipefail
cd dist
sha256sum agentation-router-* > checksums.txt
sha256sum agentation-* > checksums.txt

- name: Publish release assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
files: |
dist/agentation-router-*.tar.gz
dist/agentation-router-*.zip
dist/agentation-*.tar.gz
dist/agentation-*.zip
dist/checksums.txt
generate_release_notes: true
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: router/go.mod
go-version-file: cli/go.mod

- name: Router tests
working-directory: router
- name: CLI tests
working-directory: cli
run: go test ./...

- name: Router cross-build smoke
working-directory: router
- name: CLI cross-build smoke
working-directory: cli
env:
CGO_ENABLED: "0"
run: |
set -euo pipefail
for goos in linux darwin windows; do
for goarch in amd64 arm64; do
output="../tmp/router-ci/agentation-router-${goos}-${goarch}"
output="../tmp/cli-ci/agentation-${goos}-${goarch}"
if [[ "$goos" == "windows" ]]; then
output="${output}.exe"
fi
GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" ./cmd/agentation-router
GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" ./cmd/agentation
done
done

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
- Deep select for piercing overlays
- Alt hold-to-select mode with a crosshair cursor
- Review queue for resolved annotations
- MCP support for surfacing human thread replies
- Local CLI/server support for surfacing human thread replies
- Storybook plus expanded automated test coverage
- Neovim integration ([`nvim/README.md`](nvim/README.md)) and a local router daemon ([`router/README.md`](router/README.md)) for multi-project Neovim routing
- Neovim integration ([`nvim/README.md`](nvim/README.md)) and a local router daemon managed by the Go CLI for multi-project Neovim routing

---

Expand Down Expand Up @@ -80,7 +80,7 @@ pnpm build
pnpm test
```

Router binaries are published via GitHub Actions on tags matching `router-v*`.
CLI binaries are published via GitHub Actions on tags matching `cli-v*`.

## License

Expand Down
105 changes: 105 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# agentation

Go-based CLI companion for the Agentation HTTP server.

## Build

```bash
cd cli
go build ./cmd/agentation
```

Or with just from this directory:

```bash
cd cli
just build
```

## Usage

```bash
agentation <command>
```

Commands:

- `sessions [--base-url <url>]`
- `session [--base-url <url>] <session-id>`
- `pending [--base-url <url>] [--session <id>]`
- `ack [--base-url <url>] <annotation-id>`
- `resolve [--base-url <url>] <annotation-id> [--summary "..."]`
- `dismiss [--base-url <url>] <annotation-id> --reason "..."`
- `reply [--base-url <url>] <annotation-id> --message "..."`
- `watch [--base-url <url>] [--session <id>] [--batch-window 10] [--timeout 120]`
- `start [--server-addr host:port|0] [--router-addr host:port|0] [--foreground|--background]`
- `stop`
- `status`

Add `--json` to API/data commands for machine-readable output.

You can set a default API endpoint with:

```bash
AGENTATION_BASE_URL=http://127.0.0.1:4747 agentation pending --json
```

## Lifecycle management

```bash
# Start both services (default)
agentation start

# Start with explicit addresses
agentation start --server-addr 127.0.0.1:4747 --router-addr 127.0.0.1:8787

# Disable one service by setting address to 0
AGENTATION_SERVER_ADDR=0 agentation start
AGENTATION_ROUTER_ADDR=0 agentation start

agentation status
agentation stop
```

Notes:

- `start` runs as a **single PID** that manages both server and router.
- By default, both services start.
- Set `AGENTATION_SERVER_ADDR=0` to disable server, or `AGENTATION_ROUTER_ADDR=0` to disable router.
- `--server-addr` / `--router-addr` override environment values.
- `--foreground` runs in current shell; `--background` daemonizes.

## Environment variables

- `AGENTATION_BASE_URL` (default base URL for API commands: `http://localhost:4747`)
- `AGENTATION_STORE` (`sqlite` by default, set to `memory` for in-memory mode)
- `AGENTATION_DB_PATH` (explicit SQLite DB path override)
- `XDG_DATA_HOME` (used for default SQLite location when `AGENTATION_DB_PATH` is unset)
- `AGENTATION_SERVER_ADDR` (default server address for `agentation start`; use `0` to disable)
- `AGENTATION_ROUTER_ADDR` (default router address for `agentation start`; use `0` to disable)
- `AGENTATION_PID_FILE` (override single PID file for stack lifecycle)
- `AGENTATION_LOG_FILE` (override stack supervisor log file for background mode)
- `AGENTATION_SERVER_LOG_FILE` (override server log file)
- `AGENTATION_ROUTER_LOG_FILE` (override router log file)
- `AGENTATION_ROUTER_ADDRESS` (legacy fallback router address if `AGENTATION_ROUTER_ADDR` is unset)
- `AGENTATION_ROUTER_TOKEN` (optional auth token for mutating router endpoints)
- `AGENTATION_ROUTER_BODY_LIMIT` (max router request body size)
- `AGENTATION_ROUTER_FORWARD_TIMEOUT` (router forward timeout)
- `AGENTATION_ROUTER_READ_TIMEOUT` / `AGENTATION_ROUTER_WRITE_TIMEOUT`
- `AGENTATION_ROUTER_READ_HEADER_TIMEOUT` / `AGENTATION_ROUTER_IDLE_TIMEOUT`
- `AGENTATION_ROUTER_SESSION_STALE_AFTER`
- `AGENTATION_ROUTER_ALLOW_ABSOLUTE_PATHS`
- `AGENTATION_ROUTER_ENFORCE_ROOT_BOUNDS`

## SQLite storage location

By default, data is stored in SQLite at:

- `$XDG_DATA_HOME/agentation/store.db` (if `XDG_DATA_HOME` is set)
- otherwise `~/.local/share/agentation/store.db`

You can override the DB file completely with:

```bash
AGENTATION_DB_PATH=/absolute/path/store.db agentation start --foreground
```
Loading
Loading