Skip to main content

CLI utilit to find info in file system

Project description

FastKB

A minimalist CLI tool for indexing and searching local text files using SQLite FTS5. Fast, offline, and zero-dependency.

Features

  • Fast Indexing: Recursively scans directories and files.
  • Full-Text Search: Instant ranked search (BM25) via SQLite FTS5.
  • Auto-Sync: SQL triggers keep the search index updated automatically.
  • In-Memory Mode: Run entirely in RAM for zero-disk-footprint operations.

Installation

Core (CLI + FTS5 search):

pip install fastkb

With AI/MCP support:

pip install "fastkb[mcp]"

Quick Start

1. Initialize

Create the database and search triggers:

fastkb init

2. Index

Scan folders or specific files:

fastkb index ./docs ./notes.txt

3. Search

Search for content (returns top 5 results by default):

fastkb query "your search term"

Advanced Usage

In-Memory Mode

Use --memory (-m) to run the database entirely in RAM. Ideal for CI/CD pipelines, automated tests, or temporary scans that shouldn't leave files on disk.

fastkb --memory index ./src
fastkb --memory query "timeout error"

Note: The in-memory database is transient and clears when the process exits. Best used for single-session workflows or scripted runs.

CLI Reference

Commands

Command Arguments Description
init - Initialize database and FTS index
index paths [paths ...] Index directories or files recursively
query text Search the indexed knowledge base

Global & Query Options

Flag Scope Default Description
-m, --memory Global false Use in-memory database (non-persistent)
-l, --limit query 5 Maximum number of search results to return

AI Integration

FastKB supports the Model Context Protocol (MCP) for seamless integration with Claude Desktop, Cursor, Cline, Continue, and other AI assistants.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastkb-0.2.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastkb-0.2.5-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file fastkb-0.2.5.tar.gz.

File metadata

  • Download URL: fastkb-0.2.5.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastkb-0.2.5.tar.gz
Algorithm Hash digest
SHA256 049b7025f9dcae1fa820420305b0a95f4af404cbce3a345cb2531c00c11b40d7
MD5 0f0f4639a88a8056ffbdb931cf02b812
BLAKE2b-256 35f16f9b47faa8dd62006b6ccea5b6b5783ef5ae59a97a4577ddcccdfe7ebc57

See more details on using hashes here.

File details

Details for the file fastkb-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: fastkb-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastkb-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9fa9ef3791c8595d920700e82f69ea65a509b895496c6220f2c90bb6f90e75
MD5 8850318e1a446a8257427cc0c9eed16b
BLAKE2b-256 53e02d0a0ad09ccd403725068891d7607ef6e8946f66d37d267f3270184b0c3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page