[2026-04-03 Fri]
crucible initInitialize a crucible project. Creates .crucible/ in the project root with the wiki and
source directories, an empty references.bib and the database .crucible/crucible.db, plus CLAUDE.md and .gitignore at the project root (an existing
.gitignore keeps its contents and gets any
missing crucible entries appended under a marker comment, so copyrighted
sources and the database stay out of git), registers the project in the
global registry, installs the skill and writes the manifest. It does not
change ~/.claude/CLAUDE.md: run crucible install in the project to point agents
at it.
crucible init --root /path/to/projectIf --root is omitted, the current
directory is used. Other commands find the project by walking up from
the current directory to the nearest .crucible/wiki/. The home directory cannot be a
project, because ~/.crucible/ holds the
global registry.
Safe to re-run: creates only what is missing. In a fresh clone of an
existing project (wiki articles committed, the gitignored database
missing), the database is rebuilt from the wiki and references.bib rather than created empty.
crucible installInstall the Claude Code skill and register in global CLAUDE.md.
crucible installDoes three things:
skills/crucible/SKILL.md to
~/.claude/skills/crucible/wiki/MANIFEST.md (as crucible manifest does)~/.claude/CLAUDE.md pointing agents at the
manifest (replacing an existing crucible directive; if there are
several, the first is replaced and the rest removed)Install records what it copied (with a checksum) in ~/.claude/skills/crucible/.crucible-installed.json.
If you have edited an installed skill file since, install (and init and update)
saves your copy as SKILL.md.bak before
overwriting it, and says so.
Idempotent: re-running updates the existing directive rather than
duplicating. There is one directive, so running install in another crucible points it there
instead. init and update never change it; only install does.
crucible uninstallRemove the skill and CLAUDE.md directive.
crucible uninstallRemoves only the skill files crucible installed. Files you added to
~/.claude/skills/crucible/, backups, and
installed files you have edited since are left in place (and named); the
directory is removed once empty. Without an install record (an install
by an old version), a file is removed only if it is an unedited copy
that some crucible version shipped. A skill directory or file that is a
symlink is never removed or written through, by uninstall or by install. If ~/.claude/CLAUDE.md has an unpaired <!-- crucible-knowledge-base --> marker,
install and uninstall leave it unchanged and say so.
crucible ingestIngest a source into the crucible.
crucible ingest SOURCE... [OPTIONS]SOURCES are file paths, a URL, glob patterns, or - (the default) for stdin. Several files, such
as the list a shell expands *.pdf into,
and quoted globs that crucible expands itself (** matches subdirectories) are ingested one by
one: a duplicate, a missing file or a file that fails is reported and
skipped, and the rest are still ingested. A URL or - must be the only source, and --title, --url,
--doi and --bibtex, which describe a single source, are
refused with several.
| Option | Description |
|---|---|
-t, --title TEXT |
Source title (auto-detected if omitted) |
--type TYPE |
pdf, web, notebook, data, other (auto-detected) |
--shareable/--no-shareable |
Override default shareability |
--url TEXT |
Original URL |
--date TEXT |
ISO date (default: today) |
-a, --author TEXT |
Author(s), repeatable |
--doi TEXT |
DOI for the source |
--bibtex TEXT |
Full BibTeX entry, or @file.bib to
read one from a file |
--restore |
The file is the missing stored copy of the source with its name |
-f, --filename TEXT |
Filename for stdin input |
--distill |
Then distill the new sources (see crucible distill) |
--agent TEXT |
The agent --distill runs (default:
claude, or $CRUCIBLE_AGENT) |
Examples:
crucible ingest paper.pdf
crucible ingest paper.pdf -t "Smith 2024" -a "Smith, J." --date 2024-03-15
crucible ingest papers/*.pdf
crucible ingest "notebooks/**/*.org" --type notebook
crucible ingest lab-notes.org --type notebook
echo "content" | crucible ingest - -t "Title" --type web
crucible ingest paper.pdf --doi 10.1021/acscatal.5b00001
crucible ingest paper.pdf --bibtex @paper.bibAuto-detection: .pdf maps to pdf
(external), .org to notebook (shareable),
.md/.html to web (external), .csv/.json/.xlsx/.hdf5 to data (shareable).
Each ingested source gets an entry in references.bib. With --bibtex, the supplied entry is used. Otherwise,
with --doi, or when a DOI is found near
the start of the extracted text, crucible fetches the full BibTeX entry
from doi.org, so the entry has its real type and fields. When neither
gives an entry, a minimal one is generated from the known metadata. The
cite key is generated from the title, authors and date, and replaces the
key of a supplied or fetched entry. It is made unique against both the
existing sources and every key already in references.bib (smith2024, then smith2024a, smith2024b, …), so a new source never takes over
an unrelated entry. Authors and a full date given on the command line
are added to the entry when it lacks them.
The stored file's path is written to the entry's file field, and the source row's title, authors
and date are read back from the entry, so rebuilding the database from
references.bib gives the same row. A file
whose content was already ingested is reported as a duplicate and not
added again.
On a fresh clone the stored copies under sources/external/ are absent (they are
gitignored), and their rows, rebuilt from references.bib, have no content hash. Ingesting
the file again restores it into its existing source (same cite key, bib
entry unchanged) when it is that source: its DOI matches the entry's,
or, when either has no DOI, its title does, or its text matches a
committed text sidecar. A different file that only shares the name is
refused with an error, so it is not filed under another paper's key. If
it really is that source (a retitled copy, say), pass --restore; otherwise rename the file before
ingesting it.
Every ingested source is sealed: its entry's sha256 field records the hash of the stored
file, and crucible lint reports a source
whose file has changed since (modified_source). Sources are the record the
wiki is distilled from, so they are never edited; a correction is a new
source that amends the old one.
crucible recordWrite a sealed record: something worth remembering and finding later.
crucible record [SOURCE] [OPTIONS]| Option | Description |
|---|---|
SOURCE |
An org file, or - for stdin (the
default) |
-t, --title |
Title (default: the content's #+TITLE) |
-a, --author |
Who is recording: an agent's exact model ID, or a person's name
(repeatable; default: the content's #+AUTHOR) |
--amends KEY |
Cite key of an earlier source this record corrects or updates (repeatable) |
-j, --json |
JSON output: cite_key, title, path, amends, duplicate |
The content is free-form org: a hypothesis, a method, a result, an
interpretation, a decision or a negative result. A title and an author
are required. Crucible adds #+TITLE, #+AUTHOR and #+DATE (the creation time, to the second) when
the content lacks them, #+AMENDS: with
--amends, and #+RECORDED_WITH: (the agent harness and session,
from the AI_AGENT and CLAUDE_CODE_SESSION_ID environment variables)
when those are set. An agent has no identity across sessions, so its
author is its model ID and the session is what locates the record's
context. The record is stored as sources/notebooks/YYYY-MM-DD-<slug>.org
under a key made from the date and the first title words (20261120-rate-onset-below, then ...a, ...b), gets
a references.bib entry (with an amends field naming the keys it amends) and is
sealed like any ingested source. It shows up in crucible undigested and is distilled into the
wiki with the literature; cite it with citep:KEY.
A record is never edited. To correct or extend one, write a new
record with --amends KEY.
echo "Rate doubled at 350 K, not 400 K." | crucible record -t "Rate onset below 400 K" -a claude-opus-5-5
crucible record finding.org --amends ratestudy2026crucible sealSeal sources ingested before sealing existed.
crucible seal [KEYS...] [-j]Writes the sha256 of each source's
stored file into its references.bib entry.
With no keys, seals every entry whose file is present and that has no
sha256 yet. An entry that is already
sealed is never resealed, so a changed file stays reported; to accept a
change deliberately, remove the entry's sha256 field by hand and seal it again. A key
not in references.bib is an error (exit
1).
crucible distillDistill sources into wiki articles by running an LLM agent.
crucible distill [SOURCES...] [--all] [--agent AGENT] [-n] [-y] [--timeout SECONDS]| Option | Description |
|---|---|
--all |
Every source crucible undigested
lists |
--agent TEXT |
claude, codex, gemini or a
command template (default: claude, or $CRUCIBLE_AGENT) |
-n, --dry-run |
Show the sources and prompts without running the agent |
-y, --yes |
Don't ask before distilling several sources |
--timeout |
Give up on a source after this many seconds |
Crucible has no model client of its own: distilling is the agent's
work, guided by the crucible skill. This command runs an agent
non-interactively in the project root, once per source, with a prompt
that names the source's cite key, stored file and extracted text, and
tells the agent to check what the wiki already covers, write a summary
and concept articles (:STATUS: draft),
touch only .crucible/wiki/, and run crucible sync and crucible lint. SOURCES are cite keys, paths or
fragments, as for crucible source. After
each run the database is synced and the source is reported distilled
only if an article now cites it; the command exits 1 if any source was
not.
The agents:
| Agent | Command |
|---|---|
claude |
claude -p PROMPT --allowedTools 'Bash(crucible *)' Read Write Edit Glob Grep |
codex |
codex exec --full-auto PROMPT |
gemini |
gemini --yolo -p PROMPT |
Any other value is a command template, split as a shell would but run
without one: the token {prompt} is
replaced by the prompt as a single argument, and a template without it
gets the prompt on stdin.
crucible distill smith2024
crucible distill --all -y --agent codex
export CRUCIBLE_AGENT='my-agent run --task {prompt}'
crucible ingest paper.pdf --distillAn unattended run skips the plan-and-approve step of an interactive
session, which is why its articles are drafts: review them afterwards
(crucible source KEY lists them; git shows
the changes).
crucible syncSync the database from wiki org files.
crucible syncFirst reconciles the sources table with references.bib and the files under sources/notebooks/ and sources/data/, then a two-pass process:
Finally it regenerates wiki/MANIFEST.md
and wiki/index.org, so they always match
the database after a sync. An article that cannot be read (for example,
one that is not valid UTF-8) is skipped and reported on stderr rather
than aborting the sync. Symlinked directories under the wiki, and a wiki
directory that is itself a symlink, are followed. A symlink to a
directory or an article inside the wiki is an alias: it is not indexed
again, and links through it count as links to the article it points at.
A symlink to any other file in the wiki is indexed.
Sources are tied to bibliography entries by the entry's standard
file field, which crucible ingest writes with the stored file's
path. An entry with a file field gets one
source row for that file, keyed by its cite key, so a fresh clone
rebuilds the same sources ingest created. An entry without one gets no
source row, and crucible lint reports any
SOURCE_KEYS value that names it. Sync
fills in missing or stale file fields from
sources ingested earlier, so running it once on a machine that has the
database upgrades an older references.bib.
Files under sources/notebooks/ and sources/data/ that no entry names get a source
row from a disk scan, keyed by the file name without its extension. When
that name is already a key in references.bib (or of an ingested source), the
file is keyed <name>-<extension> instead (then
<name>-<extension>-2, …), so
it cannot take that key's article links from the file the entry
names.
An ingested source whose cite key is no longer in references.bib loses its row (or, for a file
under sources/notebooks/ or sources/data/, becomes a disk-scanned source),
as on a rebuild. When references.bib has
malformed entries (unbalanced braces, a missing key), the missing key
may be one that failed to parse, so sync keeps those sources and warns;
crucible lint lists the malformed
entries.
A source's type comes from the folder it is stored in. Shareable PDFs
and web sources are stored in sources/data/: a .pdf there is a PDF, and an @online entry (what ingest writes for web
sources) is a web source.
Parses: #+TITLE, #+FILETAGS, :ARTICLE_TYPE:, :SOURCE_KEYS:, :DERIVED_FROM:, :CREATED:, :MODIFIED:, [[file:...]] links, and full text for FTS.
Properties come from the top heading's drawer, or from file-wide #+PROPERTY: NAME value lines when no drawer sets
them. :SOURCE_KEYS: are space-separated;
commas between keys are accepted too (a, b
or a,b; a key that itself contains a
comma, such as run,1 for run,1.csv, still resolves as one key).
An article's dates come from its :CREATED: and :MODIFIED: properties (an ISO date, optionally
with a time, or an org timestamp). :MODIFIED: falls back to :CREATED:, and an article with only :MODIFIED: uses it for both. An article with
neither gets the time of the sync, which a rebuild cannot reproduce, so
crucible lint reports it.
The database is regenerable: everything in it comes from the wiki
files and references.bib, so deleting
.crucible/crucible.db and syncing (or
running any command, which rebuilds a missing database) gives the same
database again.
Sync reports what it did, for example:
Sync complete: 2 added, 1 updated, 40 unchanged, 0 removed, 120 concept links, 85 article links, 1 sources added
The counts are articles added, updated, unchanged and removed, then
the concept and article links recorded. N sources added appears when reconciliation
inserted source rows, and N skipped (modified during sync) when a file
changed while it was being read (re-run sync once edits settle). A
warning follows if a :SOURCE_KEYS: value
matched more than one source.
Idempotent and safe to run repeatedly.
crucible embedGenerate vector embeddings for semantic search.
crucible embed [OPTIONS]| Option | Description |
|---|---|
-m, --model |
Ollama model (default: the model of the stored embeddings, else nomic-embed-text) |
--url |
Ollama embed API URL (default: $CRUCIBLE_OLLAMA_URL, else localhost:11434) |
--force |
Re-embed every article |
Without --model the model of the stored
embeddings is used, as crucible search
does, so a plain crucible embed keeps
using whatever model the crucible was embedded with. Only embeds
articles that have no embedding from that model (incremental), so
switching models with --model re-embeds
everything with the new one. Articles are sent to ollama in batches. The
org header and drawers are stripped and the first 8000 characters of the
rest are embedded. Re-run after adding new articles.
crucible searchSearch wiki articles.
crucible search QUERY [OPTIONS]
crucible search [--tag TAG]... [--type TYPE]... [OPTIONS]| Option | Description |
|---|---|
-n, --limit |
Max results (default: 20) |
--mode MODE |
auto, fts, semantic, or hybrid (default: auto) |
--all |
Search all registered crucibles too |
-m, --model |
Embedding model (default: the model of the stored embeddings) |
--url |
Ollama embed API URL (default: $CRUCIBLE_OLLAMA_URL, else localhost:11434) |
--fts-weight |
FTS weight for hybrid RRF (default: 1.0) |
--semantic-weight |
Semantic weight for hybrid RRF (default: 1.0) |
--raw |
Skip dedup/quality filtering |
-t, --tag TAG |
Only articles with this tag (or a tag under it in the taxonomy); repeat to require several |
--exact |
Match --tag only itself, not the tags
under it |
--type TYPE |
Only articles of this type (concept, summary, comparison, method); repeat to allow several |
-j, --json |
Output as JSON |
Modes:
Keyword search matches article titles and text (not paths). Each word
is matched literally, so FTS5 operators such as AND, NOT or quotes
are plain text. A trailing * makes a word
a prefix: catal* matches catalysis and
catalyst. A prefix matches only words that start with it: cats* finds cats but not catalysis. A word with
no letters or digits (&, -) is ignored.
By default similar results are clustered and the best representative
is shown; --raw returns every hit. --all also searches every other crucible in the
global registry (see crucible registry);
each result from another crucible is labelled with its registry name. A
peer whose embeddings come from a different model contributes only
keyword hits, with a warning on stderr. So does any peer left out
entirely: one with no database (a stale entry) or whose database cannot
be read is named in a warning, rather than silently contributing
nothing. crucible concepts --all warns the
same way.
--tag and --type restrict every mode to matching articles
before the limit is applied, so crucible search "barrier height" --tag dft -n 5
returns the five best hits among articles tagged dft, not the subset of the overall top five that
happens to carry the tag. Tags are the #+FILETAGS: of an article and match as crucible concept matches names, ignoring case,
spaces, underscores and dashes. Several --tag options require all of them (--tag dft --tag zeolite); several --type options allow any of them. With --all the filters apply in each crucible
searched. A tag no local article carries gets a warning on stderr, since
it is most likely a typo.
With --tag or --type, QUERY may be left out or empty: the
command then lists every article the filters keep, by title, up to --limit, with the same taxonomy expansion and
--exact. There is nothing to rank, so
--mode and the weights do not apply. With
--all the lists from each crucible are
merged by title. A search with neither a query nor a filter is an
error.
crucible search --tag catalysis --type method --json -n 500When .crucible/taxonomy.org defines a
tag hierarchy, a tag also matches every tag under it, so --tag electronic_structure finds articles tagged
dft. --exact
turns that off. The file uses org-mode group tags, #+TAGS: [ parent : child1 child2 ]; a child that
is a group of its own nests the hierarchy, and a tag may have several
parents. It is loaded by crucible sync,
which warns about regular expression members (not supported) and cycles.
With --all each crucible expands tags with
its own taxonomy. See the tutorial for a worked example.
Content from other crucibles is labelled as untrusted, since it was
written by someone else and is often read by an agent. When any result
comes from a peer, the text output ends with a note saying so, and a
peer's article is shown by its absolute path (its path is relative to the peer). With --json, every row has _untrusted (true
for a peer's), and a peer's rows also have _origin (its registry origin) and _abs_path. crucible concepts --all labels peer rows the
same way.
backlinks, sources, related
and history take an article path. It may
be the database path (relative to the project root, as --json output gives it, e.g. .crucible/wiki/concepts/activation-energy.org),
a path relative to the current directory (so tab completion works from
any subdirectory), an absolute path, a path relative to .crucible/ (wiki/concepts/activation-energy.org), or a path
relative to the wiki (concepts/activation-energy.org). If no article
has that path the command exits 1 with an error, rather than reporting
no results; run crucible sync first if the
file is new.
crucible backlinksShow articles that link to the given article.
crucible backlinks concepts/activation-energy.orgcrucible sourcesShow primary sources for an article.
crucible sources concepts/activation-energy.orgcrucible sourceShow everything known about a source.
crucible source SOURCE_PATH [--json]SOURCEPATH is the source's path (in any of the forms article paths take) or cite key, or else part of its path or title; an empty one is an error. A partial path or title must match exactly one source: if it matches several, the candidates are listed and nothing is shown. Shows the source's metadata and the articles distilled from it, which is useful before asking Claude to reread and resummarize it. Exits 1 if no single source matches.
crucible conceptsList all concepts with article counts.
crucible concepts [--all | --tree]--all includes the concepts of every
registered crucible. --tree shows the tag
hierarchy of .crucible/taxonomy.org (see
crucible search), each count including the
articles of the tags under it, and then the tags the taxonomy leaves
out. With --json it returns {"tree": [...], "unplaced": [...]}, each node
having name, article_count (rolled up), direct_count and children. It shows one crucible, so it cannot be
combined with --all.
crucible conceptShow articles covering a specific concept.
crucible concept thermodynamicsConcepts come from #+FILETAGS:. The
name is matched ignoring case, spaces, underscores, dashes and
apostrophes, so crucible concept "activation energy" finds the
tag activation_energy. Unlike crucible search --tag, it does not expand the
taxonomy: it lists the articles tagged with that name only.
crucible relatedShow articles related through implied links (shared concepts, shared sources, temporal proximity, explicit links).
crucible related concepts/activation-energy.orgResults are sorted by number of relationship signals (more is stronger).
crucible historyShow the derivation history of an article.
crucible history comparisons/synthesis.orgShows upstream (what it was derived from) and downstream (what has been derived from it) with timestamps.
crucible orphansArticles with no incoming links.
crucible orphanscrucible undigestedSources with no articles distilled from them.
crucible undigestedcrucible indexRegenerate wiki/index.org from database
state.
crucible indexOrganized by article type and by concept; articles with an
unrecognised :ARTICLE_TYPE: are listed
under "Other". crucible sync also
regenerates the index, so this is only needed on its own after changing
the database by other means.
crucible lintCheck wiki health and report issues.
crucible lint [--strict] [--json]Exits 1 if any issue has severity error, so a script or CI job can gate on it.
Warnings are common in a growing wiki (an undigested source, a link to
an article not yet written) and do not fail lint unless --strict is given; info never does.
Each issue has a type and a severity (error, warning or info):
| Type | Severity | Meaning |
|---|---|---|
missing_file |
error | An article in the database has no file on disk |
broken_link |
warning | A [[file:...]] link points to a
missing file |
orphan |
info | No other article links to this one |
undigested |
warning | A source has no articles distilled from it |
modified_source |
error | A sealed source's file no longer matches the sha256 in its references.bib entry |
missing_source_file |
warning | A notebook or data source's file is gone (external sources are gitignored, so they are not checked) |
missing_concept_article |
info | A concept has no dedicated concept article: no concept article whose
file name or title names it (concepts/activation-energy.org or "Activation
Energy" covers the tag activation_energy) |
duplicate_cite_key |
warning | Two or more sources share a cite key |
duplicate_bib_key |
warning | references.bib has more than one entry
with a key |
malformed_bib_entry |
warning | A references.bib entry is never closed
and is ignored |
missing_property |
warning/info | No :ARTICLE_TYPE: (warning); neither
:CREATED: nor :MODIFIED:, or no :SOURCE_KEYS: (info) |
invalid_date |
warning | An unreadable :CREATED: or :MODIFIED:, or :MODIFIED: earlier than :CREATED: |
unresolved_source_key |
warning/info | A :SOURCE_KEYS: value matches no
source (warning). It is info when the key is in references.bib with no file field: a work cited without its file |
ambiguous_source_key |
warning | A :SOURCE_KEYS: value matches more
than one source |
missing_tags |
warning | The article has no #+FILETAGS: |
untracked |
warning | A wiki file is not in the database (run crucible sync) |
missing_citation |
warning | A cite: key is not in references.bib |
unrecorded_source_date |
info | An ingested source's full date was not written to references.bib because it may be the day of
ingest; the source now has the entry's year. Add date = {...} to the entry if it is the
publication date |
--json outputs a list of issues, each
with type, severity, message
and, where it applies, the path it
concerns, plus link for a broken link,
key for a cite-key issue (with sources listing the paths for duplicate and
ambiguous keys) and line for a malformed
bib entry.
crucible suggestSuggest improvements to the wiki.
crucible suggest [-j]Suggestion types:
new_concept_article: concept in 2+
articles but no dedicated articlemissing_link: related articles with no
explicit cross-linkpending_distillation: sources waiting
to be distilledcomparison_opportunity: 3+ summaries
sharing a concept, no comparisonlink_orphan: orphan articles with
potential connectionssemantic_link: semantically similar
articles (>0.7) without cross-linkssemantic_cluster: groups of 3+ similar
articles suggesting synthesis-j outputs JSON for agent
consumption.
crucible manifestGenerate a manifest summarizing the knowledge base.
crucible manifestLike crucible sync, writes wiki/MANIFEST.md with article counts, concept
list, and query instructions. Used by agents to decide whether to search
this crucible.
crucible mergeMerge another crucible into this one.
crucible merge SOURCE [-n] [-y]| Option | Description |
|---|---|
-n, --dry-run |
Preview without making changes |
-y, --yes |
Skip confirmation prompt |
SOURCE is a path to a crucible project or a name from the global
registry. Merge copies the incoming crucible's sources (with their
extracted-text sidecars), wiki articles and references.bib entries into this project, then
runs crucible sync. Everything is planned
and checked before anything is written: a source whose cite key is
already here is reused only when the files are identical, distinct
sources keep distinct paths (renamed with a numeric suffix when needed,
and the bib file fields follow),
conflicting article files are renamed and links (and :DERIVED_FROM: entries) to them rewritten, and
existing sidecars are never overwritten. If any part cannot be merged
safely, the merge stops and lists every problem. Merging the same
crucible again adds nothing new. Symlinks in the incoming wiki that
point outside it are not copied.
The incoming crucible need not have a database (a fresh clone has
none): merge builds a temporary one from its wiki and references.bib, and writes nothing into the
incoming crucible. If its database is older than source files it holds,
merge warns that those cannot be merged until it is synced.
Merge refuses an incoming crucible in which two sources, or two references.bib entries, share a cite key,
because it cannot tell which one the key's citations mean. Fix them in
the source crucible first (crucible lint
there reports duplicate_cite_key and duplicate_bib_key), sync it, and merge
again.
crucible deleteDelete an article or source from the database.
crucible delete PATH [-y] [--file]| Option | Description |
|---|---|
-y, --yes |
Skip confirmation |
--file |
Also delete the file on disk |
PATH can be a database path, part of a path, or a fragment of a
title; articles are searched first, then sources. Without --file only the database row is removed, so the
next sync restores an article whose file is still in the wiki.
Deleting a source also removes the file
field from its references.bib entry (the
entry itself is kept, so citations to it still resolve); otherwise the
next sync would recreate the row from the entry. A file in sources/notebooks/ or sources/data/ that is left on disk is picked up
again by sync's disk scan, so delete warns about it; use --file to delete the file too. --file only deletes files inside the project's
.crucible/ directory: a source whose bib
file field names a file elsewhere (a
Zotero library, say) loses its row and that field, but the file is kept.
The database row is deleted first, so if that fails nothing else
changes.
The global registry, ~/.crucible/registry.json, lists every crucible
on the machine. Each entry records a name, the project's absolute path,
an optional description, when it was registered, and its origin: where
it comes from. The origin is the URL of the git origin remote when the crucible is in a git
checkout (refreshed on every registration, so it follows a changed
remote), or one given with registry add --origin, which is kept while there
is no git remote. URLs are stored without credentials (https://TOKEN@host/... is stored as https://host/...). Crucibles made by crucible clone also record when they were cloned
and last pulled. crucible init, crucible sync and crucible update register the current project
automatically (a name already used by another path gets a -2, -3, … suffix).
crucible search --all and crucible concepts --all query the other
registered crucibles, and crucible merge
accepts a registry name.
crucible registry listcrucible registry list [--json]Shows each crucible with its path and status (ok, or MISSING
when there is no database there), and an origin: line for each one whose origin is known.
--json includes each database's path
(null if missing) and the origin, cloned_at
and pulled_at fields (null when not known).
crucible registry addcrucible registry add NAME PATH [-d DESCRIPTION] [--origin ORIGIN]Registers a crucible by hand. PATH must contain a crucible database
(.crucible/crucible.db). --origin records where it came from (a URL, a
network share, any note); without it the git origin remote is used, if there is one.
crucible clonecrucible clone URL [DEST] [--name NAME] [-d DESCRIPTION]Clones a crucible from a git repository, builds its database from the
committed wiki and references.bib, and
registers it with URL as its origin. URL is anything git clone accepts: https, ssh, a local path or a
path on a network share. DEST defaults to a directory named after the
repository in the current directory, as git does, and must not exist or
be empty. The repository must have the crucible (.crucible/wiki/) at its top level; if it does
not, the clone is removed and nothing is registered. The registry name
is NAME, or DEST's directory name.
The clone is then searched by crucible search --all, updated by crucible pull, and can be folded into another
crucible with crucible merge. Sources
under sources/external/ are never
committed, so a clone does not have them.
For example, the discopt repository commits its crucible at its top level:
crucible clone https://github.com/jkitchin/discopt.git
# Cloning ... into ./discopt
# Registered 'discopt' -> ./discopt (67 articles, 1 sources)
crucible search "branch and bound" --all
# [discopt] [method] Spatial Branch and Bound (active)
# /path/to/discopt/.crucible/wiki/methods/spatial-branch-and-bound.orgcrucible pullcrucible pull [NAME...] [--all]Updates crucibles from their git upstream and syncs them. NAMEs are
registry names or paths; with none, the current crucible is pulled.
--all pulls every registered crucible made
by crucible clone (not every crucible that
happens to have a git remote).
Each crucible is fetched and fast-forwarded to the upstream of its
current branch, then synced. Pull treats a clone as read-only: it
refuses a crucible with uncommitted changes to tracked files, or with
commits upstream does not have, and says which. The exception is MANIFEST.md and index.org, which every sync regenerates with the
date; they are reset before the update and written again by the sync.
With several crucibles, one that cannot be pulled is reported and the
rest are still pulled.
Pull updates the clone itself. To bring its changes into your own
crucible, run crucible merge NAME there.
Merge skips files it already has, but an article that changed upstream
since an earlier merge arrives as a renamed copy (name_1.org), not as an update in place.
crucible mcpcrucible mcp [NAME...] [--http] [--host HOST] [--port PORT]
[--token-env VAR] [--no-token] [--include-notebooks] [--check]Serves crucibles to other agents over the Model Context Protocol, so
a crucible you have built can be searched and read from Claude Code,
Claude Desktop or any other MCP client, on your machine or someone
else's. Needs the mcp package: pip install 'crucible-llm[mcp]'.
With no NAME, the current crucible is served. Each NAME is a
registered crucible or a crucible directory, and only the crucibles
named are served; the rest of the registry is never reachable.
Everything is read-only. The wiki and references.bib are served (without the file field, which names stored source files);
sources/external/ never is, and sources/notebooks/ only with --include-notebooks. A path outside the served
directories, including through a symbolic link, is refused.
| Tool | Returns |
|---|---|
list_crucibles |
Name, origin, description, counts and top concepts of each |
overview |
A crucible's MANIFEST.md |
search |
Ranked articles with snippets (auto,
fts, semantic, hybrid);
with tags or article_type and no query, every article they
keep, by title |
read_article |
An article's full org text, with its title, type and status |
list_articles |
Every article, optionally of one type |
list_concepts |
Concepts with article counts |
concept |
Articles covering a concept |
links |
Backlinks and related articles |
sources |
Bibliography entries by cite key or DOI |
Articles are also resources, crucible://NAME/TYPE/SLUG (for example crucible://discopt/methods/spatial-branch-and-bound),
and each crucible has crucible://NAME/manifest. When several crucibles
are served, tools that act on one take a crucible argument; search searches them all unless given one,
interleaving their results by rank. The server's instructions tell the
client that the content is reference data written by the crucible's
owner, not instructions.
On your own machine, add it to Claude Code over stdio:
claude mcp add discopt -- crucible mcp discoptTo share with others, serve over streamable HTTP. On a loopback
address (the default) no token is needed. On any other address a bearer
token is required, unless --no-token says
the network is trusted:
export CRUCIBLE_MCP_TOKEN=$(openssl rand -hex 24)
crucible mcp discopt --http --host 0.0.0.0 --token-env CRUCIBLE_MCP_TOKEN
# on the other machine:
claude mcp add --transport http discopt http://HOST:8765/mcp \
--header "Authorization: Bearer TOKEN"The token is read from the environment variable named, never from the
command line, so it does not show up in the process list. The server
speaks plain HTTP: beyond a trusted network, put it behind HTTPS (a
reverse proxy, or an SSH tunnel to a loopback port). --check prints what would be served, and how,
and exits.
crucible registry removecrucible registry remove NAMEcrucible registry cleancrucible registry cleanRemoves entries whose crucible no longer has a database on disk.
crucible publishPublish the wiki as a browsable HTML site via scimax.
crucible publish [OPTIONS]| Option | Description |
|---|---|
-o, --output |
Output directory (default: wiki/build/html) |
--init-only |
Only write config, do not publish |
Regenerates wiki/index.org first, then
runs scimax publish (which must be on
PATH).
crucible graphExport the knowledge graph, in DOT format (the default) or as JSON.
crucible graph [-o wiki.dot]
crucible graph --json [--sources] [--article PATH [--depth N]] [-o graph.json]| Option | Description |
|---|---|
-o, --output |
Output file (default: stdout) |
-j, --json |
Output the graph as JSON (alias --json-output) |
--sources |
JSON only: add source nodes and source-to-article edges |
--article PATH |
JSON only: just the neighbourhood of one article |
--depth N |
Hops from --article to include
(default 1) |
DOT holds only article-to-article links. Render it with graphviz:
dot -Tpng wiki.dot -o wiki.png.
JSON holds the same graph crucible viz
draws, for editors that draw their own (scimax-vscode, for one):
{
"root": "/home/me/kb",
"nodes": [
{"id": "a115", "type": "article", "kind": "concept", "status": "draft",
"title": "Agentic AI for science",
"path": ".crucible/wiki/concepts/agentic-ai-for-science.org"},
{"id": "c12", "type": "concept", "name": "catalysis", "article_count": 7},
{"id": "s3", "type": "source", "title": "...", "key": "smith-2024",
"source_type": "pdf", "path": ".crucible/sources/external/pdfs/smith.pdf"}
],
"edges": [
{"source": "a115", "target": "a116", "type": "link"},
{"source": "a115", "target": "c12", "type": "concept"},
{"source": "a115", "target": "a120", "type": "derivation"},
{"source": "s3", "target": "a115", "type": "source"}
]
}Node ids are a, c or s and the
database id. Paths are relative to root,
the absolute project root. A "link" edge goes from the article that
holds the link, a "concept" edge from an article to a tag it carries, a
"derivation" edge from an article to one derived from it, and a "source"
edge (only with --sources) from a source
to an article distilled from it; a source's key is its cite key, or null. --article keeps the nodes within --depth hops of that article, following edges
either way (a concept or source node is a hop, so --depth 2 reaches the articles that share a
tag), and the edges among them.
crucible vizGenerate an interactive knowledge graph visualization.
crucible viz [-o FILE] [--open]| Option | Description |
|---|---|
-o, --output |
Output file (default: .crucible/wiki/viz.html) |
--open |
Open in browser after generating |
Writes a self-contained HTML file with a force-directed graph. Nodes are articles (colored by type) and concepts; edges are explicit links, shared concepts and derivations.
crucible browseBrowse the wiki in your web browser.
crucible browse [-p PORT] [--no-open]| Option | Description |
|---|---|
-p, --port |
Port number (default: 8088) |
--no-open |
Don't open the browser automatically |
Starts a local HTTP server on 127.0.0.1 that renders the org articles
as HTML with working links between them, search and sidebar navigation.
Only .org files inside the wiki are
served, and requests whose Host header is
not localhost or 127.0.0.1 are refused. The sidebar, index and
references reload when the database or references.bib changes, so articles synced while
the server runs appear without a restart. The knowledge graph is
generated first if viz.html does not
exist.
crucible listenListen to a meeting or conversation and show related articles as it goes.
crucible listen [-p PORT] [--no-open] [--interval SECONDS] [--window SECONDS] [--lang TAG]| Option | Description |
|---|---|
-p, --port |
Port number (default: 8088) |
--no-open |
Don't open the browser automatically |
--interval |
Seconds between updates (default: 5) |
--window |
Seconds of recent speech searched on each update (default: 60) |
--lang |
Speech language, such as en-US
(default: the browser's) |
--url |
Ollama embed API URL (or $CRUCIBLE_OLLAMA_URL) |
Starts the same server as crucible browse and opens its Listen page (also
reachable from the sidebar). Press Start listening and the
browser transcribes the microphone with the Web Speech API (Chrome, Edge
or Safari; Firefox has none, but the page's text box can be typed into
instead). Every --interval seconds the
page sends the last --window seconds of
transcript to the server, which reduces it to its most salient words,
searches each, and, when the wiki has embeddings, fuses that with a
semantic search over the whole window. Each article keeps a score that
decays between updates, so one appears only after it has stayed relevant
for a moment and fades as the talk moves on. Articles open in a new tab
so listening continues. Save session downloads an org file with
the articles shown (linked by absolute path, with the words that
matched) and the timestamped transcript.
Chrome and Edge send the audio to their vendor's speech service; Safari can recognize speech on the device. Only the microphone is heard, so in a call taken on headphones the remote participants are not transcribed.
crucible completionSet up tab completion in bash, zsh or fish.
crucible completion [bash|zsh|fish] [--install]Tab then completes commands and options, and the values arguments
take: source cite keys (distill, source, seal),
article paths (related, backlinks and the like, relative to the wiki as
concepts/x.org, or from the project root
when the path typed starts with .),
concept names, registered crucibles (pull,
mcp, registry remove) and help topics. The values
come from the crucible you are in, read without changing it.
Without --install the script is
printed, to load however you like. With it, bash and zsh get the script
saved as ~/.crucible/completion.SHELL and
a line in ~/.bashrc or ~/.zshrc that loads it (~/.bash_profile when that file does not load
~/.bashrc, since a macOS Terminal starts a
login shell), and fish gets ~/.config/fish/completions/crucible.fish.
Running it again refreshes the script, as after an upgrade adds
commands, and leaves the startup file alone. The shell defaults to the
one $SHELL names. The bash script works
with the bash 3.2 macOS ships as /bin/bash.
crucible completion --installcrucible aboutShow the crucible version and schema version, the current project (its root and counts of sources, articles, concepts and links, when run inside one) and the crucibles in the global registry.
crucible about [--json]
crucible --versioncrucible --version prints just the
installed version of the crucible-llm
package.
crucible updateUpdate a project after upgrading the crucible package.
crucible updateRuns pending database migrations, updates the project's .claude/settings.json, adds any missing crucible
entries to .gitignore, re-registers the
project in the global registry and reinstalls the skill files and
manifest. Like init, it does not change
the ~/.claude/CLAUDE.md directive. Safe to
run repeatedly.
Every command that opens a project's database also runs its pending
migrations first, saying so on stderr (Upgraded the database from schema v2 to v4.), so
an older crucible keeps working after an upgrade without update. Run update
for the rest: settings, .gitignore,
registry and skill.
crucible statsShow database statistics.
crucible statscrucible vscodeOpen the crucible in VS Code.
crucible vscode [FILE]Opens the project root as the workspace and the wiki's index.org (or FILE, a path relative to the wiki such as concepts/foo.org, or to the current directory; a
FILE that does not exist exits 1). With
the scimax
extension, the Crucible panel in the Scimax sidebar then lists this
crucible first, with its concepts and articles, and has search,
back-links and related articles. Needs the code shell command.
crucible helpShow detailed help on a topic.
crucible help [TOPIC]Topics: overview, workflow, ingest, distill, search, sync, maintain,
org-format, registry, and commands (every command and option, generated
from the CLI itself). Use all for
everything. An unknown topic exits 1.
Commands exit 0 on success and 1 on an error, with the message on
stderr. Not finding what was asked for is an error: an article path that
names no article (backlinks, sources, related,
history), an unknown source (source) or an unknown help topic. An empty
result for something that exists is not: an article with no backlinks
prints nothing ([] with --json) and exits 0, as does concept for a name no article is tagged with.
lint exits 1 when it finds errors (or
warnings, with --strict).
The read commands take --json (also
spelled --json-output or -j) and print JSON on stdout instead of text,
for editors, scripts and agents: about,
stats, search, concepts,
concept, backlinks, sources, source,
related, history, orphans,
undigested, registry list, lint and suggest.
Messages such as the database rebuild notice go to stderr, so stdout is
always valid JSON.
Article and source paths are relative to the project root, which
crucible about --json gives along with the
wiki and bibliography paths:
crucible about --json # {"version", "schema_version", "project": {"root", "wiki", "bibliography", ...}, "registry": [...]}
crucible search "activation energy" --json # list of articles (path, title, article_type, abstract, scores)
crucible history concepts/foo.org --json # {"derived_from": [...], "derivatives": [...]}
crucible registry list --json # registered crucibles, with their database path (null if missing)A command with no results prints []. A
lookup that finds nothing to report on (an unknown article path or
source) prints nothing on stdout, an error on stderr, and exits 1. search --all --json marks each result with _crucible: local,
or the registry name of the crucible it came from.