Quick start
Compare two source revisions, inspect the observations, and save events for your tools. This walkthrough uses CLI version 0.6.1.
Install
Section titled “Install”Use Node.js 20+ and npm:
npm install -g @refract-org/cli@0.6.1refract --versionFetching Wikipedia histories requires an internet connection. You can also run a command with npx @refract-org/cli@0.6.1 without a global installation; npx downloads the package when needed. See installation for other options.
Compare a known span
Section titled “Compare a known span”refract analyze "Bitcoin" --from 369361755 --to 369393212 --depth detailed --jsonThese two revisions are from 2010-06-21. Look for citation_removed: inspect before, after, fromRevisionId, and toRevisionId, then compare the source revisions. The observation records a removed reference; it does not explain the editor's reason.
--json prints one event per line as NDJSON. In an interactive terminal, analysis without it opens the local explorer when there are events. --depth brief fetches the latest 20 revisions by default; detailed and forensic analysis can fetch the full history unless you provide bounds. Depth sets how much text each event carries (see depth levels), while --from, --to, and --since scope the history.
Browse the observations
Section titled “Browse the observations”The CLI includes a local explorer via refract explore "Bitcoin". Add --from, --to, and --depth to reuse the bounds above. To inspect this exact export with the published version, use the file viewer in the next step.
Save events
Section titled “Save events”refract export "Bitcoin" --from 369361755 --to 369393212 --format ndjson > bitcoin-events.ndjsonOpen this file in your data tools or the browser viewer. The viewer accepts event lines, rather than evidence bundles or saved review reports.
Inspect an earlier record
Section titled “Inspect an earlier record”refract snapshot "Bitcoin" --at "2010-06-21"The command finds a revision at or before the date and prints its metadata and a text preview. The preview is truncated at 2,000 characters; use the revision ID to inspect the complete source.
Track a passage in a window
Section titled “Track a passage in a window”refract claim "Bitcoin" --text "blockchain" --limit 50This searches the latest 50 fetched revisions. A first match is relative to that window. Matching rules and partial or unavailable text can limit what the result establishes. See history selection and output for current source-build behavior.
Continue
Section titled “Continue”- Review sources you revisit
- CLI reference — flags and output formats
- Data integrations — use observations in your own process