Skip to main content

Command

Enum Command 

Source
pub enum Command {
    Compile {
        path: PathBuf,
        output: Option<PathBuf>,
        exclude: Vec<String>,
        include_tests: bool,
        coverage_report: Option<PathBuf>,
    },
    Info {
        file: PathBuf,
    },
    Query {
        file: PathBuf,
        query_type: String,
        name: Option<String>,
        unit_id: Option<u64>,
        depth: u32,
        limit: usize,
    },
    Get {
        file: PathBuf,
        unit_id: u64,
    },
    Completions {
        shell: Shell,
    },
    Health {
        file: PathBuf,
        limit: usize,
    },
    Gate {
        file: PathBuf,
        unit_id: u64,
        max_risk: f32,
        depth: u32,
        require_tests: bool,
    },
    Budget {
        file: PathBuf,
        max_bytes: u64,
        horizon_years: u32,
    },
}
Expand description

Top-level subcommands.

Variants§

§

Compile

Compile a repository into an .acb graph file.

Recursively scans the source directory, parses all supported languages (Python, Rust, TypeScript, Go), performs semantic analysis, and writes a compact binary .acb file for fast querying.

Examples: acb compile ./src acb compile ./src -o myapp.acb acb compile ./src –exclude=“test” –exclude=“vendor”

Fields

§path: PathBuf

Path to the source directory to compile.

§output: Option<PathBuf>

Output file path (default: .acb in current dir).

§exclude: Vec<String>

Glob patterns to exclude from parsing (may be repeated).

§include_tests: bool

Include test files in the compilation (default: true).

§coverage_report: Option<PathBuf>

Write ingestion coverage report JSON to this path.

§

Info

Display summary information about an .acb graph file.

Shows version, unit/edge counts, language breakdown, and file size. Useful for verifying a compilation was successful.

Examples: acb info project.acb acb info project.acb –format json

Fields

§file: PathBuf

Path to the .acb file.

§

Query

Run a query against a compiled .acb graph.

Available query types: symbol Find code units by name (–name required) deps Forward dependencies of a unit (–unit-id required) rdeps Reverse dependencies (who depends on this unit) impact Impact analysis with risk scoring calls Call graph exploration similar Find structurally similar code units prophecy Predict which units are likely to break stability Stability score for a specific unit coupling Detect tightly coupled unit pairs test-gap Identify high-risk units without adequate tests hotspots Detect high-change concentration units dead-code List unreachable or orphaned units

Examples: acb query project.acb symbol –name “UserService” acb query project.acb deps –unit-id 42 –depth 5 acb query project.acb impact –unit-id 42 acb query project.acb prophecy –limit 10

Fields

§file: PathBuf

Path to the .acb file.

§query_type: String

Query type: symbol, deps, rdeps, impact, calls, similar, prophecy, stability, coupling, test-gap, hotspots, dead-code.

§name: Option<String>

Search string for symbol queries.

§unit_id: Option<u64>

Unit ID for unit-centric queries (deps, impact, calls, etc.).

§depth: u32

Maximum traversal depth (default: 3).

§limit: usize

Maximum results to return (default: 20).

§

Get

Get detailed information about a specific code unit by ID.

Displays all metadata, edges, and relationships for the unit. Use acb query ... symbol first to find the unit ID.

Examples: acb get project.acb 42 acb get project.acb 42 –format json

Fields

§file: PathBuf

Path to the .acb file.

§unit_id: u64

Unit ID to look up.

§

Completions

Generate shell completion scripts.

Outputs a completion script for the specified shell to stdout. Source it in your shell profile for tab completion.

Examples: acb completions bash > ~/.local/share/bash-completion/completions/acb acb completions zsh > ~/.zfunc/_acb acb completions fish > ~/.config/fish/completions/acb.fish

Fields

§shell: Shell

Shell type (bash, zsh, fish, powershell, elvish).

§

Health

Summarize graph health (risk, test gaps, hotspots, dead code).

Fields

§file: PathBuf

Path to the .acb file.

§limit: usize

Maximum items to show per section.

§

Gate

Enforce a CI risk gate for a proposed unit change.

Fields

§file: PathBuf

Path to the .acb file.

§unit_id: u64

Unit ID being changed.

§max_risk: f32

Max allowed overall risk score (0.0 - 1.0).

§depth: u32

Traversal depth for impact analysis.

§require_tests: bool

Fail if impacted units without tests are present.

§

Budget

Estimate long-horizon storage usage against a fixed budget.

Fields

§file: PathBuf

Path to the .acb file.

§max_bytes: u64

Max allowed bytes over the horizon.

§horizon_years: u32

Projection horizon in years.

Trait Implementations§

Source§

impl FromArgMatches for Command

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 Command

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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, 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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more