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.4.tar.gz (4.9 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.4-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastkb-0.2.4.tar.gz
  • Upload date:
  • Size: 4.9 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.4.tar.gz
Algorithm Hash digest
SHA256 3638d012baaa12aa584a90446947a260149d3824536f17e9cdd04975585ec1f1
MD5 8457581d5e7a7c9339c7263fcdc7f5b4
BLAKE2b-256 9a541eaffafc88aaa06c612ac6db0efa67d1e335353aaa4670c06f7f19c1d3f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastkb-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 56ef3a5155148eb72fd299805df8c41af58c267fca45d14263494cfe1af84dd2
MD5 f5338279dd43ac9d04d027be481af578
BLAKE2b-256 db2e1ec7b11dc3fcdcc04ca42848bdd5960de008f6379b50f590a77ddafa8c8b

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