Skip to main content

colgrep/
lib.rs

1//! colgrep: Semantic code search powered by ColBERT
2//!
3//! This crate provides semantic code search using:
4//! - **next-plaid** - Multi-vector search (ColBERT/PLAID)
5//! - **next-plaid-onnx** - ONNX-based ColBERT encoding
6//! - **tree-sitter** - Multi-language code parsing
7
8pub mod config;
9pub mod embed;
10pub mod index;
11pub mod install;
12pub mod model;
13pub mod onnx_runtime;
14pub mod parser;
15pub mod signal;
16pub mod stderr;
17
18pub use config::{Config, DEFAULT_BATCH_SIZE, DEFAULT_POOL_FACTOR};
19pub use embed::build_embedding_text;
20pub use index::paths::{
21    acquire_index_lock, find_parent_index, get_colgrep_data_dir, get_index_dir_for_project,
22    get_vector_index_path, ParentIndexInfo, ProjectMetadata,
23};
24pub use index::state::IndexState;
25pub use index::{
26    bre_to_ere, escape_literal_braces, index_exists, path_contains_ignored_dir, IndexBuilder,
27    SearchResult, Searcher, UpdatePlan, UpdateStats, CONFIRMATION_THRESHOLD,
28};
29pub use model::{ensure_model, DEFAULT_MODEL};
30pub use onnx_runtime::{ensure_onnx_runtime, is_cudnn_available};
31pub use parser::{
32    build_call_graph, detect_language, extract_units, is_text_format, CodeUnit, Language, UnitType,
33};
34
35// Install commands for AI coding tools
36pub use install::{
37    install_claude_code, install_codex, install_opencode, uninstall_all, uninstall_claude_code,
38    uninstall_codex, uninstall_opencode,
39};
40
41// Signal handling
42pub use signal::{
43    check_interrupted, is_interrupted, is_interrupted_outside_critical, setup_signal_handler,
44    CriticalSectionGuard,
45};