algiras/rusty-pageindex

No description

5 stars1 forksUpdated Jan 24, 2026
npx skills add algiras/rusty-pageindex

README

๐Ÿฆ€ RustyPageIndex

Rusty Page Indexer Cover

RustyPageIndex is a high-performance Rust implementation of the PageIndex pattern. It transforms complex documents into hierarchical "Table-of-Contents" (TOC) trees for vectorless, reasoning-based RAG.

This project is inspired by VectifyAI/PageIndex but has diverged significantly with multi-repo support, parallel processing, and a unified tree architecture.

๐Ÿš€ Key Features

Performance

  • Parallel Indexing: Uses Rayon for parallel file parsing (238 files in ~0.04s)
  • Rust-Native Parsing: pdf-extract and pulldown-cmark for fast document processing
  • Incremental Updates: Hash-based caching skips unchanged files

Multi-Repository Support

  • Index multiple repos: Each indexed folder is tracked separately
  • Query across all: Search spans all indexed repositories by default
  • Manage indices: List, filter, and clean up indices easily

Unified Tree Architecture

  • Folder โ†’ File โ†’ Section hierarchy preserves document structure
  • Single tree per repo: Efficient storage and navigation
  • Smart search: Auto-unwraps folder roots for better LLM context

๐Ÿ”„ Divergence from Original PageIndex

FeatureOriginal PageIndexRustyPageIndex
LanguagePythonRust
IndexingPer-file indicesUnified folder tree
Multi-repoNot supportedFull support with list/clean
ParallelismSequentialRayon parallel processing
StorageCloud-based (MCP)Local filesystem
Tree StructureFlat sectionsFolder โ†’ File โ†’ Section hierarchy
Headerless MarkdownEmpty treeAuto-creates "Document" node

๐Ÿ› ๏ธ Getting Started

Installation

One-liner Install (Unix/macOS):

curl -fsSL https://raw.githubusercontent.com/Algiras/rusty-pageindex/main/install.sh | bash

One-liner Install (Windows PowerShell):

irm https://raw.githubusercontent.com/Algiras/rusty-pageindex/main/install.ps1 | iex

Via Cargo:

cargo install rusty-page-indexer

๐Ÿง™ Use as an Agent Skill

npx skills add https://github.com/Algiras/rusty-pageindex --skill rusty-page-indexer

๐Ÿ”‘ Authentication

# For OpenAI
rusty-page-indexer auth --api-key "your-key-here"

# For Ollama (local LLM)
rusty-page-indexer auth --api-key "ollama" --api-base "http://localhost:11434/v1" --model "llama3.2"

๐ŸŒฒ Usage

Indexing Documents

# Index a repository
rusty-page-indexer index ./my-project

# Index with LLM-generated summaries
rusty-page-indexer index ./my-project --enrich

# Force re-index (ignores cache)
rusty-page-indexer index ./my-project --force

# Preview what would be indexed
rusty-page-indexer index ./my-project --dry-run

Managing Multiple Repositories

# Index multiple repos
rusty-page-indexer index ./repo-a
rusty-page-indexer index ./repo-b

# List all indexed repositories
rusty-page-indexer list

# Example output:
# ๐Ÿ“‹ Indexed Repositories
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
#   ๐Ÿ“ repo-a (125.3 KB)
#      /Users/you/projects/repo-a
#   ๐Ÿ“ repo-b (89.7 KB)
#      /Users/you/projects/repo-b
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Total: 2 indices

Querying

# Search across ALL indexed repositories
rusty-page-indexer query "how does authentication work"

# Search within a specific repository
rusty-page-indexer query "kafka messaging" --path repo-a

Cleanup

# Remove a specific index
rusty-page-indexer clean repo-a

# Remove all indices
rusty-page-indexer clean --all

Status Information

rusty-page-indexer info

๐Ÿค– Model Compatibility

OpenAI Models (Remote)

ModelCostSpeedNotes
gpt-4o$$$FastBest accuracy, recommended for complex queries
gpt-4o-mini$Very FastGreat balance of cost and quality โญ
gpt-4.1-mini$Very FastLatest mini variant
gpt-4-turbo$$FastGood for detailed reasoning
gpt-3.5-turboยขVery FastBudget option, decent accuracy
# Configure for OpenAI
rusty-page-indexer auth --api-key "sk-..." --model "gpt-4o-mini"

# Override model per query
rusty-page-indexer query "question" --model gpt-4o

Local Models (Ollama)

ModelSizeWorksNotes
gemma3:1b1Bโœ…Minimum recommended for local use
llama3.2:latest3Bโœ…Good balance of speed and accuracy โญ
qwen2.5:7b7Bโœ…Reliable, slightly conservative
llama3.1:latest8Bโœ…Excellent accuracy
mistral:7b7Bโœ…Fast and capable
phi3:mini3.8Bโœ…Microsoft's compact model
qwen2.5:0.5b0.5BโŒToo small, unreliable responses
tinyllama:1.1b1.1BโŒDoesn't follow output format

...
Read full README

Publisher

algirasalgiras

Statistics

Stars5
Forks1
Open Issues0
LicenseMIT License
CreatedJan 23, 2026