Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 28 variants Delete {
Show 16 fields file: PathBuf, symbol: String, kind: Option<SymbolKind>, analyzer: Option<AnalyzerMode>, analyzer_binary: Option<PathBuf>, language: Option<Language>, context_after: usize, context_before: usize, context: usize, create_backup: bool, relationships: bool, dry_run: bool, unified: usize, operation_id: Option<String>, metadata: Option<String>, snapshot_before: bool,
}, Patch {
Show 20 fields file: Option<PathBuf>, symbol: Option<String>, kind: Option<SymbolKind>, analyzer: Option<AnalyzerMode>, analyzer_binary: Option<PathBuf>, with_: Option<PathBuf>, language: Option<Language>, batch: Option<PathBuf>, context_after: usize, context_before: usize, context_both: usize, preview: bool, unified: usize, create_backup: bool, relationships: bool, operation_id: Option<String>, metadata: Option<String>, db: Option<PathBuf>, snapshot_before: bool, impact_graph: bool,
}, Plan { file: PathBuf, operation_id: Option<String>, metadata: Option<String>, }, Undo { manifest: PathBuf, }, ApplyFiles { glob: String, find: String, replace: String, language: Option<Language>, context_after: usize, context_before: usize, context_both: usize, no_validate: bool, create_backup: bool, operation_id: Option<String>, metadata: Option<String>, dry_run: bool, }, Query { db: PathBuf, label: Vec<String>, file: Option<String>, context_after: usize, context_before: usize, context_both: usize, list: bool, count: bool, show_code: bool, relationships: bool, expand: bool, expand_level: usize, }, Get { db: PathBuf, file: PathBuf, start: usize, end: usize, context_after: usize, context_before: usize, context_both: usize, relationships: bool, expand: bool, expand_level: usize, }, Log { operation_type: Option<String>, status: Option<String>, after: Option<String>, before: Option<String>, limit: usize, offset: usize, execution_id: Option<String>, json: bool, stats: bool, }, Explain { code: String, }, Search { pattern: String, path: PathBuf, language: Option<Language>, glob: Option<String>, context_after: usize, context_before: usize, context_both: usize, apply: bool, replace: Option<String>, json: bool, }, Status { db: PathBuf, detect_backend: bool, }, Find { db: PathBuf, name: Option<String>, symbol_id: Option<String>, ambiguous: bool, output: OutputFormat, }, Refs { db: PathBuf, name: String, path: PathBuf, direction: CallDirection, output: OutputFormat, impact_graph: bool, }, Files { db: PathBuf, symbols: bool, output: OutputFormat, }, Export { db: PathBuf, format: ExportFormat, file: Option<PathBuf>, }, MigrateDb { db_path: PathBuf, backup: bool, dry_run: bool, }, Rename { symbol: Option<String>, name: Option<String>, file: Option<PathBuf>, to: String, db: PathBuf, preview: bool, proof: bool, backup_dir: Option<PathBuf>, no_backup: bool, create_backup: bool, snapshot_before: bool, impact_graph: bool, }, Reachable { symbol: String, path: PathBuf, db: PathBuf, direction: ReachabilityDirection, max_depth: usize, output: OutputFormat, impact_graph: bool, }, DeadCode { entry: String, path: PathBuf, db: PathBuf, exclude_public: bool, group_by_file: bool, output: OutputFormat, }, Cycles { db: PathBuf, symbol: Option<String>, path: Option<PathBuf>, max_cycles: usize, show_members: bool, output: OutputFormat, }, Condense { db: PathBuf, show_members: bool, show_levels: bool, output: OutputFormat, }, Slice { target: String, path: PathBuf, db: PathBuf, direction: SliceDirection, max_depth: Option<usize>, output: OutputFormat, }, ValidateProof { proof: PathBuf, output: OutputFormat, }, Verify { before: PathBuf, after: PathBuf, detailed: bool, output: OutputFormat, }, Batch { spec: PathBuf, db: Option<PathBuf>, dry_run: bool, continue_on_error: bool, rollback: CliRollbackMode, analyzer: Option<AnalyzerMode>, analyzer_binary: Option<PathBuf>, }, Create { file: PathBuf, validate_only: bool, with_mod: bool, workspace: PathBuf, }, Complete { file: PathBuf, line: usize, column: usize, max_results: usize, db: PathBuf, }, Snapshots(SnapshotsCommands),
}
Expand description

Available Splice commands.

Variants§

§

Delete

Delete a symbol by removing its definition.

Fields

§file: PathBuf

Path to the source file containing the symbol.

§symbol: String

Symbol name to delete.

§kind: Option<SymbolKind>

Optional symbol kind filter.

§analyzer: Option<AnalyzerMode>

Optional validation mode (off, os, path).

§analyzer_binary: Option<PathBuf>

Path to rust-analyzer binary (used with –analyzer path).

§language: Option<Language>

Optional language (auto-detect from extension by default).

§context_after: usize

Number of context lines after the match.

§context_before: usize

Number of context lines before the match.

§context: usize

Number of context lines before and after the match (default: 3).

§create_backup: bool

Create a backup before deleting.

§relationships: bool

Include relationship information in output.

§dry_run: bool

Preview deletion without applying changes.

§unified: usize

Number of context lines in unified diff (default: 3).

§operation_id: Option<String>

Optional operation ID for auditing (auto-generated UUID if not provided).

§metadata: Option<String>

Optional JSON metadata to attach to this operation.

§snapshot_before: bool

Capture graph snapshot before deleting.

§

Patch

Apply a patch to a symbol’s span.

Fields

§file: Option<PathBuf>

Path to the source file containing the symbol.

§symbol: Option<String>

Symbol name to patch.

§kind: Option<SymbolKind>

Optional symbol kind filter.

§analyzer: Option<AnalyzerMode>

Optional validation mode (off, os, path).

§analyzer_binary: Option<PathBuf>

Path to rust-analyzer binary (used with –analyzer path).

§with_: Option<PathBuf>

Path to file containing replacement content.

§language: Option<Language>

Optional language (auto-detect from extension by default).

§batch: Option<PathBuf>

JSON file describing batch replacements.

§context_after: usize

Number of context lines after the match.

§context_before: usize

Number of context lines before the match.

§context_both: usize

Number of context lines before and after the match (default: 3).

§preview: bool

Preview changes without applying (alias: –dry-run, -n).

§unified: usize

Number of context lines in unified diff (default: 3).

§create_backup: bool

Create a backup before patching.

§relationships: bool

Include relationship information in output.

§operation_id: Option<String>

Optional operation ID for auditing (auto-generated UUID if not provided).

§metadata: Option<String>

Optional JSON metadata to attach to this operation.

§db: Option<PathBuf>

Path to codegraph database (required for symbol resolution).

§snapshot_before: bool

Capture graph snapshot before patching.

§impact_graph: bool

Generate DOT graph output for visualization (requires –preview)

§

Plan

Execute a multi-step refactoring plan.

Fields

§file: PathBuf

Path to the plan.json file.

§operation_id: Option<String>

Optional operation ID for auditing (auto-generated UUID if not provided).

§metadata: Option<String>

Optional JSON metadata to attach to this operation.

§

Undo

Undo a previous operation by restoring from a backup manifest.

Fields

§manifest: PathBuf

Path to the backup manifest file.

§

ApplyFiles

Apply a pattern replacement to multiple files.

Fields

§glob: String

Glob pattern for matching files (e.g., “tests//*.rs” or “src//*.py”).

§find: String

Text pattern to find.

§replace: String

Replacement text.

§language: Option<Language>

Optional language (auto-detect from extension by default).

§context_after: usize

Number of context lines after the match.

§context_before: usize

Number of context lines before the match.

§context_both: usize

Number of context lines before and after the match (default: 3).

§no_validate: bool

Skip validation gates (default: false).

§create_backup: bool

Create a backup before applying.

§operation_id: Option<String>

Optional operation ID for auditing (auto-generated UUID if not provided).

§metadata: Option<String>

Optional JSON metadata to attach to this operation.

§dry_run: bool

Preview changes without applying — prints what would change and exits.

§

Query

Query symbols by labels (uses Magellan integration).

Fields

§db: PathBuf

Path to the Magellan database.

§label: Vec<String>

Labels to query (can be specified multiple times). Examples: rust, python, fn, struct, class, method, etc.

§file: Option<String>

Filter results by file path (optional). Can be a glob pattern: “src/main.rs”, “src/**/*.rs”, etc.

§context_after: usize

Number of context lines after the match.

§context_before: usize

Number of context lines before the match.

§context_both: usize

Number of context lines before and after the match (default: 3).

§list: bool

List all available labels.

§count: bool

Count entities with specified label(s).

§show_code: bool

Show source code for each result.

§relationships: bool

Include relationship information in output.

§expand: bool

Expand symbol to full body.

§expand_level: usize

Expansion level (0=none, 1=body, 2=containing block).

§

Get

Get code chunks from the database (uses Magellan integration).

Fields

§db: PathBuf

Path to the Magellan database.

§file: PathBuf

Path to the source file.

§start: usize

Start byte offset.

§end: usize

End byte offset.

§context_after: usize

Number of context lines after the match.

§context_before: usize

Number of context lines before the match.

§context_both: usize

Number of context lines before and after the match (default: 3).

§relationships: bool

Include relationship information in output.

§expand: bool

Expand symbol to full body.

§expand_level: usize

Expansion level (0=none, 1=body, 2=containing block).

§

Log

Query execution log.

Fields

§operation_type: Option<String>

Filter by operation type (patch, delete, batch, plan, apply-files, query).

§status: Option<String>

Filter by status (ok, error, partial).

§after: Option<String>

Show operations after this date (ISO 8601 or Unix timestamp).

§before: Option<String>

Show operations before this date (ISO 8601 or Unix timestamp).

§limit: usize

Maximum number of results.

§offset: usize

Skip first N results.

§execution_id: Option<String>

Get specific execution by ID.

§json: bool

Output as JSON.

§stats: bool

Show statistics only.

§

Explain

Explain an error code with detailed documentation.

Fields

§code: String

Error code to explain (e.g., SPL-E001, SPL-E002)

§

Search

Search for code patterns in files.

Fields

§pattern: String

Text pattern to search for.

§path: PathBuf

Files or directories to search (defaults to current directory).

§language: Option<Language>

Optional language filter (auto-detect if not specified).

§glob: Option<String>

Glob pattern for file filtering (e.g., “src//*.rs”, “tests//*.py”). If not specified, searches all supported file types in path.

§context_after: usize

Number of context lines after the match.

§context_before: usize

Number of context lines before the match.

§context_both: usize

Number of context lines before and after the match (default: 2).

§apply: bool

Apply replacement to all matches (atomic with rollback on failure).

§replace: Option<String>

Replacement text (required with –apply).

§json: bool

Output results as JSON.

§

Status

Show database statistics (files, symbols, refs, calls, chunks)

Use –detect-backend to check which backend format the database uses.

Fields

§db: PathBuf

Path to the Magellan database

§detect_backend: bool

Detect and report the backend format (sqlite only)

§

Find

Find symbols by name or 16-character symbol ID

Fields

§db: PathBuf

Path to the Magellan database

§name: Option<String>

Symbol name to search

§symbol_id: Option<String>

16-character hex symbol ID

§ambiguous: bool

Return all matches (default: first match only)

§output: OutputFormat

Output format (human, json, pretty)

§

Refs

Show call relationships for a symbol

Fields

§db: PathBuf

Path to the Magellan database

§name: String

Symbol name

§path: PathBuf

File path containing the symbol

§direction: CallDirection

Direction: in (callers), out (callees), both (default)

§output: OutputFormat

Output format (human, json, pretty)

§impact_graph: bool

Generate DOT graph output for visualization

§

Files

List all indexed files

Fields

§db: PathBuf

Path to the Magellan database

§symbols: bool

Include symbol count per file

§output: OutputFormat

Output format (human, json, pretty)

§

Export

Export graph data in JSON, JSONL, or CSV format

Fields

§db: PathBuf

Path to the Magellan database

§format: ExportFormat

Export format (json, jsonl, csv)

§file: Option<PathBuf>

Output file path (writes to stdout if not specified)

§

MigrateDb

Migrate Magellan database to latest schema version

Fields

§db_path: PathBuf

Path to the Magellan database

§backup: bool

Create backup before migrating

§dry_run: bool

Check migration status without migrating

§

Rename

Rename a symbol across all files using byte-accurate references

Fields

§symbol: Option<String>

Symbol ID (32-char BLAKE3 or 16-char SHA-256)

§name: Option<String>

Symbol name (requires –file)

§file: Option<PathBuf>

File path for symbol name resolution (required with –name)

§to: String

New name for the symbol

§db: PathBuf

Path to Magellan database (default: .magellan/magellan.db)

§preview: bool

Preview changes without applying

§proof: bool

Generate proof file (requires –dry-run)

§backup_dir: Option<PathBuf>

Override backup directory (default: .splice/backups/)

§no_backup: bool

Skip backup creation

§create_backup: bool

Create backup before rename (default: true for safety, use –no-backup to skip)

§snapshot_before: bool

Capture graph snapshot before renaming.

§impact_graph: bool

Generate DOT graph output for visualization (requires –preview)

§

Reachable

Show reachability analysis for a symbol (caller/callee chains)

Fields

§symbol: String

Symbol name to analyze

§path: PathBuf

File path containing the symbol

§db: PathBuf

Path to Magellan database (default: .magellan/magellan.db)

§direction: ReachabilityDirection

Analysis direction: forward (callees), reverse (callers), both

§max_depth: usize

Maximum depth to traverse (default: 10)

§output: OutputFormat

Output format (human, json, pretty)

§impact_graph: bool

Generate DOT graph output for visualization

§

DeadCode

Detect dead code (unreachable symbols) from entry points

Fields

§entry: String

Entry point symbol name (e.g., “main”, “MyApp::run”)

§path: PathBuf

File path containing the entry point symbol

§db: PathBuf

Path to Magellan database (default: .magellan/magellan.db)

§exclude_public: bool

Exclude public symbols from dead code list

§group_by_file: bool

Group results by file (default: true for human output)

§output: OutputFormat

Output format (human, json, pretty)

§

Cycles

Detect cycles in the call graph

Fields

§db: PathBuf

Path to Magellan database (default: .magellan/magellan.db)

§symbol: Option<String>

Optional: find cycles containing this specific symbol

§path: Option<PathBuf>

Optional: file path for symbol resolution (required with –symbol)

§max_cycles: usize

Maximum number of cycles to return (default: 100)

§show_members: bool

Show cycle members (default: true)

§output: OutputFormat

Output format (human, json, pretty)

§

Condense

Analyze condensation graph (SCCs collapsed to DAG)

Fields

§db: PathBuf

Path to Magellan database (default: .magellan/magellan.db)

§show_members: bool

Show SCC members (default: true for human output)

§show_levels: bool

Show topological levels

§output: OutputFormat

Output format (human, json, pretty)

§

Slice

Perform program slicing (forward/backward impact analysis)

Fields

§target: String

Target symbol to slice from

§path: PathBuf

File path containing the target symbol

§db: PathBuf

Path to Magellan database (default: .magellan/magellan.db)

§direction: SliceDirection

Slice direction: forward (what this affects) or backward (what affects this)

§max_depth: Option<usize>

Maximum depth to traverse (default: unlimited)

§output: OutputFormat

Output format (human, json, pretty)

§

ValidateProof

Validate proof checksums for refactoring audit trail

Fields

§proof: PathBuf

Path to the proof JSON file

§output: OutputFormat

Output format (human, json, pretty)

§

Verify

Compare two snapshots and report differences

Fields

§before: PathBuf

Path to the “before” snapshot file

§after: PathBuf

Path to the “after” snapshot file

§detailed: bool

Show detailed symbol-by-symbol differences

§output: OutputFormat

Output format (human, json, pretty)

§

Batch

Execute batch operations from YAML spec

Fields

§spec: PathBuf

Path to the batch specification YAML file

§db: Option<PathBuf>

Database path for snapshot/impact analysis (required for rollback)

§dry_run: bool

Preview changes without applying (alias: –dry-run, -n)

§continue_on_error: bool

Continue on error instead of stopping

§rollback: CliRollbackMode

Rollback mode: auto, never, always

§analyzer: Option<AnalyzerMode>

Optional validation mode (off, os, path).

§analyzer_binary: Option<PathBuf>

Path to rust-analyzer binary (used with –analyzer path).

§

Create

Create a new file with validation

Fields

§file: PathBuf

Path to the file to create

§validate_only: bool

Validate only (don’t write file)

§with_mod: bool

Add module declaration to parent module

§workspace: PathBuf

Workspace directory (default: current directory)

§

Complete

Get grounded code completions using Magellan database

Fields

§file: PathBuf

Path to the source file

§line: usize

Line number (1-based)

§column: usize

Column number (1-based)

§max_results: usize

Maximum number of suggestions

§db: PathBuf

Path to Magellan database

§

Snapshots(SnapshotsCommands)

Manage code graph snapshots

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V