Developer documentation
Changes in.
Perspective out.
Connect scripts and agents to the local viewer.
Local, unauthenticated, and part of your running viewer. Use the port reported by Glimpse for your repository.
The local HTTP API powers the browser viewer. Use it to inspect a captured diff,
read files in tree mode, and manage inline comments from scripts or agents.
Start Glimpse first and use glimpse list --json to discover the correct port.
Base URL
text
http://localhost:5391This is an unauthenticated local API, not a hosted service. The current server binds all interfaces and allows cross-origin requests. Keep it on a trusted machine/network. Routes and error behavior below describe the current implementation. Errors are plain text; successful responses are JSON. There is no API version prefix.
Review data
| Method | Path | Purpose |
|---|---|---|
| GET | /api/diff |
Read a captured diff |
| GET | /api/tree |
List tree files |
| GET | /api/file?path=… |
Read a tree file |
Comments
| Method | Path | Purpose |
|---|---|---|
| GET | /api/comments |
List comments |
| POST | /api/comments |
Create a comment |
| PATCH | /api/comments/{id} |
Resolve a comment |
| DELETE | /api/comments/{id} |
Delete a comment |
GitHub
| Method | Path | Purpose |
|---|---|---|
| POST | /api/gh/pull |
Import PR comments |
| POST | /api/gh/push |
Publish PR comments |
flowchart LR A[Browser or script] --> B[Local HTTP server] B --> C[Captured Git diff] B --> D[JSON comment store] B --> E[GitHub CLI] E --> F[GitHub PR]