Skip to content

Learning guide: fw learn and the corpus

fw learns locally. It reads your git history, a code graph and your docs, stores them in SQLite, and searches them without a network call.

Command Usage
fw learn fw learn <status|harvest|distill|search|loop|systemd> [–xfs-root <dir>]
fw corpus fw corpus <sources|status|sync|search|read|systemd> [–root <dir>]
fw mem fw mem <add|search|timeline|get|list|stats|prune>
fw graph fw graph <build <dir> [–json f] [–report f]|query <question>|explain <node>|path <a> <b>|report|export>
fw docs fw docs <resolve|query|ingest|list> [lib] [topic] [–tokens 4000]

The table is read from fw <command> --help.

  1. Go to the repository.
  2. Harvest history, graph and docs.
Terminal window
fw learn harvest
  1. Look at what was stored.
Terminal window
fw learn status
  1. Search it.
Terminal window
fw learn search "how are releases published"

fw learn systemd prints a systemd unit for a VPS. fw learn loop repeats harvest and distill.

fw corpus keeps a polite, resumable copy of design, Android, Chromium, Rust and Cargo docs. fw learn search includes it. See the fw corpus and fw learn pages.