Expand description
mushroomdb CLI library: hand-rolled arg parsing and the demo dataset builder.
The binary in main.rs stays thin — it dispatches on parse_args and
prints what the lib functions return.
Modules§
- export
- Export writer for
mushroomdb export. - install
mushroomdb install/uninstall— wire the /mushroom skill and MCP server into Claude Code and Cursor.
Structs§
- CliError
- CLI-facing error. [
Display] is the message printed to stderr. - Demo
Outcome - Outcome of
run_demo. Counts are deterministic.
Enums§
- Algo
Subcmd - Algorithm subcommand for
mushroomdb algo. - Command
- Parsed
mushroomdbinvocation. - ServeUi
- How
serveshould mount a UI. Precedence:--ui dir> embedded >--no-ui.
Constants§
- N_ORGS
- Deterministic demo: 10 Orgs, 20 Projects, 30 People.
- N_
PEOPLE - N_
PROJECTS - SAMPLE_
QUERY - Sample query printed by
mushroomdb demoand executed against the fresh store.
Functions§
- format_
backup - Format a
BackupReportfor display. - format_
demo - Render a
DemoOutcomethe waymushroomdb demoprints it. - format_
stats - Pretty-print
Statsformushroomdb statsand the demo smoke test. - format_
suggest - Pretty-print a list of
RuleSuggestions formushroomdb suggest. - maybe_
run_ demo_ if_ empty - Run
run_demowhendiris missing or empty; otherwise leave it alone. - parse_
args - Parse argv after the binary name. Hand-rolled — no clap.
- read_
stats - Open
dirand return live stats. - run_
algo - Run a graph algorithm and return a formatted string.
- run_
asof - Execute an as-of query at the given commit and print results.
- run_
backup - Create a consistent, verified backup of
db_dirtodest. - run_
demo - Build the deterministic demo dataset in an empty
dir. - run_
export - Export all data from
db_dirtodestinformat. - run_
migrate - Migrate the snapshot at
db_dirto the current format version. - run_
query - Run a Cypher read or write and print columns/rows like
run_asof. - run_
schema_ apply - Read
schema_file, opendb_dir, apply the schema, and return the diff as one line per entry:"created rule:x","updated view:y", etc. - run_
snapshot - Open
dirand writesnapshot.bin. Default truncates the WAL. - run_
suggest - Profile the database at
dirand return all rule suggestions. - run_
verify - Validate the CRC32 integrity of every section in a V8 snapshot.
- usage
- Usage text for no-args /
--help/-h. - validate_
ui_ dir --ui <dir>must be a directory that containsindex.html.