Skip to content

Commit 65992b1

Browse files
committed
docs: sync public docs with private repo updates
Sync API, Docker, and zg CLI references with the latest validated behavior and route surface from the private source repo. This keeps public setup docs accurate while avoiding private implementation details.\n\nRefs: PR #85 (public repo).
1 parent f01b216 commit 65992b1

3 files changed

Lines changed: 22 additions & 9 deletions

File tree

docs/api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ curl http://localhost:8741/v1beta/models/gemini-3-flash:generateContent \
6060
curl http://localhost:8741/v1/models
6161
```
6262

63-
Returns the list of available models and their aliases.
63+
Returns the list of available built-in models.
6464

6565
## Model Aliases
6666

@@ -214,7 +214,7 @@ curl http://localhost:8741/v1beta/models/gemini-3-flash:generateContent \
214214
-d '{"contents": [{"role": "user", "parts": [{"text": "hi"}]}]}'
215215
```
216216

217-
> **Note:** If `ZEROGRAVITY_API_KEY` is not set, no authentication is enforced (backward-compatible). `/health` and `/` are always public.
217+
> **Note:** If `ZEROGRAVITY_API_KEY` is not set, no authentication is enforced (backward-compatible). Public compatibility routes include `/health`, `/`, `/api/event_logging/batch`, `/.well-known/{*path}`, and `/v1/images/{*path}`.
218218
219219
## All Endpoints
220220

@@ -223,6 +223,7 @@ curl http://localhost:8741/v1beta/models/gemini-3-flash:generateContent \
223223
| `POST` | `/v1/chat/completions` | Chat Completions API (OpenAI compat) |
224224
| `POST` | `/v1/responses` | Responses API (sync + streaming) |
225225
| `POST` | `/v1/messages` | Messages API (Anthropic compat) |
226+
| `POST` | `/v1/messages/count_tokens` | Anthropic token counting endpoint |
226227
| `POST` | `/v1beta/models/{model}:{action}` | Official Gemini v1beta routes |
227228
| `GET` | `/v1/models` | List available models |
228229
| `GET/POST` | `/v1/search` | Web Search via Google grounding (WIP) |
@@ -235,3 +236,6 @@ curl http://localhost:8741/v1beta/models/gemini-3-flash:generateContent \
235236
| `GET` | `/v1/quota` | Quota and rate limits |
236237
| `GET` | `/v1/images/*` | Serve generated images |
237238
| `GET` | `/health` | Health check |
239+
| `GET/POST` | `/` | Compatibility root (returns status) |
240+
| `POST` | `/api/event_logging/batch` | Compatibility event logging endpoint |
241+
| `GET/POST` | `/.well-known/{*path}` | Compatibility well-known endpoint |

docs/docker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ The `zg docker-init` command generates a ready-to-use `docker-compose.yml`:
2222
```yaml
2323
services:
2424
zerogravity:
25-
image: ghcr.io/nikketryhard/zerogravity:latest
25+
container_name: zerogravity
26+
image: ghcr.io/nikketryhard/zerogravity:v1.3.7
2627
restart: unless-stopped
2728
ports:
2829
- "8741:8741"
2930
- "443:443"
3031
volumes:
3132
- ./accounts.json:/root/.config/zerogravity/accounts.json:ro
32-
- ./aliases.json:/root/.config/zerogravity/aliases.json:ro
33+
- ./aliases.json:/root/.config/zerogravity/aliases.json
3334
environment:
3435
- ZEROGRAVITY_API_KEY=${ZEROGRAVITY_API_KEY:-}
3536
- RUST_LOG=info
@@ -70,18 +71,17 @@ docker run -d --name zerogravity \
7071
| `ZEROGRAVITY_TOKEN` || Single OAuth access token — expires in 60min | `ya29.a0ARrdaM...` |
7172
| `ZEROGRAVITY_API_KEY` || Protect proxy from unauthorized access | `my-secret-key` |
7273
| `ZEROGRAVITY_UPSTREAM_PROXY` || Route outbound traffic through a proxy | `socks5://127.0.0.1:1080` |
73-
| `ZEROGRAVITY_LS_PATH` | Auto-detected | Path to backend binary (set automatically in Docker) | `/usr/bin/antigravity_ls` |
74+
| `ZEROGRAVITY_LS_PATH` | Auto-detected | Path to backend binary (set automatically in Docker) | `/usr/local/bin/language_server_linux_x64` |
7475
| `ZEROGRAVITY_CONFIG_DIR` | `~/.config/zerogravity` | Config directory | `/etc/zerogravity` |
7576
| `ZEROGRAVITY_DATA_DIR` | `/tmp/.agcache` | Backend data directory | `/var/lib/zerogravity` |
7677
| `ZEROGRAVITY_APP_ROOT` | Auto-detected | Antigravity app root directory | `/opt/antigravity` |
7778
| `ZEROGRAVITY_STATE_DB` | Auto-detected | Path to Antigravity's state database | `/path/to/state.vscdb` |
7879
| `ZEROGRAVITY_LS_USER` | `zerogravity-ls` | System user for process isolation (Linux) | `nobody` |
7980
| `ZEROGRAVITY_MACHINE_ID_PATH` | Auto-detected | Path to Antigravity's machine ID file | `/path/to/machineid` |
8081
| `ZEROGRAVITY_CLIENT_VERSION` | Auto-detected | Override the client version string | `1.15.8` |
81-
| `ZEROGRAVITY_MAX_RETRY_DELAY` | Internal default | Max retry delay in seconds on rate limit errors | `120` |
8282
| `ZEROGRAVITY_API_BODY_LIMIT_MB` | `32` (clamped `1..100`) | Max request body size in MiB for API routes (`/v1/*`) | `64` |
8383
| `SSL_CERT_FILE` | System default | Custom CA certificate bundle path | `/etc/ssl/certs/ca.pem` |
84-
| `RUST_LOG` | `info` | Log level | `debug` |
84+
| `RUST_LOG` | `warn` (runtime default) / `info` (`zg docker-init` template) | Log level | `debug` |
8585

8686
### Customization
8787

docs/zg.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ These work on any OS without a running proxy.
2424
| `zg accounts remove <email>` | Remove stored account |
2525
| `zg token` | Show OAuth tokens (access + refresh) from Antigravity |
2626
| `zg docker-init` | Generate docker-compose.yml + accounts.json template |
27+
| `zg rebuild` | Rebuild host binary + Docker image and restart daemon |
2728
| `zg update` | Download latest zg binary from GitHub |
2829

2930
### Model Aliases
@@ -38,15 +39,16 @@ Aliases are stored in `aliases.json` in the config directory. Restart the daemon
3839

3940
## Daemon Commands
4041

41-
These require a running proxy (Linux / Docker).
42+
Most of these require a running proxy (Linux / Docker). `zg status` can run
43+
without a live proxy and reports reachability/status details.
4244

4345
| Command | Description |
4446
| ------------------ | -------------------------------------------------- |
4547
| `zg start` | Start the proxy daemon |
4648
| `zg stop` | Stop the proxy daemon |
4749
| `zg restart` | Stop + start (no build/download) |
4850
| `zg status` | Version, endpoints, quota, usage, and update check |
49-
| `zg test [msg]` | Quick test request (gemini-3-flash) |
51+
| `zg test [msg]` | Quick test request (gemini-3.1-pro) |
5052
| `zg health` | Health check |
5153
| `zg smoke` | Run comprehensive smoke tests (all endpoints) |
5254
| `zg smoke --quick` | Quick smoke test (skip streaming/tools) |
@@ -75,3 +77,10 @@ These require a running proxy (Linux / Docker).
7577
| `zg report` | Generate bounded diagnostic snapshot for bug reports |
7678
| `zg report <id>` | Bundle a specific trace into a shareable `.tar.gz` |
7779
| `zg replay <file>` | Re-send a bundled trace to the local proxy |
80+
81+
## Environment Overrides
82+
83+
| Variable | Scope | Description |
84+
| ------------------ | ----- | ----------- |
85+
| `PROXY_PORT` | CLI | Overrides the target `http://localhost:<port>` used by HTTP-based CLI commands (`zg status`, `zg test`, `zg health`, `zg smoke`, etc.). |
86+
| `ZEROGRAVITY_SRC` | Dev CLI | Overrides source directory discovery for `zg rebuild` in source-based workflows. |

0 commit comments

Comments
 (0)