View Source Fnord
Fnord is a command line tool the builds a searchable database of your files, using AI-generated embeddings to index and search your code base, notes, and other (non-binary) files.
Installation
Install
elixir
if necessary:# MacOS brew install elixir # Debian-based sudo apt-get install elixir
Add the mix escript path to your shell's PATH:
echo 'export PATH="$HOME/.mix/escripts:$PATH"' >> ~/.bashrc source ~/.bashrc
Install the script:
mix escript.install github sysread/fnord
Use the same command to reinstall. It will offer to overwrite the existing installation.
Usage
Indexing
The first time you run this, especially on a large codebase, it will take a while to index everything. Subsequent runs will be faster, re-indexing only those files which have changed since they were last indexed.
fnord index --project foo --dir /path/to/foo
You can reindex the project, forcing it to reindex all files:
fnord index --project foo --dir /path/to/foo --reindex
You can also watch the project for changes and reindex them as they happen:
fnord watch --project foo --dir /path/to/foo
Searching
fnord search --project foo --query "some search query"
If you want more detail about each file matched:
fnord search --project foo --query "some search query" --detail
Chat (BETA)
Warning: this is a brand new feature and likely has quite a few UI bugs. Use with ~caution~ ~a grain of salt~ ~a sense of adventure~ a large helping of grace for my mediocre UI/UX skills.
You can use fnord
's basic chat interface to assimilate information from the
project using AI to perform the search and summarize the results.
fnord chat --project foo
Miscellaneous
- List projects:
fnord projects
- List files in a project:
fnord files --project foo
- Show the AI-generated summary of a file:
fnord summary --project foo --file bar
- Delete a project:
fnord delete --project foo
Note that deleting a project only deletes from the index, not the actual files.
TODO
- index multiple directories per project
- chat input is single line; should be multi-line
- render assistant markdown response