pub enum Commands {
Show 34 variants
Tui {
once: bool,
reset_state: bool,
asciicast: Option<PathBuf>,
data_dir: Option<PathBuf>,
inline: bool,
ui_height: u16,
anchor: String,
record_macro: Option<PathBuf>,
play_macro: Option<PathBuf>,
refresh: bool,
},
Index {Show 14 fields
full: bool,
force_rebuild: bool,
watch: bool,
watch_once: Option<Vec<PathBuf>>,
watch_interval: u64,
semantic: bool,
build_hnsw: bool,
embedder: String,
data_dir: Option<PathBuf>,
json: bool,
idempotency_key: Option<String>,
progress_interval_ms: u64,
no_progress_events: bool,
robot_trace_ingest: bool,
},
Completions {
shell: Shell,
},
Man,
RobotDocs {
topic: RobotTopic,
},
Search {Show 38 fields
query: String,
agent: Vec<String>,
workspace: Vec<String>,
limit: usize,
offset: usize,
json: bool,
robot_meta: bool,
fields: Option<Vec<String>>,
max_content_length: Option<usize>,
max_tokens: Option<usize>,
request_id: Option<String>,
cursor: Option<String>,
display: Option<DisplayFormat>,
data_dir: Option<PathBuf>,
days: Option<u32>,
today: bool,
yesterday: bool,
week: bool,
since: Option<String>,
until: Option<String>,
aggregate: Option<Vec<String>>,
explain: bool,
dry_run: bool,
timeout: Option<u64>,
highlight: bool,
source: Option<String>,
sessions_from: Option<String>,
mode: Option<SearchMode>,
approximate: bool,
model: Option<String>,
rerank: bool,
reranker: Option<String>,
daemon: bool,
no_daemon: bool,
two_tier: bool,
fast_only: bool,
quality_only: bool,
refresh: bool,
},
Pack {Show 29 fields
query: String,
agent: Vec<String>,
workspace: Vec<String>,
limit: usize,
json: bool,
fields: Option<Vec<String>>,
max_tokens: usize,
max_sessions: usize,
max_evidence: usize,
context_lines: usize,
max_excerpt_chars: usize,
request_id: Option<String>,
display: Option<DisplayFormat>,
data_dir: Option<PathBuf>,
days: Option<u32>,
today: bool,
yesterday: bool,
week: bool,
since: Option<String>,
until: Option<String>,
source: Option<String>,
sessions_from: Option<String>,
mode: Option<SearchMode>,
freshness_policy: String,
freshness_window_seconds: i64,
require_evidence: bool,
explain_selection: bool,
refresh: bool,
timeout: Option<u64>,
},
Stats {
data_dir: Option<PathBuf>,
json: bool,
source: Option<String>,
by_source: bool,
},
Diag {
data_dir: Option<PathBuf>,
json: bool,
quarantine: bool,
verbose: bool,
},
Status {
data_dir: Option<PathBuf>,
json: bool,
robot_meta: bool,
stale_threshold: u64,
},
Capabilities {
json: bool,
},
Triage {
data_dir: Option<PathBuf>,
json: bool,
stale_threshold: u64,
},
State {
data_dir: Option<PathBuf>,
json: bool,
robot_meta: bool,
stale_threshold: u64,
},
ApiVersion {
json: bool,
},
Introspect {
json: bool,
},
View {
path: PathBuf,
source: Option<String>,
line: Option<usize>,
context: usize,
json: bool,
},
Health {
data_dir: Option<PathBuf>,
json: bool,
robot_meta: bool,
stale_threshold: u64,
},
Doctor {Show 43 fields
data_dir: Option<PathBuf>,
json: bool,
check: bool,
fix: bool,
repair: bool,
cleanup: bool,
archive_scan: bool,
archive_normalize: bool,
backups_list: bool,
backups_verify: bool,
backups_restore: bool,
baseline_save: bool,
baseline_diff: bool,
baseline_update: bool,
support_bundle: bool,
support_bundle_verify: bool,
archive_export: bool,
archive_relocate: bool,
archive_export_verify: bool,
archive_target: Option<PathBuf>,
backup_id: Option<String>,
baseline_id: Option<String>,
baseline_path: Option<PathBuf>,
support_bundle_path: Option<PathBuf>,
include_sensitive_attachments: bool,
sensitive_attachment: Vec<PathBuf>,
sensitive_attachment_max_bytes: u64,
dry_run: bool,
yes: bool,
plan_fingerprint: Option<String>,
verbose: bool,
force_rebuild: bool,
allow_repeated_repair: bool,
ls: bool,
undo: Option<String>,
robot_triage: bool,
diff: Option<String>,
gc_before: Option<String>,
watch: bool,
watch_interval_ms: u64,
watch_iterations: u64,
explain: Option<String>,
emit_capabilities: bool,
},
Context {
path: PathBuf,
source: Option<String>,
data_dir: Option<PathBuf>,
limit: usize,
json: bool,
},
Sessions {
workspace: Option<PathBuf>,
current: bool,
limit: Option<usize>,
json: bool,
data_dir: Option<PathBuf>,
},
Resume {
path: PathBuf,
agent: Option<String>,
exec: bool,
shell: bool,
json: bool,
},
Upgrade {
check: bool,
force: bool,
yes: bool,
json: bool,
},
Export {
path: PathBuf,
source: Option<String>,
format: ConvExportFormat,
output: Option<PathBuf>,
clipboard: bool,
include_tools: bool,
include_skills: bool,
},
ExportHtml {Show 15 fields
session: PathBuf,
source: Option<String>,
output_dir: Option<PathBuf>,
filename: Option<String>,
encrypt: bool,
password_stdin: bool,
include_tools: bool,
show_timestamps: bool,
no_cdns: bool,
include_skills: bool,
theme: String,
dry_run: bool,
explain: bool,
open: bool,
json: bool,
},
Expand {
path: PathBuf,
source: Option<String>,
line: usize,
context: usize,
json: bool,
},
Timeline {
since: Option<String>,
until: Option<String>,
today: bool,
agent: Vec<String>,
data_dir: Option<PathBuf>,
json: bool,
group_by: TimelineGrouping,
source: Option<String>,
},
Pages {Show 27 fields
export_only: Option<PathBuf>,
verify: Option<PathBuf>,
agents: Option<Vec<String>>,
workspaces: Option<Vec<String>>,
since: Option<String>,
until: Option<String>,
path_mode: PathMode,
target: Option<PagesDeployTarget>,
project: Option<String>,
branch: Option<String>,
account_id: Option<String>,
api_token: Option<String>,
dry_run: bool,
scan_secrets: bool,
fail_on_secrets: bool,
secrets_allow: Vec<String>,
secrets_deny: Vec<String>,
json: bool,
verbose: bool,
no_encryption: bool,
i_understand_unencrypted_risks: bool,
preview: Option<PathBuf>,
port: u16,
no_open: bool,
config: Option<String>,
validate_config: bool,
example_config: bool,
},
Mirror(MirrorCommand),
Sources(SourcesCommand),
Models(ModelsCommand),
Swarm(SwarmCommand),
Import(ImportCommand),
Analytics(AnalyticsCommand),
Daemon {
socket: Option<PathBuf>,
idle_timeout: Option<u64>,
max_connections: Option<usize>,
data_dir: Option<PathBuf>,
},
}Variants§
Tui
Launch interactive TUI
Fields
Index
Run indexer
Fields
watch_once: Option<Vec<PathBuf>>Trigger a single watch cycle for specific paths (comma-separated or repeated)
watch_interval: u64Minimum seconds between watch scan cycles (default: 30). Prevents high CPU usage from tight-loop scanning when filesystem events arrive continuously.
build_hnsw: boolBuild HNSW index for approximate nearest neighbor search (requires –semantic).
Enables O(log n) search with --approximate flag at query time.
idempotency_key: Option<String>Idempotency key for safe retries. If the same key is used with identical parameters, the cached result is returned. Keys expire after 24 hours.
progress_interval_ms: u64Interval (ms) between NDJSON progress events emitted on stderr in –json/–robot mode. Clamped to [250, 60000]. Default 2000. Set –no-progress-events to disable.
Completions
Generate shell completions to stdout
Man
Generate man page to stdout
RobotDocs
Machine-focused docs for automation agents
Fields
topic: RobotTopicTopic to print
Search
Run a one-off search and print results to stdout
Fields
limit: usizeMax results. 0 = “no limit” but is auto-capped to a RAM-proportional ceiling
(1/16 of MemAvailable, clamped to [256 MiB, 16 GiB] of result-heap) so a single
query can’t tie up the whole machine. Override with CASS_SEARCH_NO_LIMIT_CAP=
robot_meta: boolInclude extended metadata in robot output (elapsed_ms, wildcard_fallback, cache_stats)
fields: Option<Vec<String>>Select specific fields in JSON output (comma-separated). Use ‘minimal’ for source_path,line_number,agent
or ‘summary’ for source_path,line_number,agent,title,score. Example: –fields source_path,line_number
max_content_length: Option<usize>Truncate content/snippet fields to max N characters (UTF-8 safe, adds ‘…’ and _truncated indicator)
max_tokens: Option<usize>Soft token budget for robot output (approx; 4 chars ≈ 1 token). Adjusts truncation.
cursor: Option<String>Cursor for pagination (base64-encoded offset/limit payload from previous result)
display: Option<DisplayFormat>Human-readable display format: table (aligned columns), lines (one-liner), markdown
since: Option<String>Filter to entries since ISO date (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS),
keyword (today, yesterday, now), or relative offset
(-7d, -24h, -30m, -1w). allow_hyphen_values lets the
dash-prefixed forms pass clap without requiring the equals syntax
(reality-check bead hr0z4).
aggregate: Option<Vec<String>>Server-side aggregation by field(s). Comma-separated: agent,workspace,date,match_type
Returns buckets with counts instead of full results. Use with –limit to get both.
explain: boolInclude query explanation in output (shows parsed query, index strategy, cost estimate)
dry_run: boolValidate and analyze query without executing (returns explanation, estimated cost, warnings)
sessions_from: Option<String>Filter to sessions from file (one path per line). Use ‘-’ for stdin.
Enables chained searches: cass search "query1" --robot-format sessions | cass search "query2" --sessions-from -
mode: Option<SearchMode>Search mode: hybrid-preferred (default), lexical, or semantic
approximate: boolUse approximate nearest neighbor (ANN) search with HNSW for faster semantic/hybrid queries.
Trades slight accuracy loss for O(log n) search complexity instead of O(n).
Only affects semantic and hybrid modes; ignored for lexical search.
Requires an HNSW index built with cass index --semantic --approximate.
model: Option<String>Embedding model to use for semantic search.
Available models depend on what’s been downloaded.
Use cass models --list to see available options.
rerank: boolEnable reranking of search results for improved relevance. Requires a reranker model to be available.
reranker: Option<String>Reranker model to use (requires –rerank).
Use cass models --list to see available options.
daemon: boolUse daemon for warm model inference (faster repeated queries). If daemon is unavailable, falls back to direct inference.
two_tier: boolEnable two-tier progressive search: fast results immediately, refined via daemon. Returns initial results from fast embedder (~1ms), then refines with quality embedder via daemon (~130ms). Best of both worlds for interactive search.
fast_only: boolFast-only search: use lightweight embedder for instant results, no refinement. Ideal for real-time search-as-you-type scenarios where latency is critical.
Pack
Build a deterministic answer pack for agent handoffs
Fields
display: Option<DisplayFormat>Human-readable display format. Only markdown is supported for pack.
mode: Option<SearchMode>Search mode: hybrid-preferred (default), lexical, or semantic.
Stats
Show statistics about indexed data
Fields
Diag
Output diagnostic information for troubleshooting
Fields
Status
Quick health check for agents: index freshness, db stats, recommended action
Fields
Capabilities
First-stop agent self-description: workflows, mistake recoveries, commands, flags, env vars, exit codes, and limits
Triage
One-shot agent triage: readiness, next command, workflows, docs, and schemas
Fields
State
Quick state/health check (alias of status)
Fields
ApiVersion
Show API + contract version info
Introspect
Full API schema introspection - commands, arguments, and response schemas
View
View a source file at a specific line (follow up on search results)
Fields
Health
Minimal health check (<50ms). Exit 0=healthy, 1=unhealthy. For agent pre-flight checks.
Fields
Doctor
Diagnose cass installation issues. Legacy cass doctor --json maps to the read-only check surface.
Legacy --fix maps to safe-auto-run and may only apply contract-declared safe repairs.
Fields
fix: boolLegacy safe auto-run: apply only contract-declared safe repairs, preserving archive/source evidence.
include_sensitive_attachments: boolInclude explicitly provided sensitive attachments in the support bundle.
sensitive_attachment: Vec<PathBuf>Sensitive attachment path for cass doctor support-bundle --include-sensitive-attachments.
sensitive_attachment_max_bytes: u64Maximum total sensitive attachment bytes copied into a support bundle.
force_rebuild: boolRequest a derived rebuild; never bypasses archive coverage gates or plan fingerprints.
ls: boolList per-run artifact directories under <data_dir>/doctor/runs/. Read-only.
Output is JSON when combined with --json/--robot. Returns the run-id, started/ended timestamps,
mode, exit_code, action_count and status (completed|incomplete|unknown) per run, newest-first.
undo: Option<String>Undo the named run by id (or latest). Walks <run-dir>/actions.jsonl in reverse,
verifies hashes, and restores byte-identically from the per-run backups. Refuses on
any post-mutation tampering. The undo itself produces a fresh run-id.
robot_triage: boolMega-command for agents: returns one envelope with summary, findings, actions_planned, recommended_command, capabilities_url. Read-only; composes the existing read-only doctor check with planning hints.
diff: Option<String>Show what --fix would change vs the current state. Read-only.
Optional <REF> compares against a prior run-id instead.
gc_before: Option<String>Quarantine doctor runs older than <ISO8601>. Renames into
<data_dir>/doctor/quarantine/runs/; never deletes. Requires
both --gc-before AND --yes (per the destructive-action gate).
watch: boolWorld-class-doctor pass-6: long-running monitor mode. Periodically
re-reads <data_dir>/doctor/runs/ and emits one JSONL event per
observed change to stdout. Stops on Ctrl+C or after --watch-iterations.
watch_interval_ms: u64World-class-doctor pass-6: poll interval for --watch. Default
5000 ms. Bounded to [500, 60000].
watch_iterations: u64World-class-doctor pass-6: stop after this many polls. 0 = run forever (until SIGINT). Useful in tests + bounded automation.
Context
Find related sessions for a given source path
Fields
Sessions
List recent sessions, with optional workspace/current-session filtering
Fields
Resume
Resolve a session path into a ready-to-run resume command for its native harness (Claude Code, Codex, OpenCode, pi_agent, Gemini).
By default, the resolved command is printed to stdout, one argv token per line, so the caller can wrap it however they like:
eval “$(cass resume /path/to/session.jsonl –shell)” $(cass resume /path/to/session.jsonl –shell) # direct exec
Use --exec to have cass exec the command directly, replacing
the current process.
Fields
exec: boolReplace the current process with the resolved resume command.
Mutually exclusive with --shell and --json.
Upgrade
Check for a newer cass release and (optionally) install it.
Without flags, prompts y/N before running the same checksum-
verified installer the TUI uses. Useful in headless environments
where cass tui would never fire its own update prompt.
Examples:
cass upgrade # interactive prompt cass upgrade –check # print versions, exit non-zero if outdated cass upgrade –yes # install without asking cass upgrade –force –check # skip the 1-hour cadence
Fields
check: boolPrint current vs latest version and exit. No install. Exits 0 when up to date, 1 when an update is available.
force: boolBypass the 1-hour update-check cadence and re-fetch the
GitHub release API immediately. Combine with --check
to refresh status without installing.
Export
Export a conversation to markdown or other formats
Fields
format: ConvExportFormatOutput format
ExportHtml
Export session as beautiful, self-contained HTML (with optional encryption)
Fields
Expand
Show messages around a specific line in a session file
Fields
Timeline
Show activity timeline for a time range
Fields
since: Option<String>Start time (ISO date, ‘today’, ‘yesterday’, ‘Nd’ for N days ago,
or relative -7d/-24h/-30m/-1w). allow_hyphen_values lets
dash-prefixed offsets pass clap (reality-check bead hr0z4).
group_by: TimelineGroupingGroup by: hour, day, or none
Pages
Export encrypted searchable archive for static hosting (P4.x)
Fields
since: Option<String>Filter entries since ISO date, keyword, or relative offset
(-7d, -1w, etc.). allow_hyphen_values lets dash-prefixed
values pass clap (reality-check bead hr0z4).
target: Option<PagesDeployTarget>Deployment target: local, github, cloudflare
secrets_allow: Vec<String>Allowlist regex patterns to suppress findings (repeatable or comma-separated)
Mirror(MirrorCommand)
Inspect and prune raw-mirror evidence under explicit operator control
Sources(SourcesCommand)
Manage remote sources (P5.x)
Models(ModelsCommand)
Manage semantic search models
Swarm(SwarmCommand)
Read-only swarm operations status
Import(ImportCommand)
Import data from external sources
Analytics(AnalyticsCommand)
Token usage, tool, and model analytics
Subcommands: status, tokens, tools, models, rebuild, validate. All subcommands share time-range, dimensional, and output flags.
§Examples
cass analytics status --json
cass analytics tokens --days 7 --group-by day --json
cass analytics rebuild --jsonDaemon
Run the semantic model daemon (Unix only)
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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 Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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