CLI & AGENTS / UPDATED 3 DECEMBER 2026
The hyp command.
Fast file search for the terminal and for AI agents. Find files by name in under a millisecond, get compact JSON back, and search contents with hyp grep.
hyp is a small client on macOS and Omarchy OS (Linux, Btrfs). A local background index service keeps your home folder indexed and up to date; hyp sends it one JSON line over a Unix socket and prints the reply.
Start
hyp invoice # search names; the first run starts the index service
hyp doctor # check the setup at any time
hyp status # root, coverage, entry count, memory
The engine behind it: 50 results in 0.48 ms at p95 for one file-filtered query, in a test index of 6,508,588 files on an Apple M2 Max. Read the method.
On Omarchy OS: hyp --agent answers in 0.49 ms (p50) for a rare name in a 505,550-entry test corpus. plocate took 1.14 ms. Read the Omarchy OS method.
How a search works
- Every word must appear in the file name. Case does not matter. Order does not matter.
- A word with a
/also matches parent folder names:hyp src/mainfinds.../src/.../main.rs. - A trailing argument that is an existing folder becomes the scope:
hyp report ~/Documents. - Dotfiles and dot folders are hidden by default. Add
-Hto include them. A scope inside a dot folder includes them automatically. - Results are capped at 50 by default. Use
-l Nfor more (max 2000) and--offset Nto page.
Commands
| # | Command | What it does |
|---|---|---|
| 1 | hyp [FLAGS] <WORDS...> [DIR] | Search file and folder names. |
| 2 | hyp grep [FLAGS] <PATTERN> [DIR] | Search file contents. hyp g is the same. |
| 3 | hyp recent [--since 5m] [DIR] | Files changed or deleted recently. Default: the last 5 minutes. |
| 4 | hyp sizes [DIR...] | Total size, file count and folder count of each folder. Default: the current folder. |
| 5 | hyp status | Service pid, root, coverage, entry count and memory. hyp info is the same. |
| 6 | hyp doctor | Checks the socket, the published endpoint, the service binary and the live index. Never starts anything. Exits 1 when hyp cannot work. |
| 7 | hyp root [list|add DIR|rm DIR] | List, add or remove indexed roots. |
Flags
Filters
| # | Flag | Meaning |
|---|---|---|
| 1 | -e, --ext EXT | Extension. Repeat for several: -e rs -e toml. A leading dot is fine. |
| 2 | -t, --type f|d|l | Files, folders or symlinks only. |
| 3 | -g, --glob GLOB | File name glob, for example '*.config.*'. Repeatable. |
| 4 | --not-glob GLOB | Exclude a file name glob. |
| 5 | --name-is NAME | Exact file name, case-folded. |
| 6 | -E, --exclude WORD | Exclude results with WORD in any path component or the name. |
| 7 | --not-word WORD | Exclude results with WORD in the name only. |
| 8 | -p, --words-in-path | Let all words match parent folders too. |
| 9 | --prefix TEXT, --suffix TEXT | Name starts or ends with TEXT. |
| 10 | --size-min SIZE, --size-max SIZE | Size bounds: 512, 10k, 5m, 1g. Binary units; kb, mb, gb are decimal. |
| 11 | --since T | Modified within T: 60s, 10m, 2h, 7d, 1w. |
| 12 | -H, --hidden | Include dotfiles and dot folders. |
Scope and paging
| # | Flag | Meaning |
|---|---|---|
| 1 | -c, --cwd | Search only under the current folder. |
| 2 | -d, --dir DIR | Search only under DIR. |
| 3 | -l, -n, --limit N | Maximum results. Default 50, max 2000. -l20 works too. |
| 4 | --offset N | Skip N results. The JSON reply gives the next offset. |
| 5 | --recent | Same as hyp recent. |
Output
| # | Flag | Meaning |
|---|---|---|
| 1 | (none) | One absolute path per line. |
| 2 | -L, --long | Kind (f, d, l), size, age, path. |
| 3 | --dmenu | Plain paths for pickers such as fzf and Neovim. |
| 4 | -0, --print0 | NUL-separated paths, for xargs -0. |
| 5 | -j, --json | Full JSON with size, age and mtime per hit. |
| 6 | -a, --agent | Compact JSON for agents. See agent mode. |
| 7 | --include-artifacts | In agent mode, keep target, dist, .venv and __pycache__. |
| 8 | --no-wait | Do not wait for the first index build after the service starts. |
Recipes
hyp -e pdf tax 2024 # PDFs with 'tax' and '2024' in the name
hyp -c -e rs -e toml config # .rs and .toml files under the current folder
hyp -t d node_modules -l 200 -L # node_modules folders, with size and age
hyp --size-min 1g -t f -L # files of 1 GiB or more
hyp --since 1h -e md -d ~/notes # Markdown edited in the last hour
hyp recent --since 10m -c # what changed here in the last 10 minutes
hyp sizes ~/Downloads ~/Movies # folder totals
hyp -0 -e log --since 7d | xargs -0 ls -lh
Pipe --dmenu output into a picker. Two shell functions:
cdh() { cd "$(hyp --dmenu -t d "$@" | fzf)"; } # jump to a folder
vh() { nvim "$(hyp --dmenu "$@" | fzf)"; } # edit a file
Content search: hyp grep
The index first picks candidate files by name, extension, size, age and folder. Only those files are opened.
Binary files, cloud-only placeholders (iCloud, OneDrive) and files over 4 MiB are skipped unless you ask for them. Dotfiles and build folders are skipped by default.
- The pattern is literal text by default.
-Emakes it a regex.-wmatches a whole word or identifier. - Case is smart by default: a lowercase pattern ignores case, a pattern with an uppercase letter does not.
- Results are capped at 50 files and 10 matches per file. A note on stderr tells you when results were cut.
hyp g TODO # literal text under the current folder
hyp g -e rs 'fn main' ~/proj # only .rs files under ~/proj
hyp g -E 'todo|fixme' -i # regex, ignore case
hyp g -C 2 -m 3 'panic!' # 2 lines of context, 3 matches per file
hyp g --files -0 TODO | xargs -0 nvim # open every file that matches
hyp g --count -g '*.md' draft # match count per file
| # | Flag | Meaning |
|---|---|---|
| 1 | -F, -E, -w (--sym) | Literal (default), regex, or whole word. |
| 2 | -P, --pattern PAT | Extra literal pattern; any may match. Repeatable, up to 16. |
| 3 | -S, -i, -s | Smart case (default), ignore case, match case. |
| 4 | -e, -g, --not-glob, --name-is, --exclude WORD | The same file filters as a name search. |
| 5 | --since T, --max-filesize SIZE | Only files changed within T; skip files over SIZE (max 64m). |
| 6 | -H, --include-artifacts, --binary | Also search dotfiles, build folders, binary files. |
| 7 | -l, -n, --limit N, -m, --max-count N, --offset N | Max files (default 50), matches per file (default 10), paging. |
| 8 | -C, --context N, --max-columns N | Context lines (0 to 10); clip lines to N characters. |
| 9 | --files, --count, -0 | Paths only, path:count, or NUL-separated paths. |
| 10 | -j, -a, --token-budget N | Full JSON; compact agent JSON; agent reply cap in tokens. |
Agent mode: JSON file search with hyp -a
-a prints one compact JSON object, built to spend as few tokens as possible without losing information.
$ hyp -a -c parser
{"b":"/Users/me/proj/src","us":212,"h":["parser.rs\t18K\t2h","parser/\t\t2h","parser/tests.rs\t6.1K\t3d"]}
- Paths are relative to
b, the deepest folder that holds every result. The full path isb + "/" + rel. - Each hit is one string:
rel<TAB>size<TAB>age. A folder ends in/and has no size. A symlink ends in@. - Sizes and ages are short:
4K,1.4M;30s,2h,3d. - Keys with default values are left out.
truncappears only when the cap cut results;covonly when coverage is not complete. - When results are truncated,
hmlists the folders with the most hits, so the agent can narrow the scope in one more call. - Build folders are skipped unless you add
--include-artifacts. Control characters in names are escaped as\xNN.
For the first 50 of 5,000 matches, hyp -a printed an estimated 637 tokens, with size, age and folder hints. plocate -l 50 printed 1,015 tokens of raw paths. Token method.
| # | Command | Keys |
|---|---|---|
| 1 | hyp -a ... | b, h, trunc, cov, us (service time in microseconds), hm, next (offset for the next page) |
| 2 | hyp recent -a | b, m (modified: rel\tsize\tage), d (deleted: rel\tage), trunc, cov, us |
| 3 | hyp sizes -a | f ([path, size, files, folders] or [path, "err", message]), b when there are several folders, cov, us |
| 4 | hyp status -a | root, entries, cov, why, be (backend) |
| 5 | hyp grep -a | b, m (total matches), us, f, hm, trunc, cov |
hyp grep -a defaults to 25 files, 3 matches per file, 160-character lines and a 1500-token reply. Matches in secret files such as .env, *.pem and id_rsa are replaced with <redacted-secret-file>.
$ hyp g -a -e rs unwrap
{"b":"/Users/me/proj/src","m":3,"us":1840,"f":[["main.rs",2,["12:let cfg = load().unwrap();","40:x.unwrap()"]],["lib.rs",1,["7:v.unwrap()"]]]}
MCP server IN DESIGN
An MCP server is in design: tools for name search, scoped search and recent changes, with strict folder limits, read-only by default. No dates yet.
Today, agents call hyp -a directly. We publish the MCP API when it is stable, not before. Times from a development build are on the benchmarks page.
Platforms
| # | Platform | How Hyperdrive runs | Live updates |
|---|---|---|---|
| 1 | macOS | The hyp command, and inside FastFinder for Mac | FSEvents |
| 2 | Omarchy OS (Linux, Btrfs) | The hyp command with a background index service | inotify |
| 3 | Windows | Inside FastFinder for Windows | Scan with change reconciliation |
The private beta list hears first about new builds.