jinflow CLI Cheat Sheet
Concepts
Section titled “Concepts”| Term | What it is |
|---|---|
| Pack | Domain-specific analytics kit (e.g. Millesime for winemaking, Alptrack for ski resorts) |
| Tenant | One client / site. Pack-qualified: millesime.domaine_zufferey |
| KLS | Knowledge Store — the DuckDB file you build and explore |
| AFS | Artifact Store — the analytical framework (signals, theses, dbt, contracts) |
| Snapshot | Immutable, frozen copy of a KLS |
| DLZ | Data Landing Zone — where raw data arrives from the source system |
| Live Root | Where tenant instances live on disk (~/.jinflow/live/ by default) |
| Deploy Root | Where the application package lives (CLI + Explorer binary) |
| Pre-Make | Preparation phase: extract source data, publish SIS content to AFS, commit. Has side effects |
| Make (pure function) | Build phase: AFS in → KLS out. No SIS mutation, no external fetches. Pure function |
| Extraction Contract | pipeline.yml at the tenant AFS root: lists every extract file with SHA-256 pin and expected schema |
| Operating Mode | One of five deployment topologies: Local, Proxy (P2P2P), Cloud, Semi-Cloud, Make-as-a-Service |
| Supply-Org | Pricing grain dimension (SAP Plant). Canonical values in nuMetrix: PHA, LOG. Pricing key is (material, supply_org) |
Installation
Section titled “Installation”Download the release package, extract it, and add to your PATH:
export PATH="$HOME/jinflow:$PATH" # add to your shell profilejinflow version # verify installationWindows
Section titled “Windows”Download the latest release ZIP, extract it. Run via jinflow.bat or add the folder to your PATH.
Download the latest release tar.gz, extract it, add to PATH.
First-time config
Section titled “First-time config”jinflow us --live-root ~/jinflow-data # where tenant data livesjinflow us --api-key sk-ant-... # Claude API key (for AI features)jinflow us millesime.domaine_zufferey # set default tenantCommands
Section titled “Commands”jinflow us — Configuration
Section titled “jinflow us — Configuration”jinflow us # show current config with provenancejinflow us pack.tenant # set default tenantjinflow us --live-root /path # set data directoryjinflow us --api-key sk-ant-... # set Claude API keyjinflow us --model claude-opus-4-6 # set AI model for evolvejinflow config — Configuration inspector
Section titled “jinflow config — Configuration inspector”jinflow config # show all resolved configurationjinflow config display.precision # show specific key with provenancejinflow config --diff # show tenant overrides vs pack defaultsjinflow config millesime.domaine_zufferey # specific tenantjinflow ls — List tenants
Section titled “jinflow ls — List tenants”jinflow ls # list all packs + tenants (KLS size, source system, CSV count)jinflow ls --snapshots # include snapshot details for all tenantsjinflow ls --snapshots my_tenant # snapshots for one tenantjinflow pick — Interactive tenant picker
Section titled “jinflow pick — Interactive tenant picker”jinflow pick # list tenants, pick one, set as defaultjinflow init — Create a tenant
Section titled “jinflow init — Create a tenant”jinflow init --pack millesime --tenant my_org --source-system opalejinflow init --pack millesime --tenant my_org --dlz /path/to/dlz # auto-detect source systemjinflow init --pack millesime --tenant my_org --display-name "My Organization"jinflow init --pack millesime --tenant my_org --engine-repo /path # custom engine repojinflow clone — Copy a tenant
Section titled “jinflow clone — Copy a tenant”jinflow clone millesime.domaine_zufferey --name sandbox # → domaine_zufferey_sandboxjinflow clone millesime.domaine_zufferey --name sandbox --display-name "Sandbox"jinflow clone millesime.domaine_zufferey --name sandbox --no-share-dlz # independent DLZ copyjinflow afs update — Sync tenant AFS with pack
Section titled “jinflow afs update — Sync tenant AFS with pack”jinflow afs update # dry-run (show what would change)jinflow afs update --do-it # apply updates from domain packjinflow afs update millesime.domaine_zufferey # specific tenantjinflow afs reset — Hard-reset tenant AFS
Section titled “jinflow afs reset — Hard-reset tenant AFS”jinflow afs reset # reset current tenant AFS to match pack exactlyjinflow afs reset millesime.domaine_zufferey # specific tenantjinflow afs remote — Manage git remote
Section titled “jinflow afs remote — Manage git remote”jinflow afs remote # show current remote URLjinflow afs remote https://github.com/org/afs.git # set remote URLjinflow afs status — AFS git status
Section titled “jinflow afs status — AFS git status”jinflow afs status # show branch, tags, dirty filesjinflow afs status millesime.domaine_zufferey # specific tenantjinflow afs log — Build logbook
Section titled “jinflow afs log — Build logbook”jinflow afs log # show commit history / build logbookjinflow afs pull — Pull from remote
Section titled “jinflow afs pull — Pull from remote”jinflow afs pull # fast-forward pull from remotejinflow afs push — Commit and push
Section titled “jinflow afs push — Commit and push”jinflow afs push # commit changes and push to remotejinflow afs push -m "Updated signals" # with commit messagejinflow afs pp — Pull then push
Section titled “jinflow afs pp — Pull then push”jinflow afs pp # pull then push in one commandjinflow pre-make — Preparation phase
Section titled “jinflow pre-make — Preparation phase”jinflow pre-make # extract + publish SIS content (default tenant)jinflow pre-make millesime.domaine_zufferey # specific tenantjinflow pre-make --notes-only # just publish SIS content (notes, bookmarks)jinflow pre-make --extract-only # just extract sourcesPre-make is the side-effecting phase: extract source data from the DLZ, fetch notes and bookmarks from the SIS, write both to the AFS, commit to git. After pre-make, make runs as a pure function. See the Make Guide.
jinflow extract — Convert XLSX to CSV (standalone)
Section titled “jinflow extract — Convert XLSX to CSV (standalone)”jinflow extract # extract for default tenantjinflow extract --contract # render the full extraction contract (pipeline.yml)jinflow extract --check # verify all declared SHA-256 hashes without running extractionjinflow extract --list # machine-readable: id, path, status, last hashjinflow extract millesime.domaine_zufferey # specific tenantjinflow extract --continue-on-error # don't fail-fastjinflow extract --quiet # suppress subprocess outputjin extract sees extraction (inspect, verify). jin make does extraction (runs it as Phase 0). See the Extraction Guide for the trust-boundary model.
jinflow generate — Synthetic data
Section titled “jinflow generate — Synthetic data”jinflow generate # generate synthetic data for default tenantjinflow generate millesime.domaine_zufferey # specific tenantjinflow make — Build
Section titled “jinflow make — Build”jinflow make # build default tenantjinflow make millesime.domaine_zufferey # build specific tenantjinflow make millesime # build all tenants in pack (wildcard)jinflow make --afs /path/to/afs # explicit AFS pathjinflow make --clean # drop and rebuild KLS from scratchjinflow make --extract # extract XLSX → CSV in DLZ, then update-raw, then buildjinflow make --sync # copy CSVs from DLZ to raw/ before buildingjinflow make --snapshot # freeze KLS after build (auto-tag: YYYYMMDD-HHMM)jinflow make --snapshot post-audit # freeze with named tagjinflow make --skip-enrich # skip CSV enrichment stepjinflow make --skip-validate # skip CSV schema validation stepjinflow make --no-deps # skip dbt deps installjinflow make --continue-on-error # collect all errors instead of fail-fastjinflow make --quiet # suppress subprocess outputBuild pipeline phases:
- Enrich CSVs (add lineage columns)
- Validate CSV schemas
- Compile all instruments (signals, theses, verdicts, SMEbits, BitBundles, lineage, entities, reports)
- dbt build: core (bronze → silver → gold) → analytics (signals, theses, verdicts, SMEbits) → reports → lineage
- Post-build: pipeline graph, audit reports (PDF), extract PDFs from KLS
After build, PDF reports are extracted from the KLS audit_reports table into kls/reports/{tenant_id}/*.pdf.
jinflow explore — Web UI
Section titled “jinflow explore — Web UI”jinflow explore # default tenant, port 4000jinflow explore szo # specific tenantjinflow explore --afs /path/to/afs # explicit AFS pathjinflow explore --db /path/to/kls.duckdb # explicit KLS pathjinflow explore --snapshot post-audit # open a specific snapshotjinflow explore --port 3000 # custom portjinflow explore --docker # run Explorer in Dockerjinflow explore --no-open # don't open browser automaticallyjinflow snapshot — Freeze current KLS
Section titled “jinflow snapshot — Freeze current KLS”jinflow snapshot # auto-tag: YYYYMMDD-HHMMjinflow snapshot post-audit # named tagjinflow snapshot millesime.domaine_zufferey # specific tenantjinflow status — AFS status
Section titled “jinflow status — AFS status”jinflow status # current AFS summaryjinflow status --afs /path/to/afs # specific AFSjinflow scripts — Script resolution
Section titled “jinflow scripts — Script resolution”jinflow scripts # show which script wins at each layerjinflow scripts millesime.domaine_zufferey # specific tenantjinflow evolve — AI exploration
Section titled “jinflow evolve — AI exploration”jinflow evolve # interactive REPL (AI + SQL)jinflow evolve millesime.domaine_zufferey # specific tenantjinflow evolve --afs /path/to/afs # explicit AFS pathjinflow evolve --db /path/to/kls.duckdb # explicit KLS pathjinflow evolve --model claude-opus-4-6 # choose AI modeljinflow evolve --no-ai # SQL-only mode (no API calls)jinflow sources — Source file inventory
Section titled “jinflow sources — Source file inventory”jinflow sources # show CSVs, schemas, row counts, DLZ lineagejinflow sources millesime.domaine_zufferey # specific tenantjinflow stat — KLS statistics
Section titled “jinflow stat — KLS statistics”jinflow stat # gold layer counts, analytics pyramid, health checksjinflow stat millesime.domaine_zufferey # specific tenantjinflow purge — Slim down KLS
Section titled “jinflow purge — Slim down KLS”jinflow purge millesime.domaine_zufferey # dry-run (show stats)jinflow purge millesime.domaine_zufferey --do-it # drop bronze + silver tablesjinflow notebook-pdf — Export notebook as PDF
Section titled “jinflow notebook-pdf — Export notebook as PDF”jinflow notebook-pdf nb_io_article_reconciliation # export to PDFjinflow notebook-pdf nb_io_article_reconciliation --lang de # German versionjinflow notebook-pdf nb_io_article_reconciliation -o out.pdfjinflow help — Detailed help
Section titled “jinflow help — Detailed help”jinflow help # list all commandsjinflow help make # detailed help for a commandjinflow release-notes — Generate release notes
Section titled “jinflow release-notes — Generate release notes”jinflow release-notes # generate RELEASE_NOTES.md from gitjinflow pack — Pack operations
Section titled “jinflow pack — Pack operations”jinflow pack ls # list packs, artifacts, tenant sync statusjinflow pack ls --sync # include sync status for all tenantsjinflow pack clone millesime # clone a domain pack from GitHubjinflow pack clone millesime --https # clone via HTTPS instead of SSHjinflow ship — Build, sync, and refresh
Section titled “jinflow ship — Build, sync, and refresh”jinflow ship # dry run: see what would happenjinflow ship --do-it # current tenant → sync → refreshjinflow ship --all --do-it # all tenants → sync → refreshjinflow ship --all --do-it --clean # clean build all → sync → refreshjinflow ship millesime --do-it # one pack onlyjinflow cloud — R2 cloud operations
Section titled “jinflow cloud — R2 cloud operations”jinflow cloud ls # list KLS files and R2 sync statusjinflow cloud ls --local-only # only show local filesjinflow cloud sync --do-it # upload KLS files to R2jinflow cloud sync --do-it --prune # upload + delete remote files not in localjinflow cloud blacklist millesime.domaine_zufferey # exclude tenant from syncjinflow cloud blacklist millesime.domaine_zufferey --remove # re-include tenantjinflow instance — Manage deployed instances
Section titled “jinflow instance — Manage deployed instances”jinflow instance ls # list registered instancesjinflow instance add demo https://this-is.jinflow.io # register an instancejinflow instance remove demo # remove an instancejinflow instance refresh demo # tell instance to re-download from R2jinflow instance refresh --all # refresh all instancesjinflow instance refresh demo --scope pack --pack millesime # refresh specific packjinflow version — Version info
Section titled “jinflow version — Version info”jinflow version # show version + release notesEvolve REPL
Section titled “Evolve REPL”Two modes: ai.less (SQL + commands) and with.ai (Claude-powered natural language).
| Command | Description |
|---|---|
SELECT ... | Run any SQL (also INSERT, CREATE, any valid DuckDB statement) |
/tenants | List tenants in the KLS |
/schema <name> | Describe a DuckDB schema (e.g. /schema domaine_zufferey) |
/probes | List signals (also /hypotheses, /diagnoses, /smebits) |
/read <type> <id> | Read artifact YAML (e.g. /read probes probe_revenue_leakage) |
/write <type> <id> <yaml> | Write artifact to AFS (e.g. /write probes probe_test '{...}') |
/delete <type> <id> | Delete artifact from AFS |
/explain <Type> <id> [tenant] | Entity dossier (e.g. /explain Case CASE_0001 my_tenant) |
/make [flags] | Rebuild KLS without leaving the REPL (resets AI context) |
/ai | Toggle AI mode on/off |
/help | Show help |
exit | Quit |
In with.ai mode, type natural language — Claude queries DuckDB, reads/writes artifacts, and explains entities automatically.
Workflow
Section titled “Workflow”The core loop
Section titled “The core loop” jinflow make Build the KLS ↓ jinflow explore Browse findings in the web UI ↓ jinflow evolve Ask questions, discover patterns, add signals ↓ /make Rebuild from within evolve ↓ Back to explore...Onboarding a new tenant
Section titled “Onboarding a new tenant”jinflow init --pack millesime --tenant new_org --source-system opale# place XLSX exports in DLZ: {dlz}/new_org/opale/xslx/# or place CSVs directly: {dlz}/new_org/opale/csv/jinflow make millesime.new_org --extract --clean # full pipelinejinflow explore millesime.new_orgSnapshotting
Section titled “Snapshotting”jinflow make # iterate...jinflow make --snapshot # freeze when happyjinflow explore --snapshot 20260311-1430 # revisit anytimeSyncing with the pack
Section titled “Syncing with the pack”jinflow afs update # dry-run — see what changed in the packjinflow afs update --do-it # apply changesjinflow make # rebuild with updated instrumentsData Flow
Section titled “Data Flow”DLZ (Data Landing Zone) └── extract (XLSX → CSV) └── raw/ (immutable source CSVs) └── enrich → build/csv/ (enriched CSVs) └── dbt build → KLS (DuckDB) └── audit reports → kls/reports/*.pdfTenant Instance Layout
Section titled “Tenant Instance Layout”~/.jinflow/live/ {pack}/ {tenant}/ afs/ ← analytical framework (git repo) signals/, theses/, ... dbt/{pack}/ reports/ ← report YAML definitions jinflow.yml ← pack manifest raw/ ← immutable source CSVs {source_system}/csv/ build/ ← intermediaries csv/ ← enriched CSVs that dbt reads kls/ ← KLS files {pack}_{tenant}_kls.duckdb ← working copy post-audit.duckdb ← named snapshot reports/ ← PDF reports extracted from KLS {tenant_id}/ report_executive_summary.pdf report_data_quality.pdfReports
Section titled “Reports”Reports are declaratively defined (reports/*.yaml), compiled to dbt SQL by reportcompile.py, built as dbt models (tag:report), then rendered to PDF by auditreport.py (requires weasyprint). The PDFs are stored inside the KLS in an audit_reports table and extracted to kls/reports/{tenant_id}/*.pdf after every build.
Reports are also browsable in the Explorer at /{tenant}/reports.
Analytics Pyramid
Section titled “Analytics Pyramid” ┌─────────────┐ │ Verdicts │ WHY is it happening? ├─────────────┤ │ Theses │ WHAT is happening? ├─────────────┤ │ Signals │ What does the DATA show? ├─────────────┤ │ Perspectives │ Entity-level health scores ├─────────────┤ │ Gold │ Product contract ├─────────────┤ │ Silver │ Domain truth ├─────────────┤ │ Bronze │ Structural ingestion └─────────────┘
┌─────────────┐ │ SMEbits │ Expert knowledge (free-floating) ├─────────────┤ │ BitBundles │ Curated narratives └─────────────┘Environment Variables
Section titled “Environment Variables”| Variable | Purpose |
|---|---|
JINFLOW_LIVE | Override live root (data directory) |
JINFLOW_TENANT | Override default tenant |
JINFLOW_DB_PATH | Explicit KLS DuckDB path |
JINFLOW_AFS_ROOT | AFS root (for Explorer) |
JINFLOW_TENANTS_DIR | Tenants directory (for Explorer) |
JINFLOW_SYSTEM_DB_PATH | System DB path (optional, operational state) |
JINFLOW_DEPLOY_ROOT | Deploy root for app package |
ANTHROPIC_API_KEY | Claude API key (for evolve) |