Skip to content

File and directory instant index and search on filename and content.

Notifications You must be signed in to change notification settings

zeroshotlabs/jitjot

Repository files navigation

jitjot

A fast file indexer with full-text search. Single static executable, no installation required.

Features

  • Full-text search for .txt and .md files using SQLite FTS5
  • Filename search for all file types
  • Metadata tracking (path, size, timestamps) for all indexed files
  • Cross-platform: macOS (ARM/Intel), Windows (ARM/Intel), Linux
  • Single static binary - no dependencies, no installation
  • Local database stored in ~/.jitjot/index.db

Usage

# Index a directory
./jitjot .                      # Current directory
./jitjot ~/projects             # Specific directory

# Search (any args that aren't a directory become search query)
./jitjot rust tutorial          # Search for "rust" OR "tutorial"
./jitjot "config file"          # Search phrase

# Stats
./jitjot --stats                # Show index statistics

# Help
./jitjot --help

Output Format

Search results show:

  1. Filename matches first (files where the query matches the filename)
  2. Content matches (files where the query matches content inside .txt/.md files)

Each result shows: path, size, last modified date, and a snippet with highlighted matches for content results.

Building

Prerequisites

  • Rust 1.70+ with Cargo

Build for Current Platform

cargo build --release
# Binary at: target/release/jitjot (or jitjot.exe on Windows)

Cross-Platform Builds

Install cross-compilation targets:

# macOS targets
rustup target add x86_64-apple-darwin      # Intel Mac
rustup target add aarch64-apple-darwin     # Apple Silicon

# Windows targets  
rustup target add x86_64-pc-windows-gnu    # 64-bit Windows
rustup target add aarch64-pc-windows-msvc  # ARM64 Windows

# Linux targets
rustup target add x86_64-unknown-linux-musl    # Intel Linux (static)
rustup target add aarch64-unknown-linux-musl   # ARM64 Linux (static)

Build for specific targets:

# macOS Intel
cargo build --release --target x86_64-apple-darwin

# macOS Apple Silicon
cargo build --release --target aarch64-apple-darwin

# Windows 64-bit (from Linux/Mac, requires mingw-w64)
cargo build --release --target x86_64-pc-windows-gnu

# Linux static binary (musl)
cargo build --release --target x86_64-unknown-linux-musl

For Windows builds from non-Windows systems, you'll need the appropriate toolchain:

  • mingw-w64 for GNU targets
  • Or use cross (cargo install cross) for easier cross-compilation

Using cross (Recommended for Cross-Compilation)

cargo install cross

cross build --release --target x86_64-pc-windows-gnu
cross build --release --target x86_64-unknown-linux-musl
cross build --release --target aarch64-unknown-linux-musl

Data Storage

  • Database: ~/.jitjot/index.db (SQLite with FTS5)
  • First run: Automatically creates ~/.jitjot/ directory

Technical Details

  • Uses SQLite FTS5 for full-text search (statically linked)
  • rusqlite with bundled feature compiles SQLite into the binary
  • Hidden files/directories (starting with .) are automatically skipped
  • Files larger than 10MB are not content-indexed
  • Re-indexing a directory updates existing entries (upsert behavior)

License

MIT

About

File and directory instant index and search on filename and content.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages