CLI reference

The DeepCell CLI, in full

Five surfaces, every guide topic, every command and every rule — generated from the CLI itself, so what is on this page is what your terminal answers.

Handing this to an agent instead of reading it? The same reference, in plain markdown: /product/cli.md

Start here

Install the CLI. No account is needed to begin — the first call mints an anonymous session, and everything on this page works from a cold install.

macOS / Linux

curl -LsSf https://beta.deepcell.net/install.sh | sh

Windows (PowerShell)

irm https://beta.deepcell.net/install.ps1 | iex

Then check the install in one call: version, whether the service is reachable, who you are, and which workspace is active.

deepcell doctor

Read the guided walkthrough, then list what is in your workspace. If the second one prints, you are connected.

deepcell guide orient/start deepcell ls

Signing in is optional and belongs after your first file, not before it. It keeps your work beyond the anonymous session, lifts the anonymous limits, and lets you share what you build.

deepcell login

The five surfaces

The reference is split by the question you are asking at that instant, because each kind of knowledge has a different shape, a different read frequency, and a different risk of going stale. Reach for the one that matches your question rather than reading the set.

SurfaceThe question you are askingWhat it answers
deepcell helpHow do I invoke this exactly?Every command, flag, exit code and example as one document.
deepcell rulesWhat must always hold?The non-negotiable invariants every .deepcell model must satisfy.
deepcell guideWhat is the procedure for this stage?Explain how DeepCell itself works.
deepcell refWhat values are legal here?Look up legal values, and resolve any typed id.
deepcell example getWhat does a correct one look like?Write an example document to a local file.

Two of them — the invocation reference and the legal-values reference — are derived from the implementation, so they cannot drift from it. The other three are written by hand and tied back mechanically: every id they cite has to resolve, and CI fails when one does not.

This page is not a sixth surface. It is a rendering of those five, built from the same manifest the CLI serves, so the two cannot describe different commands. Manifest version: 0.3.0

Every guide topic

Topics are ordered procedure, grouped by the stage of the work they belong to. Read the one for the stage you are in rather than the whole index. Print any of them from a terminal:

deepcell guide orient/start
TopicStageWhat it covers
orient/choose-shapeorientWhat you are building, and which examples and domain pack to read for it
orient/conceptsorientItem, Context, Status, Scenario, Value, Calc — the six words everything is built from
orient/how-to-workorientYou produce work that someone else will question. It lands in a `.deepcell`
orient/startorientLook before you build: check the setup, pick the workspace, read what is there
ingest/tabularingestAn xlsx or csv becomes items and contexts: dimension mapping, then provenance
generate/calcsgenerateDefine the relationship once; the engine produces every number from it
generate/first-filegenerateEmpty workspace to one valid `.deepcell` file you can then build on
generate/structuregenerateRows are Items, columns are Contexts, and a third axis is a custom Dimension
generate/valuesgenerateLiteral cells are for inputs only, and every driver must actually hold one
generate/whole-docgenerateAuthoring a complete document as one XML write, and when that beats defs ops
revise/historyreviseVersions, variants, and moving a workspace between the cloud and a local folder
revise/reasoningreviseRecord why the model says what it says — and supersede rather than delete
revise/scenariosreviseWhat-if analysis over one file — no copies, no forked models
revise/structurereviseWhat add, rename, reorder and delete each break — and what the ops fix for you
revise/valuesreviseChanging numbers that already exist — one cell, many cells, or raw XML
verify/lintverifyOne of three verification moves, and not the one that catches the worst failure
verify/query-backverifyRead the forecast cells back — an empty grid is the failure no linter reports
verify/reviewverifyEight dimensions, each independently runnable, each demanding cited evidence
present/chartspresentChart blocks, key-value cards, text notes, and the results-first Summary sheet
present/deckspresentHTML slides whose numbers come from the document itself, through typed bindings
present/deliverpresentGetting the result to someone: workbench link, share link, xlsx, pptx
present/layoutpresentSheets, blocks, expansions, formats, and sensitivity: what renders, and where
present/prosepresentWriting the `<Document>` body, and addressing anything in the file from it
overviewreferenceTemplate — three-statement model architecture: sheet layout, item order ranges, and the IS/BS/CF golden loop
assumptionsreferenceTemplate — assumptions sheet: driver categories, order ranges, and why drivers are Values while anything derived is a CalcDef
income-statementreferenceTemplate — income statement items and formulas, revenue through net income
balance-sheetreferenceTemplate — balance sheet items and formulas, plus the assets = liabilities + equity check
cash-flowreferenceTemplate — cash flow statement: operating/investing/financing sections and the cash reconciliation
dcfreferenceTemplate — DCF valuation: free cash flow build, WACC, terminal value, and the equity bridge
scenariosreferenceTemplate — worked bull/base/bear setup: which variables to override and by how much (for the mechanics, read scenario-definitions)
validationreferenceTemplate — integrity check items every model should carry (balance check, cash reconciliation, coverage ratios)
quick-startreferenceTemplate index for financial models — which of the finance-pack templates to read for a 3-statement, DCF or scenario build (to begin a task, read orient/start)
orchestratorreferenceHow to run DeepCell work — what the job is, when it is done, and how to look things up instead of guessing
calc-enginereferenceHow the calc engine recomputes — define relationships, not values
bankreferenceTemplate — bank / NIM model: rate × balance grid, net interest income, efficiency ratio, provision
insurancereferenceTemplate — insurance model: earned premium, loss/expense ratios, combined ratio, underwriting result
reitreferenceTemplate — REIT model: NOI, FFO, AFFO, real-estate depreciation add-back
custom-dimensionsreferenceCustom dimensions — multi-segment analysis (geography, product, unit, channel)
formula-patternsreferenceFormula patterns — advanced modeling constructs and the formula quick guide
xml-schema-referencereferenceXML skeleton for the core sections in document order — Metadata, Status, Context, Items, Calculations, Presentation, Values, Dimensions
build-from-scratchreferenceBuild playbook — starting with no existing .deepcell file, from empty workspace to a valid model
build-on-historicalsreferenceBuild playbook — adding projections on top of categorized historicals produced by an extractor
account-categorizationreferenceMapping a company's own statement labels onto a standard chart of accounts, without editing the extraction
chart-of-accounts-gaapreferenceTemplate — US GAAP standard chart of accounts (order 4000-4299), item ids matching the statement templates
chart-of-accounts-ifrsreferenceTemplate — IFRS standard chart of accounts, and where it diverges from US GAAP
chart-of-accounts-casreferenceTemplate — Chinese Accounting Standards (企业会计准则) chart of accounts for A-share filers
non-gaap-metricsreferenceTemplate — non-GAAP adjusted metrics (order 4300-4399): adjusted EBITDA, net income, and EPS
calc-specificityreferenceCalc status & scenario specificity — how multiple calcs for one (item, context) slot are disambiguated
status-resolutionreferenceWhich stored status a read answers with — the read side of the status axis, and the diagnostics emitted when it had to choose
status-semanticsreferenceWhat a status MEANS — the archetype vocabulary on <Status> and the period state on <Context>, which replaced guessing from id spelling
itemsreferenceItemDefinitions — data types, scale, currency, and value conventions
functionsreferenceBuilt-in formula functions reference
syncreferenceLocal sync workflow (clone, pull, push)
exit-codesreferenceWhat a nonzero exit means per command — written-but-invalid vs rolled-back vs partial
presentationsreferencePresentationDefinitions — core Sheet/Block layout, membership, ordering, and coverage
presentation-expansionsreferencePresentation block expansions — status/scenario columns and custom-dimension rows
presentation-chartsreferencePresentation charts, dashboards, key-value/text blocks, and results-first summaries
decksreferenceHTML Deck structure, typed bindings, slide markup, static charts, and security
deck-stylingreferenceHTML Deck institutional house style — layout, typography, palette, charts, and CSS starter
deck-authoringreferenceHTML Deck CLI authoring, validation, viewer deep links, limits, and troubleshooting
surface-ownershipreferenceWho owns a number, a conclusion, a paragraph and a slide — the cross-surface editing contract
document-authoringreference<Document> prose — the link-everything rule, the markdown dialect, anchors, embeds, and the CLI
deepcell-urireferenceThe deepcell: reference — grammar, per-kind locators, the formula-grammar conversion, and id rules
data-sourcesreferenceSourceDefinitions — where a number came from; the one place an outward address lives
scenario-definitionsreferenceScenarioDefinitions — what-if scenario analysis
format-definitionsreferenceFormatDefinitions — cell formatting rules for viewer and Excel export
format-precedencereferenceFormatDefinitions — precedence chain, FormatStatus inference, number-format resolution
reasoningreferenceReasoning — typed knowledge graph (Claim, Assumption, Evidence, Argument)
reasoning-anti-patternsreferenceCommon reasoning mistakes with corrected examples
reasoning-checklistreferencePre-build checklist for valid <Reasoning> sections
sharingreferenceShare links — give anyone a browser view of one file (incl. anonymous sessions)
viewerreferenceWeb viewer — view .deepcell files in the browser
replacereferenceString-replacement editing with deepcell replace
uploadreferenceUploading and creating .deepcell files (write and import commands)
schema-matchingreferenceMapping external data (xlsx/csv) to .deepcell item and context dimensions
values-vs-defs-opsreferenceTwo-call pattern: /batch-edit (Values) vs /apply-defs-ops (structural)
sensitivityreferenceSensitivity blocks — 2-variable data tables, 1-variable data tables, scenario comparisons
house-rulesreferenceHouse rules — the non-negotiable invariants every model must satisfy
review-dimensionsreferenceReview dimensions — the model audit checklist (integrity, formulas, coverage, sanity, grounding, reasoning, intent, presentation)
model-scopesreferenceChoosing model scope — P&L+DCF default, 3-statement triggers, industry models
sec-extractionreferenceSEC extraction — raw historical layer, model mapping layer, provenance rules
cn-extractionreferenceA-share (cninfo) extraction — CAS statements from report PDFs, #page deep links, canonical item map
excel-importreferenceExcel import — dimension mapping, formula conversion, excel_import provenance

Every command

Every command, with the shape of its invocation, its flags and their defaults, what each exit code means, and one runnable example. The whole catalog is also one call away as machine-readable data — worth caching once instead of paying for a round trip per command:

deepcell help

account delete

Permanently delete your account and everything it owns.

deepcell account delete
FlagTypeDefaultWhat it does
--confirm-email <confirm_email>textYour account email. Prompted for if omitted.
--password <password>textAccount password. Prompted for if the account has one.
--yesbooleanSkip the interactive 'this is irreversible' confirmation.

Exit codes: 0 — completed

account export

Download every record DeepCell holds about your account.

deepcell account export
FlagTypeDefaultWhat it does
--output <out_path>fileWrite the export to this file instead of stdout.

Exit codes: 0 — completed

assumption impact

List Claims that depend_on ASSUMPTION_ID.

deepcell assumption impact <filename> <assumption_id>

deepcell assumption impact model.deepcell a_hiring

Exit codes: 0 — completed · 2 — unparseable-document

cat

Print file content (XML) to stdout.

deepcell cat <filename>

deepcell cat model.deepcell
FlagTypeDefaultWhat it does
--revision <revision>textShow file at specific revision.
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed

cell-meta

Show metadata for a single cell (formula, dependencies, data source).

deepcell cell-meta <filename> [item_ref_pos] [context_ref_pos]

deepcell cell-meta model.deepcell Revenue FY2026E
FlagTypeDefaultWhat it does
--item <item_opt>textItem ref (alternative to the ITEM_REF positional).
--context <context_opt>textContext ref (alternative to the CONTEXT_REF positional).
--status <status_ref>textStatus reference (e.g. 'actual'). A CONSTRAINT, not a hint: the read may answer from that bucket or the untagged one, never from a third. Omit to let the document decide which status answers.
--scenario <scenario_ref>textScenario dimension (omit for the base cell).
--custom-dimensions <custom_dimensions>textCustom dimensions as 'dim:member;dim:member', e.g. 'geography:na'.

Exit codes: 0 — completed

claim falsified

List every Claim in FILENAME whose status is `falsified`.

deepcell claim falsified <filename>

deepcell claim falsified model.deepcell

Exit codes: 0 — completed · 2 — unparseable-document

claim history

Walk the supersedes chain backwards from CLAIM_ID (newest first).

deepcell claim history <filename> <claim_id>

deepcell claim history model.deepcell <claim_id>

Exit codes: 0 — completed · 2 — unparseable-document

claim variant

Show your view of CLAIM_ID beside the consensus it is a variant of.

deepcell claim variant <filename> <claim_id>

deepcell claim variant model.deepcell <claim_id>

Exit codes: 0 — completed · 2 — unparseable-document

clone

Clone a workspace to a local folder.

deepcell clone <slug> [directory]

deepcell clone <slug>

Exit codes: 0 — completed

commit

Commit changes staged on the server by something other than you.

deepcell commit
FlagTypeDefaultWhat it does
--message <message>textCommit message.

Exit codes: 0 — completed · 1 — written-but-invalid

defs add-axis-member

Add a row or a column to a Block.

deepcell defs add-axis-member <filename> --sheet <sheet_id> --block <block_id> --axis <axis> --member <member> --ref <ref>

deepcell defs add-axis-member model.deepcell --sheet variance --block revenue_table --axis rows --member item --ref Gross_Profit
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId to edit.
--axis <axis>rows | columnsrequiredWhich axis to edit: 'rows' (the block's @itemOrders) or 'columns' (its @contextRefs).
--member <member>item | contextrequiredWhat kind of id --ref is. Pair 'item' with rows, 'context' with columns.
--ref <ref>textrequiredThe item id or context id to add.
--index <index>integer range0-based position on the axis (default: append at the end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-block

Add a presentation Block (table or chart) to a sheet.

deepcell defs add-block <filename> --sheet <sheet_id> --block-type <block_type> --name <name>

deepcell defs add-block model.deepcell --sheet variance --block-type table --name 'Revenue vs budget' --item-orders Revenue,COGS --context-refs FY2025,FY2026
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet to add the block to.
--block-type <block_type>textrequiredOne of: table, chart, sensitivity, key_value, text. The server stores any string, but the renderer skips a block whose type it does not know, so anything else is written and never drawn.
--name <name>textrequiredDisplay name / section heading.
--item-orders <item_orders>textComma-separated item ids forming the block's rows, in order (e.g. 'revenue,cogs,gross_profit'). Omit and the block renders empty — see the note above.
--context-refs <context_refs>textComma-separated context ids forming the block's columns, in order (e.g. 'FY2024,FY2025'). Omit to show every context.
--index <index>integerInsertion index within the sheet (default: append at the end).
--chart-type <chart_type>bar | bar_stacked | bar_horizontal | line | area | pie | donut | waterfall | range_barChart type (chart blocks only). 'waterfall' bridges deltas between declared totals; 'range_bar' draws a low..high band per category (the football field).
--category-axis <category_axis>context | itemWhich dimension is the category axis (chart blocks only).
--grid-span <grid_span>single | fullDashboard layout footprint (chart blocks only).
--total-item-refs <total_item_refs>textWhitespace/comma-separated refs naming the plotted categories that rest on the baseline instead of floating on the running sum (--chart-type=waterfall only). Declared, never inferred: omit it and every step is a delta.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-calc

Add a CalculationDefinition (formula).

deepcell defs add-calc <filename> --item <item_id> --formula <formula>

deepcell defs add-calc model.deepcell --item Revenue --calc-id calc_revenue --formula 'Units_Sold[CURRENT] * Unit_Price[CURRENT]' --status projected
FlagTypeDefaultWhat it does
--item <item_id>textrequiredItem the calc resolves into (itemId).
--calc-id <calc_id>textStable calcId for the new calc (e.g. 'calc_stress_low'). Errors if the id is already taken. Omit to let the server assign one — but an auto id is what `defs delete-calc` and a claim's --calc-ref must then quote, so choose your own when the calc has to be citable.
--formula <formula>textrequiredJingwei formula, e.g. "Revenue[PREVIOUS] * 1.1".
--context <context_ref>textPin calc to one or more contextRefs. Pass a CSV (e.g. 'FY25,FY26,FY27') to pin a roll-forward chain to several periods in one call — omit the seed period so its literal is kept. Omit entirely to fan out across every period the item lacks a literal value.
--scenario <scenario_ref>textLimit calc to this scenarioRef.
--status <status_ref>textPin calc to a statusRef (e.g. 'projected'). Strongly recommended for forecast formulas so they coexist with the historical actuals in the same item/context slots — without it the projection stores one untagged cell that answers every status, leaving the actuals nowhere to sit. Not enforced: omitting it succeeds, and the cost shows up later as an actual you cannot store.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-context

Add a ContextDefinition — a period, or a non-temporal axis member.

deepcell defs add-context <filename>

deepcell defs add-context model.deepcell --name FY2025 --context FY2025 --kind period --state closed --status actual
FlagTypeDefaultWhat it does
--name <name>textThe context IDENTIFIER (@contextId), e.g. 'Low_Rent' — not a display label. Must satisfy the reference-id grammar. Set the readable name afterwards with `defs update-context --label`.
--status <status_ref>textstatusRef (optional).
--context <context_ref>textExplicit contextRef (else server-assigned).
--kind <kind>textContext kind. Omit (or 'period' / temporal alias) for time columns; pass 'program', 'segment', 'fund', 'region', 'entity', 'product', 'other' (or any snake_case label, ≤32 chars) for non-temporal axes. Always written as @kind on the <Context> element.
--state <state>textPeriod state: closed | open | future. This is what says whether the period is over — the question the A/E suffix on a context id used to answer by accident. Only meaningful for --kind period.
--as-of <as_of>textISO YYYY-MM-DD the period's numbers are stated as of. Documentation and lint input only; never consulted when rendering.
--index <index>integerPosition in contexts list (omit to append at end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-doc

Add a <Document> — the prose that ships with the model.

deepcell defs add-doc <filename>

deepcell defs add-doc model.deepcell --doc-id variance_note --name 'July variance note' --lang en --body-file variance-note.md
FlagTypeDefaultWhat it does
--doc-id <doc_id>textDocument identifier (@docId). Must match [A-Za-z0-9_.-]+ so a deepcell:doc/<id> reference to it parses back.
--name <name>textDisplay title.
--lang <lang>textBCP-47 language tag, e.g. 'en' or 'zh'.
--body-file <body_file>fileFile holding the initial markdown body (else empty).
--index <index>integerPosition among documents.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-format

Add a <Format formatId="..."> to FormatDefinitions.

deepcell defs add-format <filename> <format_id>

deepcell defs add-format model.deepcell fmt_statement --rule 'default:fontName=Arial'
FlagTypeDefaultWhat it does
--rule <rule_strs>textOne rule as semicolon-separated key=value pairs, e.g. 'target=default; font_color=#000000; number_format=#,##0'. Commas inside a value (such as Excel number formats) are preserved. Repeat the flag for multiple rules. Keys: target, font_color, background_color, font_weight, font_style, font_name, font_size, text_align, indent, number_format, border_top/bottom/left/right.
--inheritboolean--no-inherit opts the Format out of the IB default base (a total custom theme; writes @inherit="false"). Default inherits the base (add-on model). See `deepcell guide format-precedence`.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-item

Add an ItemDefinition (no value).

deepcell defs add-item <filename> --name <name>

deepcell defs add-item model.deepcell --name Revenue --label Revenue --data-type monetary --scale 6 --currency USD --order-mode append
FlagTypeDefaultWhat it does
--name <name>textrequiredItem name (itemId basis).
--label <label>textDisplay label (e.g. 'Gross Margin %'); defaults to a humanized form of --name.
--level <level>integerHierarchy level (0-3).
--parent <parent_item_id>textParent itemId (omit for root).
--index <index>integerPosition among siblings (omit to append at end).
--order <order>integerExplicit @order (must be unique; presentation blocks address rows by order ranges). Overrides --index placement.
--order-mode <order_mode>append'append' assigns max(existing orders) + 10 — no need to know which orders are taken. Mutually exclusive with --order; overrides --index.
--data-type <data_type>textDataType element (e.g. 'monetary', 'percentage', 'number').
--unit <unit>textUnit element (e.g. '%', 'hours', 'tonnes').
--scale <scale>integerScale element (units multiplier exponent).
--currency <currency>textCurrency element (ISO code, e.g. 'USD').
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-period

Add a ContextDefinition (period, or non-temporal axis member).

deepcell defs add-period <filename>

deepcell defs add-period model.deepcell --name FY2026 --context FY2026 --state future --status projected
FlagTypeDefaultWhat it does
--name <name>textThe period IDENTIFIER (@contextId), e.g. FY2027E — not a display label. Must satisfy the reference-id grammar. Set the readable name afterwards with `defs update-context --label`.
--status <status_ref>textstatusRef (e.g. 'projected').
--context <context_ref>textExplicit contextRef (else server-assigned).
--kind <kind>textContext kind. Omit (or pass 'period' / a temporal alias like 'time' / 'year' / 'annual' / 'fy') for time columns; pass e.g. 'program', 'segment', 'fund', 'region', 'entity', 'product', 'other' (or any snake_case label, ≤32 chars) for non-temporal axes. Always written as @kind on the <Context> element.
--state <state>textPeriod state: closed | open | future. This is what says whether the period is over — the question the A/E suffix on a context id used to answer by accident. Only meaningful for --kind period.
--as-of <as_of>textISO YYYY-MM-DD the period's numbers are stated as of. Documentation and lint input only; never consulted when rendering.
--index <index>integerPosition in contexts list (omit to append at end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-rule

Add a <Rule> to an existing <Format>.

deepcell defs add-rule <filename> <format_id> --target <target>

deepcell defs add-rule model.deepcell fmt_statement --target 'level:0:item' --font-weight bold --number-format '#,##0'
FlagTypeDefaultWhat it does
--target <target>textrequiredRule @target selector (see `deepcell guide format-definitions`).
--bg-color <background_color>textHex color '#RRGGBB' for backgroundColor.
--font-color <font_color>textHex color '#RRGGBB' for fontColor.
--font-weight <font_weight>texte.g. 'bold' / 'normal'.
--font-style <font_style>texte.g. 'italic' / 'normal'.
--font-name <font_name>textFont family name.
--font-size <font_size>floatFont size in points.
--text-align <text_align>text'left' | 'center' | 'right'.
--indent <indent>integerIndent character count.
--number-format <number_format>textExcel-style pattern, e.g. '#,##0'.
--border-top <border_top>texte.g. 'thin #000000' (style + optional hex color).
--border-bottom <border_bottom>textBottom border, e.g. 'thin #000000' (style + optional hex color).
--border-left <border_left>textLeft border, e.g. 'thin #000000' (style + optional hex color).
--border-right <border_right>textRight border, e.g. 'thin #000000' (style + optional hex color).
--index <index>integerInsert position (omit to append).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-scenario

Add a ScenarioDefinition.

deepcell defs add-scenario <filename>

deepcell defs add-scenario model.deepcell --name downside
FlagTypeDefaultWhat it does
--name <name>textThe scenario IDENTIFIER (@scenarioId), e.g. 'Bull' — not a display label. Must satisfy the reference-id grammar. Set the readable name afterwards with `defs update-scenario --label`.
--base <base_scenario_ref>text(removed) @baseScenarioRef no longer exists — see `deepcell guide scenario-definitions`.
--context <context_ref>textExplicit contextRef.
--is-defaultbooleanMark as the document's default scenario — clears @isDefault from every other scenario.
--index <index>integerPosition (omit to append at end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-sensitivity

Add a sensitivity block (data table / scenario comparison).

deepcell defs add-sensitivity <filename> --sheet <sheet_id> --name <name> --spec-file <spec_file>

deepcell defs add-sensitivity model.deepcell --sheet summary --name 'IRR sensitivity' --spec-file sensitivity.json
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet to add the block to.
--name <name>textrequiredDisplay name of the sensitivity block.
--index <index>integerPosition among sheet blocks (omit to append at end).
--format-ref <format_ref>textFormatDefinitions id.
--spec-file <spec_file>filenamerequiredJSON with {"axes": [...], "outputs": [...]} (use "-" for stdin).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-sheet

Add a presentation Sheet — a tab in the rendered document.

deepcell defs add-sheet <filename> --label <label>

deepcell defs add-sheet model.deepcell --label 'Variance review' --index 1
FlagTypeDefaultWhat it does
--label <label>textrequiredSheet tab label, e.g. 'Dashboard'.
--index <index>integer range0-based position among the sheets (default: append at the end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-source

Declare a <Source> - the one place an outward address may live.

deepcell defs add-source <filename> --id <source_id>

deepcell defs add-source model.deepcell --id <source_id>
FlagTypeDefaultWhat it does
--id <source_id>textrequiredStable sourceId, e.g. 'src_aapl_10k_fy25'.
--kind <kind>textWhat the source physically IS - closed set: filing, webpage, pdf, workbook, dataset, query, transcript, media, message, document, person, derived, other. What it is USED AS goes in --role.
--role <role>textWhat the source is being used AS - free text: historical_actual, assumption, analyst_estimate, management_guidance, industry_benchmark, market_data, manual, ...
--reach <reach>textCan a recipient open it? public | account | private | offline. 'private' withholds the locator on share and export; 'offline' means no locator exists, which is a complete record, not a broken one.
--title <title>textHuman-readable title - what renders when the locator is withheld.
--locator <locator>textThe one outward address (URL, path, DSN).
--description <description>textLonger note about the source.
--at <at>textDefault position inside the source: text:HEADING[,SUFFIX] | page:47 | sheet:Name!A1:B9 | row:1042 | col:arr | t:00:14:32 | anchor:id.
--effective-date <effective_date>textISO date the source describes.
--retrieved-at <retrieved_at>textISO timestamp it was fetched.
--issuer <issuer>textWho published it.
--ticker <issuer_ticker>textIssuer ticker symbol.
--identity <identities>textDeclared identity as 'scheme:value' (e.g. 'sec.accession:0000320193-25-000079'). Repeatable.
--items <item_refs>textCSV of itemRefs this source backs.
--contexts <context_refs>textCSV of contextRefs. Omit to cover every context the statusRef allows.
--status <status_ref>textstatusRef for the coverage row.
--scenario <scenario_ref>textscenarioRef for the coverage row.
--custom-dimensions <custom_dimensions>text'dim:member;dim:member' for the coverage row.
--index <index>integerPosition (omit to append at end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs add-status

Add a StatusDefinition.

deepcell defs add-status <filename>

deepcell defs add-status model.deepcell --name Budget --ref budget --archetype budget --authority derived
FlagTypeDefaultWhat it does
--name <name>textThe status IDENTIFIER (@statusId), e.g. 'Forecast' — not a display label. Must satisfy the reference-id grammar. Set the readable name afterwards with `defs update-status --label`.
--ref <status_ref>textExplicit statusRef.
--color <color>text(removed) color is a FormatDefinitions concern — see `deepcell defs add-format`.
--is-defaultbooleanMark as the document's default status — clears @isDefault from every other status.
--archetype <archetype>textWhat this status MEANS: actual | preliminary | restated | estimate | guidance | consensus | forecast | budget | plan | target. Its realized/expected nature is derived from it. Omitting it leaves the meaning to be guessed from the id's spelling — see `deepcell ref status`.
--assurance <assurance>textOptional refinement: audited | reviewed | unaudited.
--authority <authority>textOptional refinement — who asserted the number: reported | derived | guidance | consensus | third_party.
--index <index>integerPosition (omit to append at end).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs apply

Apply a batch of ops atomically.

deepcell defs apply <filename>

deepcell defs apply model.deepcell --ops-file ops.json --dry-run
FlagTypeDefaultWhat it does
--ops-file <ops_file>filenameJSON file with an `ops` array (use '-' for stdin).
--ops <ops_inline>textInline ops JSON (same shapes as --ops-file); mirrors the agent tool's `defs apply --ops '<json>'` form.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-axis-member

Remove a row or a column from a Block.

deepcell defs delete-axis-member <filename> --sheet <sheet_id> --block <block_id> --axis <axis> --ref <ref>

deepcell defs delete-axis-member model.deepcell --sheet variance --block revenue_table --axis rows --ref Gross_Profit
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId to edit.
--axis <axis>rows | columnsrequiredWhich axis to edit: 'rows' (the block's @itemOrders) or 'columns' (its @contextRefs).
--ref <ref>textrequiredThe item id or context id to remove.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-block

Delete a Block from a Sheet.

deepcell defs delete-block <filename> --sheet <sheet_id> --block <block_id>

deepcell defs delete-block model.deepcell --sheet <sheet_id> --block <block_id>
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId to delete.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-calc

Delete a CalculationDefinition by calcId.

deepcell defs delete-calc <filename> <calc_id>

deepcell defs delete-calc model.deepcell <calc_id>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-context

Delete a Context (period or non-temporal axis member).

deepcell defs delete-context <filename> <context_ref>

deepcell defs delete-context model.deepcell <context_ref>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-doc

Delete a Document and its body.

deepcell defs delete-doc <filename> <doc_id>

deepcell defs delete-doc model.deepcell <doc_id>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-format

Delete a <Format> by formatId.

deepcell defs delete-format <filename> <format_id>

deepcell defs delete-format model.deepcell <format_id>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-item

Delete an item, and with --cascade its descendants too.

deepcell defs delete-item <filename> <item_id>

deepcell defs delete-item model.deepcell Revenue --cascade
FlagTypeDefaultWhat it does
--cascadebooleanAlso delete all descendants.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-rule

Delete a <Rule> by index or by @target.

deepcell defs delete-rule <filename> <format_id>

deepcell defs delete-rule model.deepcell <format_id>
FlagTypeDefaultWhat it does
--index <index>integerDelete the rule at this position.
--target <target>textDelete the first rule with this @target.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-scenario

Delete a ScenarioDefinition by its contextRef.

deepcell defs delete-scenario <filename> <scenario_ref>

deepcell defs delete-scenario model.deepcell <scenario_ref>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-sheet

Delete a presentation Sheet and every Block on it.

deepcell defs delete-sheet <filename> <sheet_id>

deepcell defs delete-sheet model.deepcell <sheet_id>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-source

Remove a <Source>.

deepcell defs delete-source <filename> --id <source_id>

deepcell defs delete-source model.deepcell --id <source_id>
FlagTypeDefaultWhat it does
--id <source_id>textrequiredsourceId to delete.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs delete-status

Delete a StatusDefinition by its statusRef.

deepcell defs delete-status <filename> <status_ref>

deepcell defs delete-status model.deepcell <status_ref>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs header set

Set or replace a Header property.

deepcell defs header set <filename> <key> <value>

deepcell defs header set model.deepcell <key> <value>
FlagTypeDefaultWhat it does
--type <prop_type>string | number | boolean | datetimestringProperty type tag written into <Property @type>.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs header unset

Delete a Header property.

deepcell defs header unset <filename> <key>

deepcell defs header unset model.deepcell <key>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs list

List what the document DEFINES: items, calcs, contexts, scenarios, statuses.

deepcell defs list <filename>

deepcell defs list model.deepcell
FlagTypeDefaultWhat it does
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed · 1 — read-only-check

defs rename-block

Change a Block's display name — its section heading in the render.

deepcell defs rename-block <filename> <new_name> --sheet <sheet_id> --block <block_id>

deepcell defs rename-block model.deepcell <new_name> --sheet <sheet_id> --block <block_id>
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId to rename.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-context

Rename a Context's @contextId; references cascade.

deepcell defs rename-context <filename> <context_ref> <new_name>

deepcell defs rename-context model.deepcell <context_ref> <new_name>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-dimension

Rename a custom Dimension's @dimensionId.

deepcell defs rename-dimension <filename> <dimension_id> <new_name>

deepcell defs rename-dimension model.deepcell <dimension_id> <new_name>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-item

Rename an item's stable identifier; references cascade.

deepcell defs rename-item <filename> <item_id> <new_name>

deepcell defs rename-item model.deepcell Revenue Total_Revenue
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-member

Rename one Member's @memberId within a custom Dimension.

deepcell defs rename-member <filename> <dimension_id> <member_id> <new_name>

deepcell defs rename-member model.deepcell <dimension_id> <member_id> <new_name>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-scenario

Rename a scenario's IDENTIFIER (@scenarioId); references cascade.

deepcell defs rename-scenario <filename> <scenario_ref> <new_name>

deepcell defs rename-scenario model.deepcell downside bear
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-sheet

Change a Sheet's displayed tab label.

deepcell defs rename-sheet <filename> <sheet_id> <new_label>

deepcell defs rename-sheet model.deepcell <sheet_id> <new_label>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs rename-status

Change a status's IDENTIFIER (@statusId); references cascade.

deepcell defs rename-status <filename> <status_ref> <new_name>

deepcell defs rename-status model.deepcell <status_ref> <new_name>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs reorder-axis-member

Move a row or a column to a new position within a Block.

deepcell defs reorder-axis-member <filename> --sheet <sheet_id> --block <block_id> --axis <axis> --ref <ref> --to-index <to_index>

deepcell defs reorder-axis-member model.deepcell --sheet variance --block revenue_table --axis rows --ref Gross_Profit --to-index 0
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId to edit.
--axis <axis>rows | columnsrequiredWhich axis to edit: 'rows' (the block's @itemOrders) or 'columns' (its @contextRefs).
--ref <ref>textrequiredThe item id or context id to move.
--to-index <to_index>integer rangerequiredFinal 0-based position on the axis. 0 = first row / leftmost column.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs reorder-block

Move a Block to a new position within its Sheet.

deepcell defs reorder-block <filename> --sheet <sheet_id> --block <block_id> --to-index <to_index>

deepcell defs reorder-block model.deepcell --sheet variance --block revenue_table --to-index 0
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId to move.
--to-index <to_index>integer rangerequiredFinal 0-based position among the sheet's blocks. 0 = topmost.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs reorder-contexts

Move a Context to a new position in the contexts list.

deepcell defs reorder-contexts <filename> <context_ref> <to_index>

deepcell defs reorder-contexts model.deepcell <context_ref> <to_index>
FlagTypeDefaultWhat it does
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs reorder-item

Move an item to a new position among its siblings (final-position index).

deepcell defs reorder-item <filename> <item_id> --to-index <to_index>

deepcell defs reorder-item model.deepcell Revenue --to-index 0
FlagTypeDefaultWhat it does
--to-index <to_index>integerrequiredFinal 0-based position among the item's siblings. 0 = first. Lets you place a referenced item before its referencer (avoids a forward item-order reference).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs reorder-scenarios

Move a scenario to a new position in the scenario list.

deepcell defs reorder-scenarios <filename> <scenario_ref> --to-index <to_index>

deepcell defs reorder-scenarios model.deepcell <scenario_ref> --to-index <to_index>
FlagTypeDefaultWhat it does
--to-index <to_index>integer rangerequiredFinal 0-based position among the scenarios. 0 = first.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs reorder-sheets

Move a Sheet to a new position in the tab order.

deepcell defs reorder-sheets <filename> <sheet_id> --to-index <to_index>

deepcell defs reorder-sheets model.deepcell variance --to-index 0
FlagTypeDefaultWhat it does
--to-index <to_index>integer rangerequiredFinal 0-based position among the sheets. 0 = leftmost tab.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs set-block-attrs

Set presentation-layout attributes on an existing block.

deepcell defs set-block-attrs <filename> --sheet <sheet_id> --block <block_id>

deepcell defs set-block-attrs model.deepcell --sheet variance --block revenue_table --status-refs actual,budget --status-expansion columns
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId of the block to edit.
--status-expansion <status_expansion>none | columnsSide-by-side status-column layout. 'columns' lays each status in --status-refs out as its own run of context columns; 'none' (default) keeps the single-column-per-context layout.
--status-refs <status_refs>textWhitespace/comma-separated status ids to expand into columns (e.g. "actual budget"). Required for --status-expansion=columns.
--dim-expansion <dim_expansion>none | rowsCustom-dimension member sub-rows. 'rows' lays each member of --dim-ref out as a contiguous sub-row under its item; 'none' (default) keeps the one-row-per-item layout.
--dim-ref <dim_ref>textDimension id whose members are expanded into sub-rows (e.g. "geography"). Required for --dim-expansion=rows.
--dim-expansion-cap <dim_expansion_cap>integer rangeMax members to expand into sub-rows before falling back to a single row (positive int; default 24). Used with --dim-expansion=rows.
--scenario-expansion <scenario_expansion>none | columnsSide-by-side scenario-column layout. 'columns' lays each scenario in --scenario-refs out as its own run of context columns; 'none' (default) keeps the single-column-per-context layout.
--scenario-refs <scenario_refs>textWhitespace/comma-separated scenario ids to expand into columns (e.g. "Base Bull"). Required for --scenario-expansion=columns.
--chart-type <chart_type>bar | bar_stacked | bar_horizontal | line | area | pie | donut | waterfall | range_barChart type (chart blocks only). 'waterfall' bridges deltas between declared totals; 'range_bar' draws a low..high band per category (the football field).
--category-axis <category_axis>context | itemWhich dimension is the category axis (chart blocks only).
--grid-span <grid_span>single | fullDashboard layout footprint (chart blocks only).
--total-item-refs <total_item_refs>textWhitespace/comma-separated refs naming the plotted categories that rest on the baseline instead of floating on the running sum (--chart-type=waterfall only). Declared, never inferred: omit it and every step is a delta.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs set-format

Set cell/row/column formatting (resolves the governing <Format>).

deepcell defs set-format <filename> --sheet-id <sheet_id> --item-ref <item_ref> --scope <scope>

deepcell defs set-format model.deepcell --sheet-id ic --block-id deal_summary --item-ref Entry_Multiple --scope item --number-format '0.0x' --bold
FlagTypeDefaultWhat it does
--sheet-id <sheet_id>textrequiredSheet id of the cell.
--block-id <block_id>textGoverning block id (resolves @formatRef).
--item-ref <item_ref>textrequiredItem ref of the cell.
--context-ref <context_ref>textContext ref (required for cell/column scope).
--scope <scope>cell | item | contextrequiredcell:ITEM:CONTEXT | item:ITEM | context:CONTEXT
--number-format <number_format>textExcel pattern, e.g. '#,##0'.
--font-name <font_name>textFont family name.
--font-size <font_size>floatFont size in points.
--boldbooleanSet/clear bold.
--italicbooleanSet/clear italic.
--fg-color <fg_color>textText hex '#RRGGBB'.
--bg-color <bg_color>textFill hex '#RRGGBB'.
--text-align <text_align>text'left'|'center'|'right'.
--indent <indent>integerIndent character count.
--border-top <border_top>texte.g. 'thin #000000'.
--border-bottom <border_bottom>textBottom border, e.g. 'thin #000000' (style + optional hex color).
--border-left <border_left>textLeft border, e.g. 'thin #000000' (style + optional hex color).
--border-right <border_right>textRight border, e.g. 'thin #000000' (style + optional hex color).
--clear <clear>textToken name to revert to inherit (repeatable).
--clear-allbooleanDelete the target's rule entirely.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs set-source-cites

Replace which cells a <Source> backs.

deepcell defs set-source-cites <filename> --id <source_id>

deepcell defs set-source-cites model.deepcell --id <source_id>
FlagTypeDefaultWhat it does
--id <source_id>textrequiredsourceId whose coverage to replace.
--items <item_refs>textCSV of itemRefs this source backs.
--contexts <context_refs>textCSV of contextRefs. Omit to cover every context the statusRef allows.
--status <status_ref>textstatusRef for the coverage row.
--scenario <scenario_ref>textscenarioRef for the coverage row.
--custom-dimensions <custom_dimensions>text'dim:member;dim:member' for the coverage row.
--at <at>textPosition override for this coverage row.
--clearbooleanRemove every coverage row instead of setting one.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs show

Show one item's ItemDef and every CalcDef that governs it.

deepcell defs show <filename> <item_id>

deepcell defs show model.deepcell Revenue
FlagTypeDefaultWhat it does
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed · 1 — read-only-check

defs update-calc

Patch a CalcDef; only the fields you pass are changed.

deepcell defs update-calc <filename> <calc_id>

deepcell defs update-calc model.deepcell calc_revenue --formula 'Units_Sold[CURRENT] * Unit_Price[CURRENT] * 1.02'
FlagTypeDefaultWhat it does
--formula <formula>textReplace the formula.
--context <context_ref>textChange contextRef.
--scenario <scenario_ref>textChange scenarioRef.
--status <status_ref>textChange statusRef (e.g. 'projected'). Pass '' to clear.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-context

Patch a Context's name / status / kind; only fields you pass are sent.

deepcell defs update-context <filename> <context_ref>

deepcell defs update-context model.deepcell FY2025 --state closed --as-of 2025-12-31
FlagTypeDefaultWhat it does
--name <name>textRename the contextId; references cascade. NOT the display name — see --label.
--label <new_label>textChange the context's DISPLAY LABEL (emits set_context_label). The contextId is untouched — use --name to change the identifier.
--status <status_ref>textSet statusRef.
--clear-statusbooleanClear statusRef (explicit-null).
--kind <kind>textContext kind. Omit / null / 'period' / temporal alias collapses to canonical 'period'; any other snake_case label marks a non-temporal context. Always written to @kind.
--state <state>textPeriod state: closed | open | future. This is what says whether the period is over — the question the A/E suffix on a context id used to answer by accident. Only meaningful for --kind period.
--as-of <as_of>textISO YYYY-MM-DD the period's numbers are stated as of. Documentation and lint input only; never consulted when rendering.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-doc

Update a Document's attributes.

deepcell defs update-doc <filename> <doc_id>

deepcell defs update-doc model.deepcell <doc_id>
FlagTypeDefaultWhat it does
--name <name>textNew display title.
--lang <lang>textNew BCP-47 language tag.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-format

Rename a <Format> and/or toggle its IB-default inheritance.

deepcell defs update-format <filename> <format_id>

deepcell defs update-format model.deepcell <format_id>
FlagTypeDefaultWhat it does
--new-id <new_id>textNew formatId; cascades through every <Block @formatRef>.
--inheritbooleanToggle the IB default base. --no-inherit makes this a total custom theme (@inherit="false"); --inherit returns to the add-on default. See `deepcell guide format-precedence`.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-item

Patch an item; only fields you pass are sent.

deepcell defs update-item <filename> <item_id>

deepcell defs update-item model.deepcell Revenue --scale 3 --currency USD
FlagTypeDefaultWhat it does
--name <name>textRename the itemId; references cascade. Equivalent to `defs rename-item`.
--label <new_label>textChange the item's DISPLAY LABEL (emits set_item_label). The itemId is untouched — use `defs rename-item` to change the identifier.
--level <level>integerChange hierarchy level.
--parent <parent_item_id>textChange parent itemId.
--clear-parentbooleanMake item a root (explicit-null parentItemId).
--data-type <data_type>textSet DataType element (e.g. 'monetary', 'percentage', 'number').
--unit <unit>textSet Unit element (e.g. '%', 'hours', 'tonnes').
--scale <scale>integerSet Scale element.
--currency <currency>textSet Currency element (ISO code).
--clear-data-typebooleanRemove the DataType element (explicit-null).
--clear-unitbooleanRemove the Unit element (explicit-null).
--clear-scalebooleanRemove the Scale element (explicit-null).
--clear-currencybooleanRemove the Currency element (explicit-null).
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-scenario

Patch a scenario; only the fields you pass are sent.

deepcell defs update-scenario <filename> <scenario_ref>

deepcell defs update-scenario model.deepcell downside --label 'Bear case'
FlagTypeDefaultWhat it does
--name <name>textRename the scenarioId; references cascade. Equivalent to `defs rename-scenario`. NOT the display name — see --label.
--label <new_label>textChange the scenario's DISPLAY LABEL (emits set_scenario_label). The scenarioId is untouched — use --name to change the identifier.
--is-defaultbooleanMake this the document's default scenario (clears @isDefault from every other scenario), or strip the flag from this one.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-sensitivity

Edit a sensitivity block's name, format, or axes/outputs.

deepcell defs update-sensitivity <filename> --sheet <sheet_id> --block <block_id>

deepcell defs update-sensitivity model.deepcell --sheet <sheet_id> --block <block_id>
FlagTypeDefaultWhat it does
--sheet <sheet_id>textrequiredSheet containing the block.
--block <block_id>textrequiredblockId of the block to edit.
--name <name>textNew display name.
--format-ref <format_ref>textNew FormatDefinitions id.
--spec-file <spec_file>filenameJSON with {"axes": [...], "outputs": [...]} to replace both.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-source

Change fields on a <Source>.

deepcell defs update-source <filename> --id <source_id>

deepcell defs update-source model.deepcell --id <source_id>
FlagTypeDefaultWhat it does
--id <source_id>textrequiredsourceId to update.
--kind <kind>textNew @kind (closed set).
--role <role>textNew @role (free text).
--reach <reach>textpublic | account | private | offline.
--title <title>textNew title. Pass '' to clear.
--locator <locator>textNew locator. Pass '' to clear.
--description <description>textNew description. Pass '' to clear.
--at <at>textNew default position.
--effective-date <effective_date>textNew effective date.
--retrieved-at <retrieved_at>textNew retrieval timestamp.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

defs update-status

Patch a status; only the fields you pass are sent.

deepcell defs update-status <filename> <status_ref>

deepcell defs update-status model.deepcell budget --archetype budget --label Budget
FlagTypeDefaultWhat it does
--name <name>textRename the statusId; references cascade. Equivalent to `defs rename-status`. NOT the display name — see --label.
--label <new_label>textChange the status's DISPLAY LABEL (emits set_status_label). The statusId is untouched — use --name to change the identifier.
--is-defaultbooleanMake this the document's default status (clears @isDefault from every other status), or strip the flag from this one.
--archetype <archetype>textWhat this status MEANS: actual | preliminary | restated | estimate | guidance | consensus | forecast | budget | plan | target. Pass an empty string to clear it (and fall back to inference).
--assurance <assurance>textaudited | reviewed | unaudited.
--authority <authority>textreported | derived | guidance | consensus | third_party.
--revision <revision>textExpected revision SHA for optimistic locking.
--workspace <workspace_slug>textOverride active workspace.
--dry-runbooleanValidate only: run the full server-side pipeline (per-op validation, formula parse, post-apply cycle check + recompute) and report errors without persisting anything — no commit, no revision bump.

Exit codes: 0 — completed · 1 — nothing-changed

describe

Show a document's shape: items, contexts, scenarios, statuses, sheets.

deepcell describe <filename>

deepcell describe model.deepcell --lint
FlagTypeDefaultWhat it does
--include-reasoningbooleanAppend a compact summary of the document reasoning graph.
--scenario <scenario_id>textScenario ID whose value overrides to apply.
--lintbooleanInclude canonical structural findings and exit non-zero on findings.
--since <since_revision>textWith --lint: mark each finding pre-existing or new against this revision. Use `HEAD~1` for the commit before yours, or a SHA from `deepcell log`.
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed · 1 — read-only-check

diff

Show diff between two revisions (like git diff).

deepcell diff <revision_a> [revision_b]

deepcell diff <revision_a>
FlagTypeDefaultWhat it does
--file <filename>textFilter diff by filename.

Exit codes: 0 — completed

Show what cites a reference: prose, slides and reasoning, this file only.

deepcell doc backlinks <filename> --target <target>

deepcell doc backlinks model.deepcell --target <target>
FlagTypeDefaultWhat it does
--target <target>textrequiredReference to invert, e.g. 'claim/t_hold'.

Exit codes: 0 — completed

doc blocks

List every block and the id it can be edited by.

deepcell doc blocks <filename>

deepcell doc blocks model.deepcell
FlagTypeDefaultWhat it does
--doc <doc_id>textDocument ID (default: the first).

Exit codes: 0 — completed

doc delete-block

Delete one block.

deepcell doc delete-block <filename> --doc <doc_id> --block <block_id>

deepcell doc delete-block model.deepcell --doc <doc_id> --block <block_id>
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--block <block_id>textrequiredBlock id to delete.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat`.

Exit codes: 0 — completed

doc insert-block

Insert a new block after another one, or at the top of the document.

deepcell doc insert-block <filename> --doc <doc_id> --markdown-file <markdown_file>

deepcell doc insert-block model.deepcell --doc <doc_id> --markdown-file <markdown_file>
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--after <after_block_id>textInsert after this block id. Omit to insert at the top.
--markdown-file <markdown_file>filerequiredFile holding the new block's markdown.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat`.

Exit codes: 0 — completed

List every deepcell: reference, and whether it resolved.

deepcell doc links <filename>

deepcell doc links model.deepcell --doc variance_note --unresolved
FlagTypeDefaultWhat it does
--doc <doc_id>textRestrict to one document.
--unresolvedbooleanOnly references that did not resolve.

Exit codes: 0 — completed

doc lint

Check a document's references.

deepcell doc lint <filename>

deepcell doc lint model.deepcell --doc variance_note --strict
FlagTypeDefaultWhat it does
--doc <doc_id>textRestrict to one document.
--strictbooleanAlso flag numerals that match a modelled value but are typed, not linked.

Exit codes: 0 — completed

doc list

List every <Document> in the file.

deepcell doc list <filename>

deepcell doc list model.deepcell

Exit codes: 0 — completed

doc move-block

Move a block after another one, or to the top.

deepcell doc move-block <filename> --doc <doc_id> --block <block_id>

deepcell doc move-block model.deepcell --doc <doc_id> --block <block_id>
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--block <block_id>textrequiredBlock id to move.
--after <after_block_id>textMove after this block id. Omit to move to the top.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat`.

Exit codes: 0 — completed

doc outline

Print the headings and the anchor each one is addressable by.

deepcell doc outline <filename>

deepcell doc outline model.deepcell --doc variance_note
FlagTypeDefaultWhat it does
--doc <doc_id>textDocument ID (default: the first).

Exit codes: 0 — completed

doc patch-body

Replace one anchored section of a document.

deepcell doc patch-body <filename> --doc <doc_id> --anchor <anchor> --markdown <markdown>

deepcell doc patch-body model.deepcell --doc variance_note --anchor outlook --markdown '## Outlook {#outlook}\n\nQ4 pipeline covers the gap.'
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--anchor <anchor>textrequiredExplicit {#id} anchor of the section to replace.
--markdown <markdown>textrequiredReplacement markdown for that section.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat`.

Exit codes: 0 — completed

doc replace-block

Replace one block, addressed by its id.

deepcell doc replace-block <filename> --doc <doc_id> --block <block_id> --markdown-file <markdown_file>

deepcell doc replace-block model.deepcell --doc <doc_id> --block <block_id> --markdown-file <markdown_file>
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--block <block_id>textrequiredBlock id from `deepcell doc blocks`.
--markdown-file <markdown_file>filerequiredFile holding the replacement markdown.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat`.

Exit codes: 0 — completed

doc set-body

Replace a document's whole markdown body.

deepcell doc set-body <filename> --doc <doc_id> --body-file <body_file>

deepcell doc set-body model.deepcell --doc variance_note --body-file variance-note.md -m 'Rewrite the July variance note'
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--body-file <body_file>filerequiredFile holding the new markdown body.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat` (refuses if the file moved).

Exit codes: 0 — completed

doc show

Print one document.

deepcell doc show <filename>

deepcell doc show model.deepcell --doc variance_note --as markdown
FlagTypeDefaultWhat it does
--doc <doc_id>textDocument ID (default: the first).
--scenario <scenario_id>textScenario to resolve values under.
--as <rendering>text | markdowntextmarkdown keeps the [[deepcell:...]] source; text shows resolved values.
--with-idsbooleanPrefix each block with the id it can be edited by.

Exit codes: 0 — completed

doc stamp-ids

Give every block without an id a stable `{#id}`, so it can be edited.

deepcell doc stamp-ids <filename> --doc <doc_id>

deepcell doc stamp-ids model.deepcell --doc <doc_id>
FlagTypeDefaultWhat it does
--doc <doc_id>textrequiredDocument ID.
--rationale <rationale>textCommit message recording why.
--revision <revision>textCompare-and-swap token from `cat`.

Exit codes: 0 — completed

doctor

Check this machine's setup: version, server, identity, workspace.

deepcell doctor

deepcell doctor -f json
FlagTypeDefaultWhat it does
--timeout <timeout>float10How long to wait for the server probe.

Exit codes: 0 — completed

download

Download a file from the workspace to the local filesystem.

deepcell download <filename>

deepcell download model.deepcell
FlagTypeDefaultWhat it does
--output <out_path>textOutput file path (default: same as filename).
--revision <revision>textDownload file at specific revision.

Exit codes: 0 — completed

edit

Write literal cell values (assumptions, historical actuals).

deepcell edit <filename> [item_ref] [context_ref] [new_value]

deepcell edit model.deepcell Growth_Rate FY2026E 0.12
FlagTypeDefaultWhat it does
--forcebooleanForce-edit a calculated cell (override formula).
--clearbooleanRemove the literal value cell (NEW_VALUE omitted) so a CalcDef can re-govern it.
--status <status_ref>textStatus reference (e.g. 'projected').
--scenario <scenario_ref>textScenario dimension — must be a defined scenarioId (omit for the base cell).
--custom-dimensions <custom_dimensions>textCustom dimensions as 'dim:member;dim:member', e.g. 'geography:na;product_line:ent'.
--batch <batch_file>textBatch edits as a JSON file path, '-' for stdin, or inline JSON (a value starting with '[' or '{').
--revision <revision>textExpected revision SHA for optimistic locking.
--rationale <commit_message>textWhy this edit was made. Written as the commit message body (and a trailer), so history reads as the decision instead of '[batch-edit] Item[Ctx]'. Sent as `rationale`; `-m` / `--message` are aliases of `--rationale`.
--title <commit_title>textShort commit subject (e.g. 'Q3 actuals update'). Combined with --rationale as 'title: rationale'. Rejected with --replace, which takes a single undivided commit message.
--auto-create-contextbooleanAuto-create missing context definitions.
--replacebooleanDEPRECATED alias for `deepcell replace FILE OLD NEW` — still works, will be removed in a future release. Note the exit codes listed here are `edit`'s: in replace mode, exit 1 means the replacement IS already in the file and the document is invalid.
--replace-allbooleanReplace all occurrences (with the deprecated --replace).
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed · 1 — partial

example

Complete, valid documents to copy the shape from.

deepcell example
FlagTypeDefaultWhat it does
--pack <pack>textCore examples plus this pack's.

Exit codes: 0 — completed

example get

Write an example document to a local file.

deepcell example get <name> --into <into>
FlagTypeDefaultWhat it does
--into <into>filerequiredLocal path to write the document to.
--layer <layer>skeleton | fullfullWhich document to seed from.
--forcebooleanOverwrite an existing file.

Exit codes: 0 — completed

example list

List every example name — the same output as bare `deepcell example`.

deepcell example list
FlagTypeDefaultWhat it does
--pack <pack>textCore examples plus this pack's.

Exit codes: 0 — completed

example show

Print one layer of an example: skeleton, full, or transcript.

deepcell example show [name] [layer]

deepcell example show

Exit codes: 0 — completed

grep

Search for items/values matching a pattern in .deepcell files.

deepcell grep <pattern>

deepcell grep Revenue
FlagTypeDefaultWhat it does
--file <filename>textSearch within a specific file.
--ignore-casebooleanCase-insensitive search.

Exit codes: 0 — completed

guide

Explain how DeepCell itself works.

deepcell guide [topic]

deepcell guide orient/start
FlagTypeDefaultWhat it does
--stage <stage>textOnly this stage's topics (e.g. generate).
--pack <pack>textOnly this domain pack's topics (e.g. finance).
--packsbooleanList the domain packs.
--allbooleanInclude the legacy flat topics.
--search <search>textTopics whose name or description matches, across both catalogs.

Exit codes: 0 — completed

help

Every command, flag, exit code and example as one document.

deepcell help [command...]

deepcell help

Exit codes: 0 — completed

import

Import an xlsx or csv file into a .deepcell document.

deepcell import <file> --items <items> --contexts <contexts>

deepcell import variance.xlsx --name variance_import --items '[{"id":"Revenue","name":"Revenue","level":0,"row":2,"sheet":"Variance"}]' --contexts '[{"id":"FY25A","name":"FY25 actual","period_type":"annual","status":"actual","column":"B"}]'
FlagTypeDefaultWhat it does
--items <items>textrequiredItems JSON string or path to JSON file.
--contexts <contexts>textrequiredContexts JSON string or path to JSON file.
--name <name>textName for the .deepcell file (default: input filename).
--workspace <workspace>textTarget workspace slug.
--aggregations <aggregations>textAggregation rules JSON string or path to JSON file.
--keep-rawbooleanStore raw values alongside aggregated results.

Exit codes: 0 — completed · 1 — partial

ingest cn extract

Extract one statement's table — rows, canonical items, #page deep link.

deepcell ingest cn extract <pdf_url>

deepcell ingest cn extract https://static.cninfo.com.cn/finalpage/2026-03-28/1224567890.PDF --statement income --persist
FlagTypeDefaultWhat it does
--statement <statement>text合并利润表Chinese heading or income | balance | cash_flow
--persistbooleanMirror the source PDF into DeepCell storage and return a durable `source_page_url` to record as the <Source> <Locator>. --no-persist skips the mirror (faster, but the only url you get back is the volatile cninfo link).

Exit codes: 0 — completed

ingest cn filings

List annual / interim reports with PDF permalinks.

deepcell ingest cn filings <code>

deepcell ingest cn filings 600519 --type annual --count 5
FlagTypeDefaultWhat it does
--type <filing_type>textannualannual | interim | semiannual | q1 | q3
--count <count>integer range5number of reports (1-30)

Exit codes: 0 — completed

Resolve a 6-digit code, company name (中文简称), or pinyin.

deepcell ingest cn search <keywords>

deepcell ingest cn search 600519

Exit codes: 0 — completed

ingest cn statements

Locate the financial statements inside a report PDF (page + scale).

deepcell ingest cn statements <pdf_url>

Exit codes: 0 — completed

knowledge add

Add a new knowledge entry to a .deepcell file.

deepcell knowledge add <filename>

deepcell knowledge add model.deepcell
FlagTypeDefaultWhat it does
--id <knowledge_id>textUnique knowledgeId (kebab-case)
--label <label>textShort title for the entry
--body <body>textBody text content
--ref <refs>textCross-reference as item:<itemId> (repeatable)
--parent <parent>textParent knowledgeId for hierarchy
--author <author>agent | humanWho is creating this entry
--level <level>integer(removed) not stored — use --parent for hierarchy
--from-json <from_json>pathJSON file with an array of entries to add in bulk
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed · 1 — written-but-invalid

knowledge cat

Read a specific knowledge entry.

deepcell knowledge cat <filename> <knowledge_id>

deepcell knowledge cat model.deepcell <knowledge_id>
FlagTypeDefaultWhat it does
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed

knowledge delete

Delete knowledge entries from a .deepcell file.

deepcell knowledge delete <filename> [knowledge_ids...]

deepcell knowledge delete model.deepcell
FlagTypeDefaultWhat it does
--yesbooleanSkip confirmation prompt
--recursivebooleanDelete entry and all descendants
--forcebooleanForce delete even if entry has children
--from-json <from_json>pathJSON file with an array of IDs to delete
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed · 1 — written-but-invalid

knowledge list

List knowledge entries in a .deepcell file.

deepcell knowledge list <filename>

deepcell knowledge list model.deepcell
FlagTypeDefaultWhat it does
--flatbooleanFlat list instead of tree view
--item-ref <item_ref>textFilter entries that reference this item
--author <author>textFilter by author (agent or human)
--parent <parent_id>textFilter by parent knowledgeId
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed

knowledge refs

Show cross-references for a knowledge entry.

deepcell knowledge refs <filename> <knowledge_id>

deepcell knowledge refs model.deepcell <knowledge_id>
FlagTypeDefaultWhat it does
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed

Search knowledge entries by text pattern (case-insensitive substring match on label and body).

deepcell knowledge search <filename> [pattern]

deepcell knowledge search model.deepcell
FlagTypeDefaultWhat it does
--item-ref <item_ref>textFilter by item reference (entries that reference this item)
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed

knowledge search-all

Search knowledge entries across all accessible workspaces.

deepcell knowledge search-all <pattern>
FlagTypeDefaultWhat it does
--item-ref <item_ref>textAlso filter by item reference
--workspace <workspace_slugs>textLimit to specific workspace(s)
--limit <limit>integer range50Max results to return (1-1000).
--offset <offset>integer range0Skip N results for pagination.

Exit codes: 0 — completed

knowledge update

Update an existing knowledge entry.

deepcell knowledge update <filename> [knowledge_id]

deepcell knowledge update model.deepcell
FlagTypeDefaultWhat it does
--label <label>textNew label text
--body <body>textNew body text
--ref <refs>textCross-reference as item:<itemId> (repeatable, replaces all refs)
--add-ref <add_refs>textAppend a ref (item:<itemId>) without removing existing ones
--remove-ref <remove_refs>textRemove a ref (type:target) from existing ones
--parent <parent>textNew parent knowledgeId
--author <author>agent | humanWho is updating this entry
--level <level>integer(removed) not stored — use --parent for hierarchy
--from-json <from_json>pathJSON file with an array of entries to update in bulk
--workspace <workspace_slug>textOverride active workspace

Exit codes: 0 — completed · 1 — written-but-invalid

log

Show version history for the workspace (like git log).

deepcell log [filename_pos]

deepcell log
FlagTypeDefaultWhat it does
--file <filename>textFilter by filename.
--limit <limit>integer20Number of entries to show.
--after <after_sha>textPagination cursor: start AFTER this commit sha. Pass the last sha of the previous page to read the next one.

Exit codes: 0 — completed

login

Authenticate with the DeepCell API.

deepcell login
FlagTypeDefaultWhat it does
--email <email>textEmail for direct login (headless/CI).
--password <password>textPassword for direct login (headless/CI).

Exit codes: 0 — completed

logout

Log out and remove stored credentials.

deepcell logout

Exit codes: 0 — completed

ls

List files in the active workspace.

deepcell ls

Exit codes: 0 — completed

merge apply

Apply conflict resolutions to a pending merge session.

deepcell merge apply <session_id> --resolve <strategy>
FlagTypeDefaultWhat it does
--resolve <strategy>ours | theirsrequiredResolution strategy for all conflicts.
--file <filename>textWrite merged result to this local file.

Exit codes: 0 — completed · 1 — conflict

merge preview

Preview a three-way merge for a .deepcell file.

deepcell merge preview <filename>

deepcell merge preview model.deepcell
FlagTypeDefaultWhat it does
--base <base_rev>textBase revision SHA (defaults to last_sync_sha).
--theirs-rev <theirs_rev>textRevision for theirs (defaults to HEAD).

Exit codes: 0 — completed · 1 — conflict

merge resolve

Resolve a sync conflict for a .deepcell file.

deepcell merge resolve <filename>

deepcell merge resolve model.deepcell
FlagTypeDefaultWhat it does
--ourstextResolve all conflicts with local values.
--theirstextResolve all conflicts with remote values.

Exit codes: 0 — completed · 1 — conflict

pull

Fetch latest cloud changes to the local folder.

deepcell pull

Exit codes: 0 — completed · 1 — conflict

push

Upload local changes to the cloud workspace.

deepcell push
FlagTypeDefaultWhat it does
--message <message>text""Commit message for the push.

Exit codes: 0 — completed · 1 — written-but-invalid

query

Query a .deepcell file.

deepcell query <filename> [item_ref] [context_ref] [status_ref]

deepcell query model.deepcell Revenue FY2026E
FlagTypeDefaultWhat it does
--scenario <scenario_ref>textScenario dimension (omit for default scenario).
--custom-dimensions <custom_dimensions>textCustom dimensions as 'dim:member;dim:member', e.g. 'geography:na'.
--sheet <sheet_id>textRender a full sheet as markdown table.
--block <block_id>textRender a specific block within a sheet.
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed

reasoning add-argument

Add a new <Argument> edge to FILENAME's <Reasoning> section.

deepcell reasoning add-argument <filename> --from-id <from_id> --to-id <to_id> --rel <rel>

deepcell reasoning add-argument model.deepcell --from-id r_pricing --to-id t_gm --rel refutes --weight 0.6
FlagTypeDefaultWhat it does
--from-id <from_id>textrequiredSource node id.
--to-id <to_id>textrequiredTarget node id.
--rel <rel>supports | refutes | depends_on | derives_from | variant_of | supersedes | contradicts | referencesrequiredHow --from-id relates to --to-id: supports / refutes (evidential), depends_on (falsifying the target falsifies the source), derives_from (computed or inferred from it), variant_of (your view vs a consensus claim), supersedes (replaces an older node), contradicts, references. See `deepcell guide reasoning`.
--id <arg_id>textArgument id (auto-generated if omitted).
--weight <weight>floatHow much this edge carries, 0-1 (optional).
--body <body>text<Body> text.
--body-file <body_file>fileFile holding the <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--status <status>textArgument lifecycle status (active/superseded/revoked).

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning add-assumption

Add a new <Assumption> to FILENAME's <Reasoning> section.

deepcell reasoning add-assumption <filename> --id <assumption_id>

deepcell reasoning add-assumption model.deepcell --id a_hiring --label 'Hiring lands on plan' --body 'Sales headcount reaches 40 by Q3.' --item-refs Headcount
FlagTypeDefaultWhat it does
--id <assumption_id>textrequiredNew Assumption id.
--label <label>text<Label> text.
--label-file <label_file>fileFile holding the <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>text<Body> text.
--body-file <body_file>fileFile holding the <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--status-ref <status_ref>textModel Status dimension id (e.g. actual / projected) — NOT the assumption's lifecycle state (that is --status).
--calc-ref <calc_ref>textCalcDef id anchoring this assumption to a formula in the model.
--item-refs <item_refs>textComma-separated item ids the assumption constrains. Without it the unanchored_assumption lint warns — the assumption cannot be impact-traced or falsified when actuals drift in (macro assumptions may legitimately omit it).
--confidence <confidence>floatHow strongly you hold this assumption, 0-1.
--status <status>holding | uncertain | broken | supersededAssumption lifecycle state: holding until something contradicts it, broken once actuals do, superseded when a newer assumption replaces it.
--verified-at <verified_at>textISO date (YYYY-MM-DD) this assumption was last confirmed to still hold (@verifiedAt). Records WHEN it was checked; --status holding records that it stands.
--broken-at <broken_at>textISO date (YYYY-MM-DD) this assumption was found no longer to hold (@brokenAt). Records WHEN it failed; --status broken records THAT it failed — set both when actuals contradict an assumption.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning add-claim

Add a new <Claim> to FILENAME's <Reasoning> section.

deepcell reasoning add-claim <filename> --id <claim_id> --kind <kind>

deepcell reasoning add-claim model.deepcell --id t_gm --kind thesis --label 'Gross margin expands' --body 'Mix shift to subscription lifts GM 200bps.' --item-refs Gross_Margin_Pct --confidence 0.62
FlagTypeDefaultWhat it does
--id <claim_id>textrequiredNew Claim id.
--kind <kind>thesis | risk | catalyst | counter | question | market_consensus | knowledgerequiredWhat the claim is: thesis (what you conclude), risk / catalyst (what moves it, needs --probability), counter (the case against), question (open), market_consensus (someone else's view, needs --attribution), knowledge (a durable fact). See `deepcell guide reasoning`.
--label <label>text<Label> text.
--label-file <label_file>fileFile holding the <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>text<Body> text.
--body-file <body_file>fileFile holding the <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--status-ref <status_ref>textModel Status dimension id (e.g. actual / projected) — NOT the claim lifecycle state (that is --status). Not permitted on --kind knowledge: knowledge claims are timeless (lint: status_ref_on_knowledge, error).
--calc-ref <calc_ref>textCalcDef id anchoring this claim to a formula in the model.
--item-refs <item_refs>textComma-separated item ids anchoring this claim to the model. thesis/risk/catalyst claims need --item-refs or --calc-ref, else the unanchored_claim lint warns (they become invisible to reasoning-diff and item-scoped queries). question/knowledge/market_consensus are exempt.
--probability <probability>floatLikelihood, 0-1 (required for kind=risk / catalyst).
--severity <severity>low | med | highQualitative impact (required for kind=risk).
--confidence <confidence>floatHow strongly you hold this claim, 0-1.
--parent-claim-ref <parent_claim_ref>textClaim id this one hangs under (hierarchy, not an Argument edge).
--attribution <attribution>textWho holds this view (required for kind=market_consensus), e.g. 'Bloomberg consensus, 2026-07'.
--status <status>draft | active | superseded | falsified | revokedClaim lifecycle state — NOT the model's Status dimension (that is --status-ref).

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning add-evidence

Add a new <Evidence> to FILENAME's <Reasoning> section.

deepcell reasoning add-evidence <filename> --id <evidence_id> --source-ref <source_ref>

deepcell reasoning add-evidence model.deepcell --id e_10k --source-ref src_aapl_10k_fy25 --excerpt 'Gross margin of 46.2%' --retrieved-at 2026-02-19T10:30:00Z
FlagTypeDefaultWhat it does
--id <evidence_id>textrequiredNew Evidence id.
--source-ref <source_ref>textrequiredsourceId of a <Source> in <SourceDefinitions>.
--excerpt <excerpt>text<Excerpt> text.
--excerpt-file <excerpt_file>fileFile holding the <Excerpt> text; '-' reads stdin. Prefer this over --excerpt for text containing '$' — inline shell arguments mangle dollar amounts.
--at <at>textPosition in the source (page:47, t:00:14:32, text:HEADING).
--reliability <reliability>textprimary | secondary | tertiary.
--effective-date <effective_date>textISO8601 date.
--retrieved-at <retrieved_at>textISO8601 date.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning delete-argument

Delete the <Argument> NODE_ID from FILENAME's <Reasoning> section.

deepcell reasoning delete-argument <filename> <node_id>

deepcell reasoning delete-argument model.deepcell <node_id>
FlagTypeDefaultWhat it does
--cascadebooleanAlso remove every Argument touching the node (default). --no-cascade keeps them, and is refused with code=would_dangle unless you also pass --allow-dangling — an Argument's @id is optional, so a dangling edge cannot reliably be found and cleaned up later.
--allow-danglingbooleanWith --no-cascade, permit the delete even though it orphans Arguments.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning delete-assumption

Delete the <Assumption> NODE_ID from FILENAME's <Reasoning> section.

deepcell reasoning delete-assumption <filename> <node_id>

deepcell reasoning delete-assumption model.deepcell <node_id>
FlagTypeDefaultWhat it does
--cascadebooleanAlso remove every Argument touching the node (default). --no-cascade keeps them, and is refused with code=would_dangle unless you also pass --allow-dangling — an Argument's @id is optional, so a dangling edge cannot reliably be found and cleaned up later.
--allow-danglingbooleanWith --no-cascade, permit the delete even though it orphans Arguments.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning delete-claim

Delete the <Claim> NODE_ID from FILENAME's <Reasoning> section.

deepcell reasoning delete-claim <filename> <node_id>

deepcell reasoning delete-claim model.deepcell t_gm --cascade
FlagTypeDefaultWhat it does
--cascadebooleanAlso remove every Argument touching the node (default). --no-cascade keeps them, and is refused with code=would_dangle unless you also pass --allow-dangling — an Argument's @id is optional, so a dangling edge cannot reliably be found and cleaned up later.
--allow-danglingbooleanWith --no-cascade, permit the delete even though it orphans Arguments.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning delete-evidence

Delete the <Evidence> NODE_ID from FILENAME's <Reasoning> section.

deepcell reasoning delete-evidence <filename> <node_id>

deepcell reasoning delete-evidence model.deepcell <node_id>
FlagTypeDefaultWhat it does
--cascadebooleanAlso remove every Argument touching the node (default). --no-cascade keeps them, and is refused with code=would_dangle unless you also pass --allow-dangling — an Argument's @id is optional, so a dangling edge cannot reliably be found and cleaned up later.
--allow-danglingbooleanWith --no-cascade, permit the delete even though it orphans Arguments.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning graph

Render the Argument graph from FILENAME as Mermaid (default) or DOT.

deepcell reasoning graph <filename>

deepcell reasoning graph model.deepcell --syntax mermaid
FlagTypeDefaultWhat it does
--syntax <graph_syntax>mermaid | dotmermaidGraph syntax to emit. Use the global -f json for the raw graph payload.

Exit codes: 0 — completed

reasoning impact

Walk Argument edges from CLAIM_ID and list downstream nodes affected if it's falsified.

deepcell reasoning impact <filename> <claim_id>

deepcell reasoning impact model.deepcell a_hiring

Exit codes: 0 — completed

reasoning lint

Lint the <Reasoning> section of FILENAME for structural issues.

deepcell reasoning lint <filename>

deepcell reasoning lint model.deepcell --strict
FlagTypeDefaultWhat it does
--strictbooleanExit non-zero on warn-level findings too (default: only error-level findings fail).

Exit codes: 0 — completed · 1 — read-only-check

reasoning set-conclusion

Declare which Claim is FILENAME's main conclusion.

deepcell reasoning set-conclusion <filename> [claim_id]

deepcell reasoning set-conclusion model.deepcell t_gm
FlagTypeDefaultWhat it does
--clearbooleanRemove the declaration and fall back to deriving the apex from the argument topology.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning supersede-assumption

Replace ASSUMPTION_ID with a new Assumption, keeping the old as history.

deepcell reasoning supersede-assumption <filename> <assumption_id> --id <new_id>

deepcell reasoning supersede-assumption model.deepcell a_hiring --id a_hiring_v2 --label 'Hiring lands one quarter late'
FlagTypeDefaultWhat it does
--id <new_id>textrequiredId of the replacement Assumption.
--label <label>text<Label> text of the replacement.
--label-file <label_file>fileFile holding the replacement <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>text<Body> text of the replacement.
--body-file <body_file>fileFile holding the replacement <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--item-refs <item_refs>textComma-separated item ids.
--status-ref <status_ref>textModel Status dimension id.
--calc-ref <calc_ref>textCalcDef id this assumption drives.
--confidence <confidence>floatConfidence in the replacement, 0-1.
--status <status>holding | uncertain | broken | supersededLifecycle status of the replacement.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning supersede-claim

Replace CLAIM_ID with a new Claim, keeping the old one as history.

deepcell reasoning supersede-claim <filename> <claim_id> --id <new_id>

deepcell reasoning supersede-claim model.deepcell t_gm --id t_gm_v2 --label 'Gross margin expands, slower' --body 'Mix shift lifts GM 120bps.' --confidence 0.55
FlagTypeDefaultWhat it does
--id <new_id>textrequiredId of the replacement Claim.
--label <label>text<Label> text of the replacement.
--label-file <label_file>fileFile holding the replacement <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>text<Body> text of the replacement.
--body-file <body_file>fileFile holding the replacement <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--kind <kind>thesis | risk | catalyst | counter | question | market_consensus | knowledgeKind of the replacement (defaults to the superseded claim's kind).
--item-refs <item_refs>textComma-separated item ids.
--context-refs <context_refs>textComma-separated context ids.
--status-ref <status_ref>textModel Status dimension id.
--calc-ref <calc_ref>textCalcDef id this claim is anchored to.
--confidence <confidence>floatConfidence in the replacement, 0-1.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning update-argument

Patch an <Argument> edge; only the attributes you pass are changed.

deepcell reasoning update-argument <filename> <argument_id>

deepcell reasoning update-argument model.deepcell arg_pricing --weight 0.6
FlagTypeDefaultWhat it does
--rel <rel>supports | refutes | depends_on | derives_from | variant_of | supersedes | contradicts | referencesReclassify the edge — see `deepcell reasoning add-argument --help`.
--weight <weight>floatHow much this edge carries, 0-1.
--body <body>textReplacement <Body> text.
--body-file <body_file>fileFile holding the replacement <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--status <status>textArgument lifecycle status (active / superseded / revoked).

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning update-assumption

Update attributes on an existing <Assumption> ASSUMPTION_ID.

deepcell reasoning update-assumption <filename> <assumption_id>

deepcell reasoning update-assumption model.deepcell a_hiring --status broken --broken-at 2026-07-31
FlagTypeDefaultWhat it does
--label <label>textReplacement <Label> text.
--label-file <label_file>fileFile holding the replacement <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>textReplacement <Body> text.
--body-file <body_file>fileFile holding the replacement <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--status-ref <status_ref>textModel Status dimension id (e.g. actual / projected) — NOT the assumption's lifecycle state (that is --status).
--calc-ref <calc_ref>textCalcDef id anchoring this assumption to a formula in the model.
--item-refs <item_refs>textComma-separated item ids the assumption constrains — the cheap fix for an unanchored_assumption lint warning.
--confidence <confidence>floatHow strongly you hold this assumption, 0-1.
--status <status>holding | uncertain | broken | supersededAssumption lifecycle state: holding until something contradicts it, broken once actuals do, superseded when a newer assumption replaces it.
--verified-at <verified_at>textISO date (YYYY-MM-DD) this assumption was last confirmed to still hold (@verifiedAt). Records WHEN it was checked; --status holding records that it stands.
--broken-at <broken_at>textISO date (YYYY-MM-DD) this assumption was found no longer to hold (@brokenAt). Records WHEN it failed; --status broken records THAT it failed — set both when actuals contradict an assumption.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning update-claim

Update attributes on an existing <Claim> CLAIM_ID in FILENAME.

deepcell reasoning update-claim <filename> <claim_id>

deepcell reasoning update-claim model.deepcell t_gm --status falsified
FlagTypeDefaultWhat it does
--kind <kind>thesis | risk | catalyst | counter | question | market_consensus | knowledgeReclassify the claim — see `deepcell reasoning add-claim --help` for what each kind means.
--label <label>textReplacement <Label> text.
--label-file <label_file>fileFile holding the replacement <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>textReplacement <Body> text.
--body-file <body_file>fileFile holding the replacement <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--status-ref <status_ref>textModel Status dimension id (e.g. actual / projected) — NOT the claim lifecycle state (that is --status). Not permitted on --kind knowledge: knowledge claims are timeless (lint: status_ref_on_knowledge, error).
--calc-ref <calc_ref>textCalcDef id anchoring this claim to a formula in the model.
--item-refs <item_refs>textComma-separated item ids anchoring this claim to the model — the cheap fix for an unanchored_claim lint warning.
--probability <probability>floatLikelihood, 0-1 (required for kind=risk / catalyst).
--severity <severity>low | med | highQualitative impact (required for kind=risk).
--confidence <confidence>floatHow strongly you hold this claim, 0-1.
--parent-claim-ref <parent_claim_ref>textClaim id this one hangs under (hierarchy, not an Argument edge).
--attribution <attribution>textWho holds this view (required for kind=market_consensus).
--status <status>draft | active | superseded | falsified | revokedClaim lifecycle state — NOT the model's Status dimension (that is --status-ref).

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning update-evidence

Patch an <Evidence> node; only the attributes you pass are changed.

deepcell reasoning update-evidence <filename> <evidence_id>

deepcell reasoning update-evidence model.deepcell <evidence_id>
FlagTypeDefaultWhat it does
--label <label>textReplacement <Label> text.
--label-file <label_file>fileFile holding the replacement <Label> text; '-' reads stdin. Prefer this over --label for text containing '$' — inline shell arguments mangle dollar amounts.
--body <body>textReplacement <Body> text.
--body-file <body_file>fileFile holding the replacement <Body> text; '-' reads stdin. Prefer this over --body for text containing '$' — inline shell arguments mangle dollar amounts.
--source <source>textReplacement @source (where the evidence came from).
--url <url>textReplacement @url.
--as-of <as_of>textReplacement @asOf date (ISO).
--item-refs <item_refs>textComma-separated item ids.
--context-refs <context_refs>textComma-separated context ids.

Exit codes: 0 — completed · 1 — written-but-invalid

reasoning-diff

Warn when an edit moved something a Claim was anchored to.

deepcell reasoning-diff <file>

deepcell reasoning-diff model.deepcell
FlagTypeDefaultWhat it does
--acceptbooleanPrint warnings but exit 0 (acknowledge and continue).
--since-branch-base <since_branch_base>pathPath to a third .deepcell file representing the branch base. When supplied, drift is computed across both branch_base->HEAD and HEAD->working intervals so accumulated commits surface.

Exit codes: 0 — completed · 1 — read-only-check · 2 — unparseable-document

ref

Look up legal values, and resolve any typed id.

deepcell ref [target...]

deepcell ref lint/hardcoded_literal_in_calc
FlagTypeDefaultWhat it does
--limit <limit>integer40Maximum search results.

Exit codes: 0 — completed

register

Create a new DeepCell account (headless/CI).

deepcell register
FlagTypeDefaultWhat it does
--email <email>textAccount email.
--password <password>textAccount password (min 8 chars).
--name <display_name>textYour display name.
--locale <locale>textzh-CNLocale (default: zh-CN).

Exit codes: 0 — completed

relationships

Show the relationship graph of a .deepcell file.

deepcell relationships <filename>

deepcell relationships model.deepcell --type business
FlagTypeDefaultWhat it does
--type <graph_type>items | dependencies | blocks | business | unifiedunifiedGraph type. 'business' is the Item-centric Relationships workspace.

Exit codes: 0 — completed

replace

Replace raw XML text in a file — the last-resort editor.

deepcell replace <filename> [old_string] [new_string]

deepcell replace model.deepcell "<Old>text</Old>" "<New>text</New>"
FlagTypeDefaultWhat it does
--replace-allbooleanReplace every occurrence instead of requiring a unique match.
--batch <batch_file>textReplacement as a JSON object {"old_string": "...", "new_string": "..."} — a file path, '-' for stdin, or inline JSON. Use this for multiline XML.
--revision <revision>textExpected revision SHA for optimistic locking.
--message <commit_message>textGit commit message for the write.
--workspace <workspace_slug>textOverride active workspace.

Exit codes: 0 — completed · 1 — written-but-invalid

restore

Restore the workspace to a previous revision (like git checkout).

deepcell restore <revision>
FlagTypeDefaultWhat it does
--file <filename>textRestore specific file only.
--yesbooleanSkip confirmation prompt.

Exit codes: 0 — completed

rm

Delete a file from the workspace.

deepcell rm <filename>

deepcell rm model.deepcell
FlagTypeDefaultWhat it does
--yesbooleanSkip confirmation prompt.

Exit codes: 0 — completed

rules

The non-negotiable invariants every .deepcell model must satisfy.

deepcell rules [rule_id]

deepcell rules R2
FlagTypeDefaultWhat it does
--pack <pack>textRestrict to the core rules plus this pack's (e.g. finance).
--fullbooleanPrint every rule in full, not just the index — one call, every invariant, no per-rule round trips.

Exit codes: 0 — completed

share create

Create a share link for FILENAME and print its viewer URL.

deepcell share create <filename>

deepcell share create model.deepcell --permission view
FlagTypeDefaultWhat it does
--permission <permission>view | editviewAccess level for the link. Edit links require an account.
--expires-days <expires_days>integer rangeDays until the link expires. Every link expires; omit this to take the server default (90 days, or 7 for a password-less --permission edit link and for anonymous sessions). Larger values are clamped to that cap.
--password <password>textPassword-protect the link (account required).
--label <label>textLabel to recognize the link in `share list`.

Exit codes: 0 — completed

share list

List active share links in the workspace.

deepcell share list
FlagTypeDefaultWhat it does
--file <filename>textOnly links for this file.

Exit codes: 0 — completed

share revoke

Revoke a share link by its id (see `share list`).

deepcell share revoke <share_id>

Exit codes: 0 — completed

status

Show local changes vs last sync.

deepcell status

Exit codes: 0 — completed

to-docx

Export one document's prose as a Word file.

deepcell to-docx <filename>

deepcell to-docx model.deepcell --doc variance_note -o variance-note.docx
FlagTypeDefaultWhat it does
--doc <doc_id>textDocument ID (required when the file has multiple documents).
--scenario <scenario_id>textDocument scenario ID to export.
--output <out_path>textOutput path (default: <filename>.docx).
--bundlebooleanLink to sibling .xlsx / .pptx exports written alongside this one.

Exit codes: 0 — completed

to-excel

Export a .deepcell file to Excel format.

deepcell to-excel <filename>

deepcell to-excel model.deepcell -o model.xlsx
FlagTypeDefaultWhat it does
--output <out_path>textOutput file path (default: <filename>.xlsx).
--formulasbooleanExport with live Excel formulas.
--recalculatebooleanRecompute formula values via the LibreOffice service (requires --formulas).
--scenario <scenario_id>textDocument scenario ID to export (applies its VariableOverrides; omit for the default scenario).
--variant <variant_id>text(removed) Never worked — see --scenario for document scenarios.

Exit codes: 0 — completed

to-pdf

Export a deck or a document as a PDF.

deepcell to-pdf <filename>

deepcell to-pdf model.deepcell
FlagTypeDefaultWhat it does
--from <source>deck | docdeckWhich surface to render: the presentation deck, or the prose document.
--deck <deck_id>textDeck ID (required when the file has multiple decks).
--doc <doc_id>textDocument ID (required when the file has multiple documents).
--scenario <scenario_id>textDocument scenario ID to export.
--output <out_path>textOutput path (default: <filename>_<deck|doc>.pdf).

Exit codes: 0 — completed

to-pptx

Export one document-defined HTML deck as editable PowerPoint objects.

deepcell to-pptx <filename>

deepcell to-pptx model.deepcell --deck board -o board.pptx
FlagTypeDefaultWhat it does
--deck <deck_id>textDeck ID (required when the document has multiple decks).
--scenario <scenario_id>textDocument scenario ID to export.
--output <out_path>textOutput path (default: <filename>.pptx).

Exit codes: 0 — completed

upgrade

Check whether a newer deepcell CLI has been published.

deepcell upgrade

Exit codes: 0 — completed

upgrade check

Ask the package index right now and update the cached answer.

deepcell upgrade check
FlagTypeDefaultWhat it does
--timeout <timeout>float3How long to wait for each package index.

Exit codes: 0 — completed

upgrade disable

Turn the automatic upgrade check off.

deepcell upgrade disable

Exit codes: 0 — completed

upgrade enable

Turn the automatic upgrade check on (the default).

deepcell upgrade enable

Exit codes: 0 — completed

upgrade status

Show the setting and the last cached answer.

deepcell upgrade status

Exit codes: 0 — completed

variant checkout

Check out a variant branch for local edits.

deepcell variant checkout [name]

deepcell variant checkout
FlagTypeDefaultWhat it does
--mainbooleanSwitch back to the main branch (clear active variant).

Exit codes: 0 — completed

variant create

Create a new variant branch.

deepcell variant create <name>

Exit codes: 0 — completed

variant diff

Show diff between a variant branch and main.

deepcell variant diff [name]

deepcell variant diff
FlagTypeDefaultWhat it does
--file <file_path>textLimit the diff to a single file.

Exit codes: 0 — completed

variant list

List variants in the workspace.

deepcell variant list

Exit codes: 0 — completed

variant merge

Merge a variant branch back into main.

deepcell variant merge [name]

deepcell variant merge
FlagTypeDefaultWhat it does
--resolve <resolve>ours | theirsConflict resolution strategy: 'ours' keeps main, 'theirs' keeps variant.

Exit codes: 0 — completed · 1 — conflict

verify-email

Verify your email address.

deepcell verify-email

Exit codes: 0 — completed

viewer

Print the browser URL to open FILENAME in the web workbench.

deepcell viewer <filename>

deepcell viewer model.deepcell
FlagTypeDefaultWhat it does
--workspace <workspace_slug>textOverride active workspace.
--openbooleanOpen the URL in the default browser.

Exit codes: 0 — completed

whoami

Show the currently authenticated user.

deepcell whoami

Exit codes: 0 — completed

workspace create

Create a new workspace.

deepcell workspace create <name>
FlagTypeDefaultWhat it does
--slug <slug>textURL-friendly slug (auto-generated from name if omitted).
--description <description>text""Workspace description.

Exit codes: 0 — completed

workspace info

Show workspace details.

deepcell workspace info [slug]

deepcell workspace info

Exit codes: 0 — completed

workspace list

List workspaces you belong to.

deepcell workspace list

Exit codes: 0 — completed

workspace use

Set the active workspace for subsequent commands.

deepcell workspace use <slug>

deepcell workspace use my-workspace

Exit codes: 0 — completed

write

Create a file, or replace an existing one wholesale.

deepcell write <filename>

deepcell write model.deepcell --file ./model.deepcell
FlagTypeDefaultWhat it does
--stdinbooleanRead content from stdin.
--file <from_file>pathRead content from a local file.
--content <from_content>textPass file content inline (useful for MCP/programmatic access).
--content-base64 <from_b64>textPass file content as a base64-encoded string.
--message <message>text""Commit message.
--revision <revision>textExpected revision SHA for optimistic locking — the `Revision:` line `deepcell cat` prints on stderr. The write is refused with a conflict if FILENAME changed since (a change to a different file is not a conflict).

Exit codes: 0 — completed · 1 — written-but-invalid

The rules

The invariants every model must satisfy, each with a stable id that other surfaces cite. Where a rule has lint backing, the listed code is what prints when the rule is broken — which is what turns it from advice into something you can check. The rest are audited in review.

deepcell rules R2
RuleWhat it saysEnforced byLint code
rule:R1Native generation — Excel at the edges onlyreview
rule:R2Driver-based forecastslinthardcoded_literal_in_calc
rule:R3One model per request — one file, edited in placereview
rule:R4Forecasts must populate — verify by query-backreview
rule:R5Self-checking calculationsreview
rule:R6Point-in-time results stay in their periodreview
rule:R7Canonical naming and unitslintmonetary_units
rule:R8Reasoning is mandatorylintunanchored_claim, unanchored_assumption, exclusivity_assertion, body_itemrefs_mismatch
rule:R9Every model carries PresentationDefinitionslintunrendered_value
rule:R10A DCF carries a real FCF bridgereview
rule:R11Circular structures by deliberate convention — and seededreview
rule:R12Assumptions are groundedreview
rule:R13Statuses and periods declare what they meanlintundeclared_status_archetype, undeclared_context_state
rule:R14The model states its conclusionlintmissing_apex_recommendation, dangling_conclusion_ref
rule:R15Prose that asserts a value must link itreview
rule:R16An outward address lives in exactly one placereview
rule:R17A cross-surface reference is a deepcell: URIreview

Examples

Complete, valid documents to start from, each chosen for the mechanic it demonstrates rather than its industry. They are rebuilt from their own transcripts and linted in CI, so none of them is a stale snippet. Copy the line under one to seed a file with it.

ExampleThe mechanic it showsDomain
finance/saas-dcfthe full three-statement + DCF loopfinance
ops/headcount-planitems × contexts, drivers, and scenariosHR / operations
project/build-budgetstatus axis (committed / actual / forecast) and variance self-checksconstruction, grants
research/experiment-resultscustom dimensions, actual vs expected status, and a <Document> write-upscience / clinical research
supply/inventory-plansensitivity blockslogistics

finance/saas-dcf

A linked income statement, balance sheet and cash flow statement feeding an unlevered DCF whose every forecast number traces to a driver item — with the three self-checks (BS_Check, CF_Recon, EV_Check) that prove the loop closed.

deepcell example get finance/saas-dcf --into <into>

ops/headcount-plan

Two hiring plans out of one model — every derived number traces to an editable driver row, and the second scenario is the handful of cells that differ rather than a second copy of the file.

deepcell example get ops/headcount-plan --into <into>

project/build-budget

Three readings of the same cell live on the Status dimension — not in three parallel item trees — a calc reaches across them with `Item[ctx]#status`, and every allocation and variance carries a cross-check whose correct answer is known to be 0.

deepcell example get project/build-budget --into <into>

research/experiment-results

A third axis and a second reading on the same row — cohort is a custom Dimension that slices every data row instead of doubling it, and measured sits beside pre-registered under one item id rather than under two. The readout itself ships as a <Document>: every number in the prose is a link, so re-running the trial's numbers rewrites the write-up.

deepcell example get research/experiment-results --into <into>

supply/inventory-plan

Sensitivity is a native `blockType="sensitivity"` block whose every cell is a transient recompute of the model — never a ladder of near-duplicate perturbation items — shown in all three legal shapes: 2-variable grid, 1-variable table, and scenario comparison.

deepcell example get supply/inventory-plan --into <into>
Setting up an agent that has never seen DeepCell? Open the agent quick start