Skip to main content

SourcesCommand

Enum SourcesCommand 

Source
pub enum SourcesCommand {
    List {
        verbose: bool,
        json: bool,
    },
    Add {
        url: String,
        name: Option<String>,
        preset: Option<String>,
        paths: Vec<String>,
        no_test: bool,
    },
    Remove {
        name: String,
        purge: bool,
        yes: bool,
    },
    Doctor {
        source: Option<String>,
        json: bool,
    },
    Sync {
        source: Option<Vec<String>>,
        no_index: bool,
        verbose: bool,
        dry_run: bool,
        json: bool,
    },
    ArtifactManifest {
        index_path: Option<PathBuf>,
        data_dir: Option<PathBuf>,
        write: bool,
        verify_existing: bool,
        expected_manifest: Option<PathBuf>,
        json: bool,
    },
    Mappings(MappingsAction),
    Agents(AgentsAction),
    Discover {
        preset: String,
        skip_existing: bool,
        json: bool,
    },
    Setup {
        dry_run: bool,
        non_interactive: bool,
        hosts: Option<Vec<String>>,
        skip_install: bool,
        skip_index: bool,
        skip_sync: bool,
        timeout: u64,
        resume: bool,
        verbose: bool,
        json: bool,
    },
}
Expand description

Subcommands for managing remote sources (P5.x)

Variants§

§

List

List configured sources

Fields

§verbose: bool

Show detailed information

§json: bool

Output as JSON (--robot also works)

§

Add

Add a new remote source

Fields

§url: String

Source URL (e.g., user@host or ssh://user@host)

§name: Option<String>

Friendly name for this source (becomes source_id)

§preset: Option<String>

Use preset paths for platform (macos-defaults, linux-defaults)

§paths: Vec<String>

Paths to sync (can be specified multiple times)

§no_test: bool

Skip connectivity test

§

Remove

Remove a configured source

Fields

§name: String

Name of source to remove

§purge: bool

Also delete synced session data from index

§yes: bool

Skip confirmation prompt

§

Doctor

Diagnose source connectivity and configuration issues

Fields

§source: Option<String>

Check only specific source (defaults to all)

§json: bool

Output as JSON (--robot also works)

§

Sync

Synchronize sessions from remote sources

Fields

§source: Option<Vec<String>>

Sync only specific source(s)

§no_index: bool

Don’t re-index after sync

§verbose: bool

Show detailed transfer information

§dry_run: bool

Dry run - show what would be synced without actually syncing

§json: bool

Output as JSON (--robot also works)

§

ArtifactManifest

Build or write a lexical artifact evidence manifest for remote exchange

Fields

§index_path: Option<PathBuf>

Exact lexical index path. Defaults to /index/.

§data_dir: Option<PathBuf>

Override cass data dir used to resolve the lexical index path

§write: bool

Write evidence-bundle-manifest.json next to the lexical artifact

§verify_existing: bool

Verify the existing evidence-bundle-manifest.json without regenerating it

§expected_manifest: Option<PathBuf>

Producer manifest to compare against when verifying a copied artifact

§json: bool

Output as JSON (--robot also works)

§

Mappings(MappingsAction)

Manage path mappings for a source (P6.3)

§

Agents(AgentsAction)

Manage persisted agent indexing exclusions

§

Discover

Auto-discover SSH hosts from ~/.ssh/config

Fields

§preset: String

Platform preset for default paths (macos-defaults, linux-defaults)

§skip_existing: bool

Skip hosts that are already configured as sources

§json: bool

Output as JSON (--robot also works)

§

Setup

Interactive wizard to discover, configure, and set up remote sources.

This wizard automates configuring cass to search across multiple machines. It discovers SSH hosts from ~/.ssh/config, checks each for existing cass installations and agent session data, then guides you through selecting which machines to configure for remote search.

§Workflow Phases

  1. Discovery: Parses ~/.ssh/config to find configured hosts
  2. Probing: Connects to each host via SSH to check cass status and data
  3. Selection: Interactive selection of which hosts to configure
  4. Installation: Installs cass on hosts that don’t have it (optional)
  5. Indexing: Runs cass index on remotes (optional)
  6. Configuration: Generates and saves sources.toml entries
  7. Sync: Downloads session data to local machine (optional)

§Examples

# Interactive wizard (recommended for first-time setup)
cass sources setup

# Configure specific hosts only
cass sources setup --hosts css,csd,yto

# Preview without making changes
cass sources setup --dry-run

# Resume an interrupted setup
cass sources setup --resume

# Non-interactive for scripting (uses auto-detected defaults)
cass sources setup --non-interactive --hosts css,csd

# Skip installation and indexing, just configure
cass sources setup --hosts css --skip-install --skip-index

# JSON output for automation
cass sources setup --json --hosts css

§State and Resume

If setup is interrupted (Ctrl+C, connection lost), state is saved to ~/.cache/cass/setup_state.json. Resume with cass sources setup --resume.

§See Also

  • cass sources list - List configured sources
  • cass sources sync - Sync data from sources
  • cass sources discover - Just discover hosts (no setup)
  • cass robot-docs sources - Machine-readable sources documentation

Fields

§dry_run: bool

Preview what would happen without making changes

§non_interactive: bool

Skip interactive prompts (use auto-detected defaults for scripting)

§hosts: Option<Vec<String>>

Configure only these hosts (comma-separated SSH aliases, skips discovery/selection)

§skip_install: bool

Skip cass installation on remotes that don’t have it

§skip_index: bool

Skip running cass index on remotes

§skip_sync: bool

Skip syncing data after setup completes

§timeout: u64

SSH connection timeout in seconds

§resume: bool

Resume from previous interrupted setup (reads ~/.cache/cass/setup_state.json)

§verbose: bool

Show detailed progress output

§json: bool

Output progress as JSON (implies non-interactive, for scripting)

Trait Implementations§

Source§

impl Clone for SourcesCommand

Source§

fn clone(&self) -> SourcesCommand

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SourcesCommand

Source§

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

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

impl FromArgMatches for SourcesCommand

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 SourcesCommand

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> Instrument for T

Source§

fn instrument(self, _span: NoopSpan) -> Self

Instruments this future with a span (no-op when disabled).
Source§

fn in_current_span(self) -> Self

Instruments this future with the current span (no-op when disabled).
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> Fruit for T
where T: Send + Downcast,