# glimpse-changes
A CLI tool that renders Markdown with inline diffs into a native [Glimpse](https://glimpse.app) window, using a Critique-like theme.
<img width="2742" height="2356" alt="Screenshot 2026-03-19 at 8 23 28 PM" src="https://github.com/user-attachments/assets/339a78c5-983c-4a96-ac5e-10f55b632330" />
## What it does
- Parses Markdown and renders it as a styled HTML page
- Renders `changes` blocks by resolving old/new file contents from git and the working tree
- Renders fenced `diff` blocks with [`@pierre/diffs`](https://esm.sh/@pierre/diffs) for inline examples
- Opens the result in a native Glimpse window via the `glimpseui` package
## Installation
```bash
npx skills add tanishqkancharla/glimpse-changes
```
The installed skill invokes the published npm CLI with `npx glimpse-changes@1.9.5`, so the skill does not vendor a generated binary.
## Default change-doc format
When using Glimpse Changes for a review or walkthrough, write a short Markdown document that walks another developer through the code in the clearest order. Do not feel bound to file order or raw diff order.
A useful walkthrough usually has:
1. A specific title
2. A brief summary
3. Focused sections ordered by the user flow or developer flow
4. Prose between `changes` or `diff` blocks explaining intent, tradeoffs, and review risks
Prefer smaller focused blocks over one large diff dump. Use line ranges when they help the reader land on the relevant part of the change.
````markdown
# <Title>
## Summary
- <User-visible or developer-visible effect>
- <Main code path changed>
- <Important review note, risk, or edge case>
## <First thing a reviewer should understand>
Explain the intent and what to look for.
```changes
path/to/relevant-file.ts:20-70
```
## <Next part of the flow>
Explain how this connects to the previous step.
```changes
path/to/another-file.ts:80-130
```
````
Example:
````bash
cat <<'EOF' | npx glimpse-changes -
# Improve review flow messaging
## Summary
- make the default review flow easier for agents to follow
- document when to wait for the user versus using background mode
## Open the review and wait for the user
To make review sessions easier to follow, tell agents to open Glimpse, ask the
user to inspect it, and wait until the user says they are done.
\`\`\`changes
packages/glimpse-changes/skills/glimpse-changes/SKILL.md:120-145
\`\`\`
EOF
````
## Usage
````bash
# Pipe from a file
cat /tmp/session-diff-report.md | npx glimpse-changes@1.9.5
# Force stdin with '-'
cat /tmp/session-diff-report.md | npx glimpse-changes@1.9.5 -
# Heredoc for content with changes blocks
cat <<'EOF' | npx glimpse-changes@1.9.5 -
# My Report
\`\`\`changes
src/auth.ts
\`\`\`
EOF
# Inline Markdown argument for simple content
npx glimpse-changes@1.9.5 "# My Report\n\nSome content"
````
### Changes blocks
Use `changes` fenced code blocks to render git-backed diffs for real files. List file paths relative to the working directory and the renderer resolves old/new contents from git automatically:
````markdown
## Changes to auth module
```changes
src/auth.ts
src/session.ts
```
````
You can also focus a block on a line range:
````markdown
```changes
src/auth.ts:40-90
```
````
### Fenced diff blocks
For ad-hoc illustrations not tied to real files, use fenced code blocks with
language `diff`:
````markdown
```diff
- old line
+ new line
```
````
For added-file snippets, you can also start the block with `+++ path/to/file.ext` and keep each added line prefixed with `+`. Glimpse Changes will synthesize a proper new-file diff so the file path and syntax highlighting are preserved.
## Assets
| File | Purpose |
|------|---------|
| `assets/critique-base.css` | Base Critique-style CSS |
| `assets/critique-markdown.css` | Markdown layout and diff shell styling |
## Requirements
- [Bun](https://bun.sh) runtime
- [Glimpse](https://glimpse.app) installed