feat: rebrand to ZeroGravity, replace proxyctl with zg Rust binary

Phase 1 - Rename:
- Crate: antigravity-proxy -> zerogravity
- Env: ANTIGRAVITY_OAUTH_TOKEN -> ZEROGRAVITY_TOKEN
- Paths: ~/.config/antigravity-proxy -> ~/.config/zerogravity
- Paths: /tmp/antigravity-* -> /tmp/zerogravity-*
- User: antigravity-ls -> zerogravity-ls
- Service: antigravity-proxy -> zerogravity

Phase 2 - zg daemon manager:
- New Rust binary src/bin/zg.rs replaces scripts/proxyctl bash
- Commands: start, stop, restart, rebuild, status, logs, test, health
- Auto-resolves project dir from binary location
- All commands exit immediately (safe for agent fast-bash)
This commit is contained in:
Nikketryhard
2026-02-18 01:54:54 -06:00
parent 409ee97405
commit 00587fcce8
18 changed files with 403 additions and 122 deletions

View File

@@ -27,41 +27,41 @@ This "LS as dumb relay" pattern keeps the LS interactions minimal and predictabl
## Agent Quick Reference
### `proxyctl` — Daemon Manager
### `zg` — Daemon Manager
`proxyctl` commands exit immediately (not foreground) — safe for agent use via fast-bash MCP.
`zg` commands exit immediately (not foreground) — safe for agent use via fast-bash MCP.
```bash
# Rebuild and restart after code changes
proxyctl restart
zg restart
# Quick test
proxyctl test "say hi in 3 words"
zg test "say hi in 3 words"
# Check status
proxyctl status
zg status
# Check health
proxyctl health
zg health
```
| Command | Description |
| --------------------- | ----------------------------------- |
| `proxyctl start` | Start the proxy daemon |
| `proxyctl stop` | Stop the proxy daemon |
| `proxyctl restart` | Rebuild + restart |
| `proxyctl rebuild` | Build release binary only |
| `proxyctl status` | Service status + quota + usage |
| `proxyctl logs [N]` | Tail last N lines + follow |
| `proxyctl logs-all` | Full log dump (no follow) |
| `proxyctl test [msg]` | Quick test request (gemini-3-flash) |
| `proxyctl health` | Health check |
| `zg start` | Start the proxy daemon |
| `zg stop` | Stop the proxy daemon |
| `zg restart` | Rebuild + restart |
| `zg rebuild` | Build release binary only |
| `zg status` | Service status + quota + usage |
| `zg logs [N]` | Tail last N lines + follow |
| `zg logs-all` | Full log dump (no follow) |
| `zg test [msg]` | Quick test request (gemini-3-flash) |
| `zg health` | Health check |
### Testing After Changes
```bash
# 1. Rebuild + restart
proxyctl restart
zg restart
# 2. Test an endpoint
curl -s http://localhost:8741/v1/chat/completions \
@@ -69,7 +69,7 @@ curl -s http://localhost:8741/v1/chat/completions \
-d '{"model": "gemini-3-flash", "messages": [{"role": "user", "content": "Say hi"}]}' | jq .
# 3. Inspect latest trace
TRACE_DIR=~/.config/antigravity-proxy/traces/$(date +%Y-%m-%d)
TRACE_DIR=~/.config/zerogravity/traces/$(date +%Y-%m-%d)
cat "$TRACE_DIR/$(ls -t "$TRACE_DIR" | head -1)/summary.md"
```
@@ -99,8 +99,8 @@ cat "$TRACE_DIR/$(ls -t "$TRACE_DIR" | head -1)/summary.md"
The proxy needs an OAuth token:
1. **Env var**: `ANTIGRAVITY_OAUTH_TOKEN=ya29.xxx`
2. **Token file**: `~/.config/antigravity-proxy-token`
1. **Env var**: `ZEROGRAVITY_TOKEN=ya29.xxx`
2. **Token file**: `~/.config/zerogravity-token`
3. **Runtime**: `curl -X POST http://localhost:8741/v1/token -d '{"token":"ya29.xxx"}'`
## CLI Flags