Traverse context without ingesting it.
Traverse context without ingesting it.
I published my surf tool. Source is at https://github.com/saintx/surf-cli
How it works
Instead of reading a markdown file into context, use surf to list its H1-H6 heading structure:
1
2
3
4
5
6
7
8
9
10
% surf README.md
- surf
- When to use
- Addressing
- Agent skill
- Install
- Nix
- Releasing
- Development
- Tests
Then, read only the part you’re interested in:
1
2
3
4
5
6
7
% surf README.md "When to use"
## When to use
Invoke when skimming markdown, TeX, or PDF files, checking what a file contains,
listing structure, extracting a named address, or batch-scanning metadata across
a directory. See `surf --help` for CLI flags. Skip when the full body is already
needed. ...
This post is licensed under CC BY 4.0 by the author.