0326GitHub
blink
Navigates file and directory names with Jev-guided walkers to find codebase paths for a natural-language query.
ellipsis-dev/blinkREADME ↗
# blink
Search a codebase with [Jev](https://docs.typesafe.ai/concepts/system-one) using an ensemble of walkers that walk the file system to find a file.
Pass a natural-language query and a directory. Use `-r` to search recursively and `-n` to explore using multiple walkers.
```sh
./blink "query" "directory" [--recursive] [--n_walkers 100]
```
### Set up
Requires Bun 1.3.14+.
```sh
bun install
export TYPESAFE_API_KEY="your-key"
```
## Examples
Imagine you have a file tree like this:
```text
test/example_codebase/
├── src/
│ ├── services/
│ │ ├── auth/
│ │ │ ├── login.ts
│ │ │ └── session.ts
│ │ └── billing/
│ │ └── invoices.ts
│ └── ui/
│ └── button.ts
└── docs/
└── setup.md
```
and you want to find where the authenticate code is handled. You might do:
```sh
./blink "where is authentication handled?" test/example_codebase --n_walkers 100 --recursive
```
and your results would look like
```text
┌──────────────────────────────┬────────┐
│ Node │ % │
├──────────────────────────────┼────────┤
│ src/services/auth/login.ts │ 74.0% │
├──────────────────────────────┼────────┤
│ src/services/auth/session.ts │ 16.0% │
├──────────────────────────────┼────────┤
│ src/ui/button.ts │ 10.0% │
└──────────────────────────────┴────────┘
```
Similarily,
```sh
./blink "where are invoices generated?" test/example_codebase --n_walkers 100 --recursive
```
returns
```text
┌──────────────────────────────────┬────────┐
│ Node │ % │
├──────────────────────────────────┼────────┤
│ src/services/billing/invoices.ts │ 82.0% │
├──────────────────────────────────┼────────┤
│ src/ui/button.ts │ 11.0% │
├──────────────────────────────────┼────────┤
│ d