1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! llmgrep - Pattern-based code search powered by Magellan.
//!
//! This library provides pattern-based code search capabilities using Magellan's
//! code graph database. It supports symbol search, reference search, call search,
//! AST-based filtering, and algorithm-based analysis.
//!
//! # Features
//!
//! - **Symbol Search**: Find symbols by name with fuzzy matching
//! - **Reference Search**: Find incoming references to symbols
//! - **Call Search**: Find outgoing function calls from symbols
//! - **AST Filtering**: Filter by AST node kind (functions, loops, etc.)
//! - **Metrics Filtering**: Filter by complexity, fan-in, fan-out
//! - **Algorithm Integration**: Run Magellan algorithms (reachable, dead-code, cycles)
//!
//! # Quick Start
//!
//! ```no_run
//! use llmgrep::Backend;
//! use std::path::Path;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Open a Magellan database
//! let db_path = Path::new(".magellan/llmgrep.db");
//! let backend = Backend::detect_and_open(db_path)?;
//! # Ok(())
//! # }
//! ```
//!
//! See the [`query`] module for search functions and options.
//!
//! # Modules
//!
//! - [`algorithm`] - Magellan algorithm integration (reachable, dead-code, cycles)
//! - [`ast`] - AST node queries and context
//! - [`backend`] - Backend abstraction (SQLite, Geometric)
//! - [`error`] - Error types
//! - [`output`] - Response types and formatting
//! - [`query`] - Search functions and options
//! - [`safe_extraction`] - Safe UTF-8 extraction
// Watch command is incomplete and requires unstable Mag APIs
// Enable with: --features unstable-watch
// Re-export safe extraction functions for testing and external use
pub use *;
// Re-export query functions for external use
pub use infer_language;
// Re-export algorithm types for external use
pub use ;
// Re-export AST types for external use
pub use ;
// Re-export backend types for external use
pub use Backend;
// Re-export output types for external use
pub use PerformanceMetrics;
// Re-export coverage types for external use
pub use CoverageFilter;
use ValueEnum;
/// Sorting mode for search results