smeltery / glimpseDocumentation

The Glimpse documentation

Find your next step.

9 matching guides

Use Tab to choose a guide. Escape to close.

A little perspective goes a long way

What’s next?

Explore GlimpseFind a clearer view of your changes.
Browse by taskStart with an outcome
Compare changesReview with an agentUse the local APIContribute

Not sure where to begin?

A changed file is a good start.

Open your first diff
Documentation pages

Developer documentation

Tree and files

List project files and read their content.

Start glimpse tree before using the file browser API. Discover its port with glimpse list; diff and tree sessions may use different ports.

List files

GET /api/tree returns HTTP 200 with repo and a files array of paths. Outside tree mode it returns {"files":[]}.

sh
curl --fail http://localhost:5391/api/tree

Read a file

GET /api/file?path=… returns HTTP 200 with path and content strings. URL-encode the relative repository path:

sh
curl --fail --get http://localhost:5391/api/file \
  --data-urlencode 'path=main.go'

Missing paths or a non-tree server return 400. Unreadable files return 404. The current handler reads paths directly from the working tree without a path containment check. Only request trusted paths and do not expose the server to untrusted callers. These read handlers currently do not enforce HTTP methods.

Edit on GitHub
Open in chat

Opens with this page’s documentation in the prompt.