Delphi-RAG-Lint

drag-lint help

CLI reference

Every drag-lint command, with its usage and the features that describe it.

Commands

allow

Records a dl:ok review of one finding, so it stops being reported without being fixed.

drag-lint allow <file> --fix-line <L> --fix-rule <id> [--apply] [--reason "<text>"] [--rules-dir <dir>] [--config <file>] [--profile <name>] [--enable id,...] [--disable id,...] [--stand-in-for <realpath>] (record a dl:ok review of ONE finding; dry-run without --apply; --reason replaces the marker's reason, e.g. "REVIEWED <yyyy-mm-dd> <why>" -- without it a re-hash of a stale marker drops its REVIEWED stamp; the lint options decide which findings the line has)
FlagArgumentMeaningDefault
--fix-line<L>
--fix-rule<id>
--apply
--reason<text>
--rules-dir<dir>
--config<file>
--profile<name>
--enable
--disable
--stand-in-for<realpath>

Described in:

ambiguous-calls

Resolver-coverage diagnostic that reports call sites the engine could not pin to exactly one target -- unresolved or ambiguous calls.

drag-lint ambiguous-calls [--qname <Foo.Bar>|--in <file>] --db PATH [--json] (resolver-coverage diagnostic: unresolved/ambiguous call sites)
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--in<file>
--dbPATH
--json

Described in ambiguous-calls.

arch-diagram

Draws one self-contained HTML layer diagram of a project's units by folder, with the layers measured from the uses clauses.

drag-lint arch-diagram --db <db> [--output <file.html>] [--json]
FlagArgumentMeaningDefault
--db<db>
--output<file.html>
--json

Described in arch-diagram.

ask

Ask one report question and print the answer as text.

drag-lint ask <question> --target <T> [--project <P.dproj> | --in <U.pas> | --db <idx>] [--to <B>] [--server-db <idx>] [--sql-db <idx>] [--counterpart-db <idx>] [--depth N] [--cap N] [--surface-cap N] [--control <C>] [--mode write|read|both] [--max-rows N] [--since <rev|YYYY-MM-DD>] [--min-support N] [--out-root <dir>] [--pairs-file <f.json>] [--allow-stale] [--plain] [--open] [--resolve-only]
FlagArgumentMeaningDefault
--question<id>
--target<T>
--project<P.dproj>
--in<U.pas>
--db<idx>
--to<B>
--server-db<idx>
--sql-db<idx>
--counterpart-db<idx>
--depthN
--capN
--surface-capN
--control<C>
--modewrite|read|both
--max-rowsN
--since<rev|YYYY-MM-DD>
--min-supportN
--out-root<dir>
--pairs-file<f.json>
--allow-stale
--plain
--open
--resolve-only

Described in:

bench-context

Benchmarks the context command by building context bundles for a sample of symbols against a database.

drag-lint bench-context [--db <file.sqlite>] [--n N]
FlagArgumentMeaningDefault
--db<file.sqlite>
--nN

Described in bench-context.

bookmarks

Lists or finds the dl:bk comment-anchor bookmarks in a unit or a folder, and strips / restores them on request.

drag-lint bookmarks --in <file.pas|dir> [--name <code>] [--format text|json] [--json] (list / find the // dl:bk<N> and // dl:bk:<CODE> comment anchors; read-only; exit 3 = none)
FlagArgumentMeaningDefault
--in<file.pas|dir>
--name<code>
--json

Described in bookmarks.

bookmarks-restore

Lists or finds the dl:bk comment-anchor bookmarks in a unit or a folder, and strips / restores them on request.

drag-lint bookmarks-restore --from <sidecar.json> [--apply] [--json|--format json] (puts the anchors a bookmarks-strip removed back, byte-identical when the file is unchanged; a file with an anchor it cannot place is left untouched; dry run without --apply; exit 4 = some unplaced)
FlagArgumentMeaningDefault
--from<sidecar.json>
--apply
--json

Described in bookmarks.

bookmarks-strip

Lists or finds the dl:bk comment-anchor bookmarks in a unit or a folder, and strips / restores them on request.

drag-lint bookmarks-strip --in <file.pas|dir> --output <sidecar.json> [--name <code>] [--apply] [--json|--format json] (removes the dl:bk comment anchors and records them in a sidecar for bookmarks-restore; dry run without --apply; never overwrites a sidecar; exit 3 = none)
FlagArgumentMeaningDefault
--in<file.pas|dir>
--output<sidecar.json>
--name<code>
--apply
--json

Described in bookmarks.

butterfly

Composes a symbol's callers (upward wing) and callees (downward wing) into one combined chart in a single command.

drag-lint butterfly --qname <X> [--depth N] [--format dot|mermaid|text|json] [--json] [--output F] --db PATH [--db ...] (composes callers (upward wing) + callees (downward wing) of X into one chart; default format dot)
FlagArgumentMeaningDefault
--qname<X>
--depthN
--format
--outputF
--dbPATH

Described in butterfly.

call-path

Finds the shortest resolved call path from one symbol to another.

drag-lint call-path --from <A> --to <B> [--max-depth N] --db PATH [--json] (shortest resolved call path A -> ... -> B; exit 1 = no path)
FlagArgumentMeaningDefault
--from<A>
--to<B>
--max-depthN
--dbPATH
--json

Described in call-path.

callgraph

Prints an N-deep resolved call tree for a symbol, in either direction.

drag-lint callgraph --qname <X> [--direction callers|callees] [--depth N] --db PATH [--json|--format text|json] (N-deep resolved call tree; cycle-guarded)
FlagArgumentMeaningDefault
--qname<X>
--direction
--depthN
--dbPATH
--json
--format

Described in callgraph.

check-ast

Runs drag-lint's AST-level checks against a file.

drag-lint check-ast <file> [--profile <name>] [--db PATH] [--library-db <lib.sqlite>|none] [--rule <id>] [--format text|json] [--json] [--output <file>]
FlagArgumentMeaningDefault
--dbPATH
--rule<id>
--format

Described in Run AST Checks.

check-init

Answers whether a variable or field is set before a given use on every execution (SET / NEVER-SET / MAY-BE-UNSET).

drag-lint check-init <QName>|--qname <QName> [--at <file>:<line>[:<col>]] --db <db> [--json|--format json] [--explain] [--max-routines N] [--max-seconds S]
FlagArgumentMeaningDefault
--at<file>:<line>[:<col>]
--db<db>
--json
--explain
--max-routinesN
--max-secondsS

Described in check-init.

check-unit

The whole-unit form of the undeclared-identifier quick-fix: resolves every unresolved name in a unit at once and adds the units that declare them.

drag-lint check-unit <unit.pas> [--project <dproj>] [--platform win32|win64] [--shadow <dir>] [--resolve-uses] [--db PATH] [--format json|text]
FlagArgumentMeaningDefault
--project<dproj>
--platform
--shadow<dir>
--resolve-uses
--dbPATH
--format

Described in Add Missing Units to uses (whole unit).

compare

Reruns a saved or pasted report and shows before / delta / after.

drag-lint compare --old <report.txt|forms.csv|bundle dir> [--command "<id> -Target T -Project P ...>"] [--project <P.dproj>] [--out-root <dir>]
FlagArgumentMeaningDefault
--old<report.txt|forms.csv|bundle dir>
--command
--project<P.dproj>
--new<same kind>
--old-db<old.sqlite>
--db<new.sqlite>
--auto
--save
--snapshot-dir<dir>
--format
--output<file>
--open

Described in Compare a report with current code.

compile-check

Runs a compiler-backed check against a single Delphi project (.dproj) or source file (.pas) and reports the result.

drag-lint compile-check <target.dproj|.pas> [--project <X.dproj>] [--db PATH] [--format json|text] (no --db: caches only into the project's unique manifest owner, else reports uncached; no index is required, the compile and report still run; exit 1 iff an Error finding)
FlagArgumentMeaningDefault
--project<X.dproj>
--dbPATH
--format

Described in compile-check.

context

Returns a compact context bundle for a symbol -- its doc comment, class surface (signatures), the target's own body, and a capped list of callers.

drag-lint context --task "verb qname" [--db <file.sqlite>] [--format md|json|raw] [--no-docs] [--full-surface] [--library-db <library.sqlite>] (AI-ready symbol bundle: doc + class surface + the target body + capped callers. When the task phrase matches a dl:wiki topic ALIAS, up to 2 topics ride along as a "## Wiki" section -- suppressed by --no-docs. A qname that resolves to nothing now exits 1 and SAYS so)
FlagArgumentMeaningDefault
--task
--db<file.sqlite>
--format
--no-docs
--full-surface
--max-callersN
--max-body-tokensN
--contextN
--library-db<library.sqlite>

Described in context.

convert-apply

Locates .dfm component instances that match a #convert rule from a conversion-rules file and rewrites all five surfaces: declaration retype, uses-add.

drag-lint convert-apply --unit <F.pas> [--unit <G.pas> ...] --rules <file> --db PATH [--db ...] [--only Name1,Name2,...] [--only-type Type1,Type2] [--castlib <file>] [--glyph-stitch] [--apply] [--no-backup] [--raise-encoding "<path>=utf8-bom" ...] [--no-warn-unlinked] [--no-reconcile-uses] [--no-reindex] [--old-platform-db <file> ...] [--progress] [--format json|--json] (--glyph-stitch (OFF by default; without it a G[I/N] book is refused) slices and stitches a TBitmap strip per the book glyph expressions on the .dfm surface, outcomes in apply/1 glyphs[]; locates .dfm component instances matching a #convert rule and rewrites all 5 surfaces: declaration retype + uses-add + .dfm re-emit + property/event access-site rewrite + runtime-creator retype/TODO markers; without --apply this is DRY-RUN ONLY (preview, writes nothing); --apply writes for real with backups + a recovery.txt unless --no-backup; --format json emits schema apply/1 -- the six report surfaces plus a typed items[] carrying a machine-readable kind per line, so the conversion REMAINDER can be dispatched on instead of parsed out of prose, plus resolved_defaults[] (informational receipts, kept OUT of items[] because on a real form they run to thousands and would bury the remainder); --castlib names the .castlib whose enum blocks translate a #link value when the link carries a cast suffix; a source property some converted instance carries that no #link carries and no #ignore acknowledges is warned ONCE per (source type, property) as "dropped on N of M converted instance(s)" -- a minority count is the stronger signal -- and counted in json as unlinked_source_properties / unlinked_source_property_sites / unlinked[]; --no-warn-unlinked drops the warnings and keeps the count; the book's UNIT rules act on the unit too: #unuse Old removes it, #use New adds it to the implementation uses when absent from both clauses, #useswap Old -> New1[, New2] removes Old and adds each New once into the section Old was in (a unit that does not use Old gets no edit from the swap) -- a unit both added and removed is kept, an entry inside a {$IF...} region refuses the unit (exit 1, nothing written); with no sibling .dfm, no #convert block or no matching instance the unit rules run alone (component part skipped; a book with no unit rules still needs the .dfm, exit 1); json adds component_part, uses[] {action,unit,section,line,rule,reason}, uses_removed, uses_added; the To type's unit goes to the INTERFACE uses when the retyped field is declared in the interface, and is MOVED there from an implementation-only use (1.23.0);EVERY #convert block is validated and freshness-checked -- each #link/#default against its own From/To types, each #mapping against the blocks that #apply it -- with each path resolved segment by segment, no depth limit (a published leaf; each hop published, or public and class-typed; private never); a #convert type that resolves in no --db REFUSES the unit, dry run and --apply alike -- an index gap, not a rule error ('<Type> (line N) resolves in no --db -- index gap in the library or project index; reindex, or report it, before converting'); json classes_built counts the classes whose members were resolved; a #link/#default/#mapping path through a member that exists but is inaccessible is SKIPPED, never applied and never an error -- the unit converts the rest -- and reported as a 'line N: warning: ...' line (text: under Warnings; json: warnings[] strings, items[] kind rule-path-unreachable, and unreachable[] {line,path,member,visibility,class,reason,message}); an inherited/inline .dfm object of a From type whose declaring ancestor is not converted is SKIPPED, never converted, while the unit's own instances, code and unit rules convert (1.22.0) -- each reported as a 'line N: warning: ...' line (json: warnings[], items[] kind inherited-instance-skipped, and inherited[] {name,type,line,ancestor_unit,ancestor_state,reason,action}; ancestor_state unconverted|converted|mismatched|outside: the declaring ancestor -- the nearest ancestor class whose .dfm opens it with object -- still has the From type, already has the To type, has a third type, or is not determinable: in no --db, or an ancestor .dfm on the way is missing or binary, which stops the walk; --only filters inherited[] too); one whose declaring ancestor ALREADY has the To type is RETYPED (1.26.0, C8 N2): inherited X: TFrom -> inherited X: TTo, keyword kept, nested and inline-frame children too; the properties its block overrides convert per the book (what it does not stream it inherits: no default resolved, no #default written); its code access sites are rewritten as for an own instance and the To unit is added; every code access to a field a converted ancestor declares (bound by the resolver, any level up) is rewritten too, .dfm block or not (N2a) -- json inherited[].action retyped|code|skipped|unverified (code: line = its first .pas reference), a converted[] line and items[] kind inherited-instance-retyped, not a warning; --only filters both; info capability inherited_retype; a code-only use of an UNCONVERTED ancestor's field is listed as action skipped, ancestor_state unconverted, reason 'ancestor not converted' (1.26.7, capability inherited_code_unconverted); the book's #warn <FromPath> "<text>" fires once per converted instance whose SOURCE .dfm streams FromPath (<value>, <name>, {Prop} expanded) -- 'line N: warning: <inst>: <text>', items[] kind book-warning with value; #check-ref <ToPath> <Class>.<Prop>[, ...] warns when the converted ToPath value contains \ or : (ref-path-like) or no listed Class.Prop of any .dfm in the project index carries it (ref-dangling), and once per run ref-not-checked when the index holds no .dfm property facts; info capabilities book_warn, check_ref (1.26.5); every code rewrite is scoped to the instance's field (receiver bound to it, or unbound / bare / Self. in a routine of the .dfm root class with no same-named local); a site the index cannot vouch for is NOT rewritten and is reported ('access site <file>:<line> ... not verified against the index -- not rewritten', items[] kind access-site-unverified, json access_sites_unverified); a --db resolved before resolver 1.12.0 is REFUSED, dry run too, naming the index ... --resolve-only fix; a #link carrying a cast never rewrites a .pas access site (1.27.0, interim): the cast's pas template is a statement with no correct splice inside an expression, so each bound site is reported -- 'line N: #link To <- From : Cast -- access site <file>:<line> <inst>.<From> not rewritten: ... convert this access site by hand', items[] kind cast-not-applied with instance, file, line and value (the cast); no .pas edit, the .dfm half of the cast unchanged; kind cast-applied is retired; info capability cast_site_refusal; a VALUE cast -- a castlib block with 'value strip-db' (shipped: StripDB, #link TableName <- TableName : StripDB) -- removes one trailing .db, any case, from the linked string: in the .dfm of each converted instance, and in .pas assignments whose right-hand side is ONE string literal; any other assignment and every read get no edit and a warning (items[] value-cast-applied {old_value,value} / value-cast-check; text 'value casts: N value(s) changed ...'); an unknown value keyword fails the run; info capability value_cast_strip_db (1.27.0); json pas_uses[] (1.27.0, dry run and --apply; info capability pas_uses) lists what the .pas still uses that the map does not cover: one row per (instance, member) the code reaches through a converted instance -- the access-site rewrite's own bound sites -- and one per global (routine/const/var/type) from a unit the reconciliation removes: {instance,from_type,to_type,member,kind method|property|field|event|const|var|type|routine|enum-value,visibility,declaring_unit,declared_in,status mapped|cast-refused|same-name|unmapped|global-dangling,lines[],count,resolution resolved|ambiguous|class-not-found|member-not-found|kind-unknown,candidates[]}; the From class is resolved through the unit's scope (the unit itself, then the LAST uses entry declaring it, then the book's qualified #convert From, then a lone declarer) -- several declarers left over is resolution ambiguous with candidates[] units and empty kind/declarer, never a pick (1.28.2, info capability pas_uses_resolution); text prints 'pas uses: N unmapped, M global-dangling, K same-name, J mapped, C cast-refused' and one line per unmapped member; a DESCENDANT unit (a class descending from the unit's root class at any level, or a form hosting it inline) that still streams a converted instance in its .dfm or uses it in code is a WARNING, never a refusal (1.25.0): 'line N: warning: descendant <Unit> still streams <Name> as <TOld> -- convert it next (needs C8 N2)', N = the instance's object line in this .dfm (json: items[] kind descendant-not-converted, descendants[] {unit,name,type,line,reason}; line = the descendant .dfm block, else its first code reference; reason dfm|code|both; --only filters it; only descendants the --db index are seen); a plan the edit applier would refuse in part (overlapping delete ranges -- an engine defect) fails the WHOLE unit before anything is written, dry run too, and a write that fails part-way is ROLLED BACK byte-identical (exit 2, '-- rolled back, unit not changed'; a failed rollback names the files it could not restore) (1.25.1): exit 1, 'ERROR: refused N edit(s) to <file> -- overlapping delete ranges (an engine defect) -- unit not changed, nothing written', json ok=false with that error; a .dfm component nested in another converted one is spliced into its parent's re-emit, and --only naming the parent converts it too (json only_included[] {name,parent}, text '--only: <child> converts too -- nested in <parent>'); a collection property (FieldDefs = < item ... end>) whose item members the book links (#link X.Items.* <- X.Items.*, identity) is carried whole when the To type publishes X with the same collection type, else reported NOT carried with its item count and counted as dropped, #ignore X notwithstanding; a deliberate refusal writes nothing and prints one 'REFUSED: <reason>' line -- a uses entry to change inside a {$IF...} region; an instance whose indexed .dfm span no longer holds it (lines added or removed, a block shrunk onto a sibling's end, or the .dfm cut short: '<Name>: index is stale for this .dfm -- reindex'); a #unuse / #useswap removing the unit that declares the From type of an instance left unconverted (skipped, inherited/inline, or excluded by --only) is refused too ('<rule> would leave <N> unconverted instance(s) of <Type> -- unit not changed') -- EXCEPT that with --only, when every such instance is one --only left out, the removal is SKIPPED (1.23.0: unit kept; json uses[] action skipped with a reason, a 'line N: warning:' line, items[] kind unit-rule-skipped; info capability only_skips_unit_rules); USES RECONCILIATION (1.27.0, C9, default on; --no-reconcile-uses = the 1.26.6 rules above, exactly): the converted .pas/.dfm are RE-INDEXED IN MEMORY (the indexer's own extractor, no DB written, so the dry run shows the --apply plan) and every #unuse / #useswap Old is a WATCH LIST -- the unit is KEPT while a component the converted .dfm still streams has a class declared in it (an unconverted instance, a second component type of that unit, an inherited instance the ancestor has not converted: R26's refusal becomes this, the --only skipped row is unchanged), REMOVED when only .pas code needs it (its dangling references named, the compile errors are the signal), KEPT when no --db indexes it; presence is scope-alias aware (#unuse DBTables matches Bde.DBTables, #use DB is satisfied by Data.DB); a bare name the conversion INTRODUCES into the .pas gets its declaring unit added -- interface uses when referenced above implementation -- and a name (or To type) two units declare is REPORTED, never picked (add #use <unit> to choose); a To-type tie the book's #use (or a uses entry of the unit) settles takes that unit, into the INTERFACE uses when the retyped field is declared there, or MOVED there (C9 A8-1); the C13 move is a row; every unit the #convert surface adds (a To type's unit, a #convert header's trailing unit) is an add row too (rule #convert, source rule, counted by uses_added; none when already present); json: uses[] action remove|add|skipped|kept|moved with source rule|reconcile|convert and needed_by[] {name,line,section}, uses_kept, uses_moved, uses_unresolved[] {name,line,section,reason ambiguous|not-found,candidates[] {unit,db}}, uses_reconcile on|off|degraded, items[] kinds unit-rule-kept, unit-rule-dangling, unit-rule-unverified, uses-unit-ambiguous (all warnings); after --apply the unit's OWN project DB -- the one --db that indexes it, a project index holding one .dproj/.dpr -- is refreshed with 'index --project <it> --db <it>' in a child process (json uses_reindex {status done|skipped|failed|dry-run|off,db,project,ms,reason}; a child still running after 10 minutes is terminated: failed; --no-reindex skips it; no other DB is ever written); info capability uses_reconcile; inside a #convert block '#migrate Old -> New' renames the member at every bound .pas access site of the block's converted instances (methods, events, properties; json items[] migrate-applied) and '#migrate Old -> DL_NONE' wraps each site, inst.Old -> DL_NONE(inst.Old), a deliberate break that does not compile until converted by hand (items[] deliberate-break, field todos); both make pas_uses[] status mapped; a with block, an unverified receiver, a scoped / template form or a member a #link already converts is never rewritten (items[] migrate-check); info capability migrate_members (C18 slice 1); an IDENTIFIER #migrate (file scope, or in a block naming uses units or an enum-value target; 1.38) renames every bare Old token in the .pas code -- var/param/field/result types, casts, is/as, generic arguments, enum literals; never comments or strings -- when New resolves in a --db (else items[] migrate-check per site plus one rule-level, line 0, per rule -- the editor marks the book line; no rename), maps an enum type pair member by member on the name after the lowercase prefix (an explicit #migrate member line overrides; an unmatched member in use is a migrate-check; --old-platform-db <file>, repeatable, 1.43, names the index of the platform the code was written against: the From enum's members are read from it first and today's --db members added, an enum only it declares maps too, it never answers for a target, and an unreadable one exits 2; info capability old_platform_enum_map), never renames a qualified Unit.Old site (migrate-check), and adds the unit declaring New to uses (interface uses when a site is there), on a unit with no sibling .dfm or no matching instance too (1.42; component part skipped); info capability migrate_identifiers; --only names match case-insensitively; a name matching no #convert instance is ignored, never an error, and reported (json only_matched[] / only_unmatched[], always present; text '--only: no #convert instance named X (ignored)'); --unit may repeat (1.23.0): every unit runs in ONE process sharing one rule-book validation and one member cache -- text: one '=== unit i of N: <path> ===' section per unit, then 'batch: N unit(s) -- a ok, b refused, c failed; classes_built K; exit E'; json: ONE apply-batch/1 document {mode,rules_file,units_count,ok,exit_code,ok_count,refused_count,failed_count,classes_built (the run total),units[]: one apply/1 per unit, each equal to that unit's single run -- its classes_built is the unit's own}; under --apply a file a unit cannot write fails that unit before anything is written (exit 2); a unit's refusal or failure never stops the others; exit = the worst unit's; 1.42: the batch RUNS ancestor-first -- a unit runs after every unit of the run that declares one of its inherited / inline .dfm objects (owner ruling Q5), so --apply retypes them; units[] stays in --unit order; text prints 'convert-apply: units run ancestor-first: <names>' when the order changed; info capability batch_units; 1.33.0: every apply/1 (single or units[]) carries exit_code (that unit's); a --unit no --db indexes is REFUSED, dry run and --apply alike (reason '<unit> is not covered by any supplied --db ...'); --progress writes one STDERR line per finished unit, flushed, stdout unchanged, off by default -- {"progress":{"verb":"convert-apply","unit_done":i,"units":N,"unit":"<path>","ok":b,"refused":b,"exit_code":E}} (info capability batch_progress); json has ok=false, refused=true (a JSON bool) and reason = that text -- every other outcome, success or failure, has refused=false and reason '')
FlagArgumentMeaningDefault
--unit<F.pas>
--rules<file>
--dbPATH
--only
--only-type<Type1,Type2,...>
--castlib<file>
--glyph-stitch
--apply
--no-backup
--raise-encoding<path>=utf8-bom
--no-warn-unlinked
--no-reconcile-uses
--no-reindex
--old-platform-db<file>
--format
--json

Described in:

convert-scaffold

Auto-generates a valid conversion-rules file from the real property trees of a from-type and a to-type.

drag-lint convert-scaffold --from <FromType> --to <ToType> [--output <file>] [--surface dfm|pas] [--depth N] [--rules <file>] [--progress-interval S] --db PATH [--db ...] (auto-generate a VALID conversion-rules file from the real F/T property trees, expanded to --depth N, else the --rules book's #depth N, else 5 (a bad value exits 2): concrete #link where 1 source matches by leaf-name+type, ??? for ambiguities, DROPPED notes for orphaned F props; --surface picks the TO-side target bar, default dfm=published-properties-only, pas=published+public incl. public fields; is_writable=false targets are never auto-linked on either surface; --progress-interval S: see PROGRESS below)
FlagArgumentMeaningDefault
--from<FromType>
--to<ToType>
--output<file>
--surface
--depthN
--rules<file>
--progress-intervalS
--dbPATH

Described in convert-scaffold.

convert-validate

Parses and validates a conversion-rules file (a reFind-superset DSL), checking its #link/#default paths against the real property trees.

drag-lint convert-validate --rules <file> [--from <FromType>] [--to <ToType>] [--print-parsed] [--glyph-stitch] [--db PATH ...] (--glyph-stitch (OFF by default; also errors on a G[I/N] link whose --from class has no glyph-count reader); parse+validate a reFind-superset conversion-rules DSL; checks #link/#default paths against the real --from/--to members, segment by segment with no depth limit (a published leaf; each hop published, or public and class-typed; private never) -- lazily, per class, no tree is built, so --depth and the book's #depth are ignored here (and by the hidden convert-reemit), though a bad #depth (not 1..10, or a second one) is a line N error, and so is a From-only header ('#convert TFoo -> ' or '#convert TFoo': '#convert TFoo has no To type'; '#useswap X -> ': '#useswap X has no replacement unit'); and a #link glyph expression (<FromPath> G[I/N], stitched G[1/6]G[2/6], per-N alternatives split by commas, G[count]) for syntax, I in 1..N and one alternative per N, naming the column; 'line N: warning:' lines (e.g. a straight NumGlyphs carry beside a G-link) never change the exit code; a path whose members all EXIST but one is inaccessible (private anywhere, protected anywhere, a public leaf) is a warning on stdout, not an error: 'line N: warning: <path>: <Member> is <visibility> in <Class>; never applied unless a descendant class changes its visibility' -- only a segment naming no member is "not found" (exit 1); without BOTH --from and --to the book is only PARSED -- no path is checked -- and a 'NOTE:' line on stderr says so; a #warn path or {Prop} placeholder, or a #check-ref ToPath, naming no member is a line N error, and so is a malformed #warn / #check-ref (1.26.5); no JSON mode)
FlagArgumentMeaningDefault
--rules<file>
--from<FromType>
--to<ToType>
--glyph-stitch
--print-parsed
--dbPATH

Described in convert-validate.

create-enum-helper

Generates a Byte-family record helper (ToByte/FromByte/ToInteger/ FromInteger/ToString/FromString) for an enum type.

drag-lint create-enum-helper --qname <TEnum> [--apply|--json|--no-backup] [--no-compile-gate] [--methods <csv>] [--tostring rtti|case] [--db PATH] [--project <X.dproj> [--platform <p>] [--rsvars <bat>] [--build-timeout <s>]] - generate a Byte-family record helper for an enum
FlagArgumentMeaningDefault
--project<X.dproj>
--platform<p>
--rsvars<bat>
--build-timeout<s>
--qname<TEnum>
--apply
--json
--no-backup
--no-compile-gate
--methods<csv>
--tostring
--dbPATH

Described in:

cycles

Finds uses cycles among indexed units and, on request, proposes a followable refactoring plan to break them.

drag-lint cycles --db <file.sqlite> [--edges] [--causes] [--hub] [--plan [--no-hub-surface | --hub-surface] [--apply] [--project <X.dproj>]] [--f2047 [--unit <stem>]] [--fix --project <X.dproj> [--hub-surface | --no-hub-surface] [--stall-exit-min <minutes>] [--cycle <n> | --unit <stem>] [--part a|b|all] [--apply] [--no-backup] [--no-reindex] [--no-compile] [--shadow-out <dir>] [--rsvars <path>] [--build-timeout <s>]] [--ctor-wide] [--format json|text] [--library-db <lib.sqlite>] [--platform win32|win64] [--rules-dir <dir>] (circular unit deps; --hub = per group its hub units (removal leaves the rest acyclic): edges, ref weights and surfaces per side, dead uses; read-only, no planner; --f2047 = only the interface-only cycles dcc rejects with F2047, each edge with its forcing symbols and the next --plan / --fix commands; --plan = mechanical refactoring playbook: moves, uses edits, new-unit text, checklist + predicted output, and a "Fix it" block per group naming the exact --fix dry-run and --apply commands; --ctor-wide = the wider constructor-inversion whitelist for --plan / --fix (off by default); --fix = the mechanical fix of one group, see the cycles-fix entry)
FlagArgumentMeaningDefault
--db<file.sqlite>
--edges
--causes
--hub
--hub-surface
--no-hub-surface
--plan
--project<X.dproj>
--f2047
--unit<stem>
--fix
--cycle<n>
--part
--apply
--no-backup
--no-reindex
--no-compile
--shadow-out<dir>
--rsvars<rsvars.bat>
--build-timeout<s>
--format
--library-db<lib.sqlite>
--platform
--rules-dir<dir>

Described in:

deps-report

Produces a third-party dependency rollup from an index: which external units/libraries an indexed codebase depends on.

drag-lint deps-report --db <file.sqlite> [--db ...] [--depth N] [--edges] [--all-sources] [--name <pat>] [--format text|json|csv] [--output <file>] (third-party dependency rollup)
FlagArgumentMeaningDefault
--db<file.sqlite>
--depthN
--edges
--all-sources
--name<pat>
--format
--output<file>

Described in deps-report.

diff

Compares two index databases and reports what changed between them -- for example an index snapshot taken before and after a refactor.

drag-lint diff --db <old.sqlite> --db <new.sqlite> [--json]
FlagArgumentMeaningDefault
--db<old.sqlite>
--json

Described in diff.

doc-drift

Diagnostic that computes deterministic doc-vs-code drift findings for one symbol.

drag-lint doc-drift --qname X --db PATH [--json] (diagnostic: deterministic doc-vs-code drift findings for one symbol)
FlagArgumentMeaningDefault
--qnameX
--dbPATH
--json

Described in doc-drift.

doc-forget

Reap or rename the project tags on inbound and Registered as: documentation facts; a dry run unless told to apply.

drag-lint doc-forget --scope <file.pas|dir> (--project <Tag> [--rename <Tag>=<New>] | --untagged | --list-tags) [--apply|--no-backup] - reap project tags on inbound doc facts
FlagArgumentMeaningDefault
--scope<file.pas|dir>
--project<Tag>
--rename<Tag>
--untagged
--list-tags
--apply
--no-backup

Described in doc-forget.

document

Writes DocInsight documentation into every public declaration a project owns.

drag-lint document --qname <Foo.TBar.Baz> [--profile <name>] [--apply|--json|--format json|--no-backup|--migrate-pure] [--db PATH] - generate/repair a managed DocInsight comment
FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--apply
--json
--no-backup
--migrate-pure
--dbPATH

Described in:

document-all

Documents every public declaration in every indexed unit, with no project scope.

drag-lint document-all [--profile <name>] [--stubs|--apply|--json|--format json|--no-backup|--include-accessors|--document-third-party|--migrate-pure] [--db PATH] - document every public decl in every indexed unit (no project scope)
FlagArgumentMeaningDefault
--stubs
--apply
--json
--no-backup
--include-accessors
--migrate-pure
--dbPATH

Described in document-all.

dump-call-edges

Diagnostic that dumps every resolved call edge in the index as refid|targetqname|confidence rows.

drag-lint dump-call-edges --db PATH (diagnostic: resolved call edges: ref_id|target_qname|confidence)
FlagArgumentMeaningDefault
--dbPATH

Described in dump-call-edges.

dump-refs

Diagnostic that dumps every ref in a file together with its enclosingsymbolid attribution.

drag-lint dump-refs <file> --db PATH (diagnostic: refs + enclosing_symbol_id attribution)
FlagArgumentMeaningDefault
--dbPATH

Described in dump-refs.

exception-facts

Lists which routine raises and handles which exception type, by routine or by type.

drag-lint exception-facts (--target <routine> | --name <Type>) --db <db> [--json]
FlagArgumentMeaningDefault
--target<routine>
--name<Type>
--db<db>
--json

Described in exception-facts.

exceptions-sync

Declare one exception class per distinct raise Exception.Create message, then rewrite the raise sites.

drag-lint exceptions-sync [--profile <name>] [--db <file.sqlite>] [--config <lint.json>] [--apply] [--json] (materialise the project's derived exception classes)
FlagArgumentMeaningDefault
--db<file.sqlite>
--config<lint.json>
--apply
--json

Described in exceptions-sync.

explain

Explains one lint rule in plain words: what it means, why it matters, a bad and a good example, its default, whether it can be fixed, and how to suppress it.

drag-lint explain <rule-id> [--json|--format json] [--rules-dir <dir>]   (what one lint rule means, why it matters, bad / good example, default, fixable, and how to suppress it; an unknown id lists the nearest ids and exits 2)
FlagArgumentMeaningDefault
--json
--rules-dir<dir>

Described in explain.

export

Uses export enums with --format delphi-const to dump indexed enum types as Delphi const declarations.

drag-lint export enums --db <file.sqlite> [--format firebird-sql|csv|json|delphi-const] [--output <file>]
drag-lint export obsidian --db <file.sqlite> --output-dir <dir> [--open]
FlagArgumentMeaningDefault
--db<file.sqlite>
--format
--output<file>
--output-dir<dir>
--open

Described in:

extract-interface

Declares an interface from the members of a class the project uses and adds it to the class; --apply through a scratch build and the compile gate.

drag-lint extract-interface --class <name> (--plan | --apply --project <X.dproj>) --db <db> [--members <a,b>] [--name <IFoo>] [--reparent-interfaced[=norefcount]] [--retype-consumer <Routine>.<param>] [--no-backup] [--platform <p>] [--rsvars <bat>] [--build-timeout <s>] [--no-compile] [--library-db <db>] [--json|--format json]
FlagArgumentMeaningDefault
--class<name>
--members<a,b>
--name<IFoo>
--reparent-interfaced[=norefcount]
--retype-consumer<Routine>.<param>
--plan
--apply
--project<X.dproj>
--db<db>
--no-backup
--platform<p>
--rsvars<bat>
--build-timeout<s>
--no-compile
--library-db<db>
--formatjson

Described in Extract an interface from the members used (scratch + compile gate).

extract-method

Pulls a run of statements out of a routine into a new method.

drag-lint extract-method --in <F> --from-line <L1> --to-line <L2> --name <N> [--json|--apply|--no-backup] [--no-compile-gate] [--project <X.dproj> [--platform <p>] [--rsvars <bat>] [--build-timeout <s>]] - pull a statement run into a new method
FlagArgumentMeaningDefault
--in<F>
--from-line<L1>
--to-line<L2>
--name<N>
--project<X.dproj>
--platform<p>
--rsvars<bat>
--build-timeout<s>
--json
--apply
--no-backup
--no-compile-gate

Described in:

fb-snapshot

Connects to a Firebird database and captures a snapshot into a sqlite index.

drag-lint fb-snapshot --connection "Database=...;User=...;Password=...;DriverID=FB" --db <sql.sqlite>
FlagArgumentMeaningDefault
--connection
--db<sql.sqlite>

Described in fb-snapshot.

find-callees

Lists the resolved outgoing calls of one routine, plus the library-bound ones.

drag-lint find-callees --qname <Foo.Bar> | --name <bare> --db PATH [--db LIBRARY | --library-db LIBRARY] [--json] (resolved outgoing calls of routine X; --name = every routine of that bare name; library-bound callees are marked library)
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--name<bare>the bare routine name (the find-callers spelling); every routine of that name is a target
--dbPATH
--library-dbLIBRARYthe library index to bind library-bound callees against at read time (a second --db does the same)
--json

Described in find-callees.

find-deadcode

Scans the index for code with no references -- candidates to delete.

drag-lint find-deadcode [--kind method|function|...] [--include-private] [--db PATH]
FlagArgumentMeaningDefault
--kind
--include-private
--dbPATH

Described in:

find-unit

Finds which indexed unit declares a symbol, and adds that unit to a file's uses clause.

drag-lint find-unit --name <Symbol> --in <file> [--json|--apply|--no-backup] --db <db> - add the declaring unit to uses
FlagArgumentMeaningDefault
--name<Symbol>
--in<file>
--json
--apply
--no-backup
--project<X.dproj>
--no-compile-gate
--rsvars<bat>
--build-timeout<s>
--db<db>

Described in find-unit.

format

Runs YADF formatting across a project's files, with indexing involved as part of the same action.

drag-lint format <file> [--yadf-path PATH] [--dry-run] [--diff] (rewrites the file IN PLACE via YADF; --dry-run resolves + version-checks and writes nothing, --diff formats a copy and prints the diff. Refuses YADF older than 1.0.6.6 (exit 4) and restores the file if formatting changes what the unit declares (exit 5). Exit 0 also when YADF declines the file (its content guard leaves it unchanged; prints "Declined: <file>", not a failure))
FlagArgumentMeaningDefault
--yadf-pathPATH
--dry-run
--diff

Described in:

forms-csv

A CSV of a project's forms, one row per form, telling a tester how to reach each one from the main form.

drag-lint forms-csv --project <X.dproj> --db <file.sqlite> [--output <f.csv>] [--root <TfrmMAIN>] (tester CSV, one row per form: menu/ribbon/tab path, control, handler, modal, confidence)
FlagArgumentMeaningDefault
--project<X.dproj>
--db<file.sqlite>
--output<f.csv>
--root<TfrmMAIN>

Described in Forms for testers (CSV).

gain

Sums the per-user usage log: tokens returned versus source bytes avoided, per verb and per day.

drag-lint gain [--since yyyy-mm-dd] [--json]
FlagArgumentMeaningDefault
--sinceyyyy-mm-dd
--json

Described in Gain (counted savings).

generate-docs

Uses generate-docs to produce a doc-comment stub for one qualified symbol.

drag-lint generate-docs --qname <Foo.TBar.Baz> [--format xmldoc|pasdoc] [--db PATH]
FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--format
--dbPATH

Described in Doc Comment Stub (symbol).

generate-test

Uses generate-test to produce a unit-test skeleton for one qualified symbol.

drag-lint generate-test --qname <Foo.TBar.Baz> [--framework dunitx|dunit] [--db PATH]
FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--framework
--dbPATH

Described in Unit Test Stub (symbol).

ghost-check

Compiles a project with one or more units' content temporarily replaced by their unsaved editor buffers, then restores the original files unchanged.

drag-lint ghost-check <dproj> ( --unit <real.pas> --buffer <buf> | --overlays <manifest> ) [--platform win32|win64] [--in-place] [--format json|text]
FlagArgumentMeaningDefault
--unit<real.pas>
--buffer<buf>
--overlays<manifest>
--platform
--in-place
--format

Described in ghost-check.

ghost-recover

Scans a project's hidden D-RAG folder for recovery journals left behind when a ghost-check overlay was interrupted by a crash.

drag-lint ghost-recover <dproj> (restore any file left overlaid by an INTERRUPTED ghost-check)

Described in ghost-recover.

glyph-vacuum

Measure every streamed glyph or picture under a tree before writing a glyph rule.

drag-lint glyph-vacuum --root DIR [--root DIR ...] --output DIR [--append] [--db PATH ...] (measure every streamed graphic under the roots before writing a glyph rule: walks .dfm/.fmx, decodes each Picture.Data/Glyph.Data blob (wrapper class, format, width/height/bpp/palette), pairs it with its count property (NumGlyphs and kin), writes instances.tsv + classes.tsv + skipped.tsv + images\ + gallery.html into --output; --append merges into an existing --output; --db only qualifies class_unit / declared count default / runtime_refs)
FlagArgumentMeaningDefault
--rootDIR
--outputDIR
--append
--dbPATH

Described in glyph-vacuum.

graph

Uses graph to export the indexed call/reference graph in DOT format, whole or rooted at a name substring; json and html add the Markdown text nodes.

drag-lint graph --db <file.sqlite> [--format dot|mermaid|json|html] [--name <root-substr>] [--output <file>]
FlagArgumentMeaningDefault
--db<file.sqlite>
--format
--name<root-substr>
--output<file>

Described in Export Graph (DOT).

happens-before

Answers whether one event (a write, a read, a call, a source line, an Application.Run) has happened before another on every execution: YES, NO or MAY.

drag-lint happens-before (--a <event> --b <event> | --preset <name>) --db <db> [--json] [--max-routines N] [--max-seconds S]
FlagArgumentMeaningDefault
--a<event>
--b<event>
--preset<name>
--db<db>
--json
--max-routinesN
--max-secondsS

Described in happens-before.

helpers-of

Lists record/class helper edges targeting a given type, anywhere in the index.

drag-lint helpers-of <T> [--json] --db <db> - list record/class helper edges targeting type T anywhere in the index
FlagArgumentMeaningDefault
--json
--db<db>

Described in helpers-of.

hover

Hover card for the symbol under the caret: signature, type, documentation, callers; an interface method also lists its implementers.

drag-lint hover --qname <Foo.Bar> [--line N] [--db <file.sqlite>] [--format plain|md|json]
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--lineN
--db<file.sqlite>
--format

Described in Hover at Cursor.

ide-release

Asks a running drag-lint Delphi IDE plugin not to respawn its drag-lint.exe child processes for a while -- and to drop the running one on its next request.

drag-lint ide-release [--seconds N] [--owner NAME] [--resume [--all]] [--status] [--json] (writes a hold sentinel: a running Delphi IDE plugin will not respawn drag-lint.exe while it lasts and stops its LSP child on the next request that wants it, so the engine binary can be rebuilt while the IDE stays open; default 120s, --resume clears it early. --owner NAME makes the hold that owner's: --resume --owner NAME ends only it, other owners' holds stay (a bare --resume ends only the unowned hold; --resume --all ends every hold). Frees nothing by itself -- build\stage-engine.ps1 kills the running holder and retries. The plugin job queue also DEFERS its heavy jobs for the duration rather than starting them)
FlagArgumentMeaningDefault
--secondsN
--ownerNAME
--resume
--all
--status
--json

Described in ide-release.

impact

Reports what would be affected if a chosen symbol changes -- the set of code to retest.

drag-lint impact --qname <Foo.Bar> [--db <file.sqlite> | --all-projects [--platform win32|win64] [--config <manifest>]] [--depth N] [--format text|json]
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--db<file.sqlite>
--depthN
--format
--all-projects
--platformwin32|win64
--config<manifest>

Described in Impact / Blast Radius (symbol).

implementors

Who implements an interface, which method answers each interface method in each class, and who calls or uses an interface member.

drag-lint implementors --target <IFoo|IFoo.Bar|TFoo|TFoo.Bar> --db <file.sqlite> [--library-db <lib.sqlite>] [--uses] [--max-sites N] [--include-library] [--format text|json|dot|mermaid] [--json] [--output <file>]
FlagArgumentMeaningDefault
--target<IFoo|IFoo.Bar|TFoo|TFoo.Bar>
--db<file.sqlite>
--library-db<lib.sqlite>
--uses
--max-sitesN
--include-library
--format
--json
--output<file>

Described in Interface Implementors Report.

import-log

Parses an external dcc or msbuild build log and folds its errors and warnings into drag-lint's stored findings.

drag-lint import-log <logfile> --db <file.sqlite> (parse dcc/msbuild log)
FlagArgumentMeaningDefault
--db<file.sqlite>

Described in Import Build Log.

index

Writes DocInsight documentation into every public declaration a project owns.

drag-lint index <path> [--db <file.sqlite>] [--watch [--interval N]] [--library-db <lib.sqlite> ...]
FlagArgumentMeaningDefault
--db<file.sqlite>
--watch
--intervalN
--library-db<lib.sqlite>consult another index for calls THIS one cannot resolve (value receivers typed by name bind too; the manifest key libraryResolve opts a section in).
--wait-library<min>when the platform library of a libraryResolve section is NOT READY, probe every 30 s up to min minutes, then continue (marked pending).
--require-librarya not-ready platform library is ERROR, exit 2, instead of continuing against the project only.
--stall-exit-minmina counter standing still this long ends the run: exit 8, or exit 9 at a quarter of the limit when RAM is critical. A moving counter is never stopped. Off by default.
--max-file-kbN
--no-use-ignore
--no-sql-ms
--deep
--shallow
--exclude-under
--include-only
--project<file.dproj>
--build-config<Release|Debug|name>
--recompile
--rebuild
--dry-run
--rule-cache-warmbackground|wait|off

Described in:

info

The plugin's status window -- versions, connection health, and which indexes are actually in use.

drag-lint info [--json] [--db <file.sqlite>]... (engine self-info: product/extractor/resolver versions, build date, MIT, tree-sitter + capabilities; read-only; the text form prints extractor:, resolver: and grammar dlls: (size:sha256-16 per DLL) lines as --json does -- 1.51.0 printed only the ABI line)
FlagArgumentMeaningDefault
--json
--db<file.sqlite>

Described in:

init

Registers a project in the manifest, indexes it, finds its index and wires Claude Code, VS Code and Cursor to serve it, in one command.

drag-lint init --project <file.dproj> [--dry-run] [--home-dir <dir>] [--appdata-dir <dir>]
FlagArgumentMeaningDefault
--project<file.dproj>
--dry-run
--home-dir
--appdata-dir

Described in init: one command from a project to a wired AI client.

lazy-init

Names what an initialization section does; --apply moves its body verbatim into a run-once routine, through a scratch build and the compile gate.

drag-lint lazy-init (--unit <name> | --all) (--plan | --apply --project <X.dproj>) --db <db> [--name <routine>] [--defer] [--no-backup] [--platform <p>] [--rsvars <bat>] [--build-timeout <s>] [--no-compile] [--library-db <db>] [--json|--format json]
FlagArgumentMeaningDefault
--unit<name>
--all
--name<routine>
--defer
--plan
--apply
--project<X.dproj>
--db<db>
--no-backup
--platform<p>
--rsvars<bat>
--build-timeout<s>
--no-compile
--library-db<db>
--formatjson

Described in Prepare heavy initialization for lazy loading (first phase).

library-drift

Flags registered library roots that have source on disk but nothing in the index.

drag-lint library-drift [--platform <p>] [--config <path>] [--json] - registry library roots that have source on disk but none in the index (exit 2 if drift; roots the section exclude prunes are listed as excluded, not counted)
FlagArgumentMeaningDefault
--platform<p>
--config<path>
--json

Described in Library Drift Check.

Links a project's code index to a SQL index so ORM-style relationships between Delphi symbols and SQL objects can be resolved across both.

drag-lint link-orm --db <projDb.sqlite> --db <sqlDb.sqlite>
FlagArgumentMeaningDefault
--db<projDb.sqlite>

Described in link-orm.

lint

lint --fix repairs findings of the 147 fixable rules; --json reports per finding whether it was applied; lint accepts a folder.

drag-lint lint <path> [--rule <id>] [--disable id1,id2] [--rules-dir <dir>] [--json] [--labels] [--no-preprocess] [--library-db <lib.sqlite>] [--build-config <name>]
FlagArgumentMeaningDefault
--rule<id>
--disable
--rules-dir<dir>
--json
--labels
--no-preprocess
--library-db<lib.sqlite>
--db<index.sqlite>
--project-rules
--build-config<name>
--stand-in-for<realpath>
--in<f.pas>
--fix
--apply
--project<X.dproj>
--compile-gate
--no-compile-gate
--fix-line<L>
--fix-rule<id>
--no-backup
--platform<p>
--rsvars<bat>
--build-timeout<s>
--no-compile
--profile<name>
--target-compiler<ver|auto>
--output<file>
--col<c>
--name<ident>
--config<file>
--no-budget

Described in:

lint-all

Project-wide lint rule (error): a form, frame or data module whose ancestor class is declared in no project unit and not in the platform library.

drag-lint lint-all --db <db> [--rule doc-engine-refresh] [--fix --apply --fix-rule doc-engine-refresh] (documentation rule, ON, info: a managed facts block or marked <summary> is behind the index; --fix regenerates it)
FlagArgumentMeaningDefault
--db<db>
--rule<id>
--fix-rule<id>
--project<.dproj>
--build-config<name>
--disable
--output<report.txt>
--json
--labels
--quietsuppress per-file progress lines written to stderr
--lint-third-party
--no-preprocess
--fix
--fix-naming
--apply
--changed-since<rev>
--no-stand-downmeasurement runs: open no stand-down channel, so a maintenance stand-down from another process cannot cut the run to PARTIAL (exit 4)
--shared-db<db>another project index, repeatable: evidence for a closure-dependent dl:ok on a dl:shared unit; on a --db copy inside a _D-RAG folder of a git worktree (1.58) the sibling DBs are taken from the same relative place under the worktree root
--no-budget

Described in:

lint-project

Runs project-scoped structural lint rules against an index -- checks such as god-class, unused-public-symbol.

drag-lint lint-project --db <file.sqlite> [--library-db <lib.sqlite>|none] [--profile <name>] [--rule god-class|unused-public-symbol|interface-reference-cycle|layering-violation|unused-private-member|unused-unit-in-uses|circular-uses|repeated-type-switch|global-only-uses-edge|duplicate-global-decl|uses-global-census|discarded-effect-free-result|query-name-with-effect|assert-with-side-effect|enum-ordinal-persisted|unused-enum-value|unused-global|help] [--layers <f.json>] [--json] [--output <f>]
FlagArgumentMeaningDefault
--db<file.sqlite>
--rule
--layers<f.json>
--json

Described in lint-project.

lint-tree

Answers one question lint-all cannot: does an interface edit to this unit reach any dependent?

drag-lint lint-tree --unit <B.pas> --db <file.sqlite> [--buffer <buf>] [--project <.dproj>]
FlagArgumentMeaningDefault
--unit<B.pas>
--db<file.sqlite>
--buffer<buf>
--project<.dproj>
--baseline<f.json>
--write-baseline<f.json>
--platform
--with-rules
--compile
--format

Described in lint-tree.

lsp

Hover, code lens and an MCP tool show which exception types a routine raises and handles.

drag-lint lsp --db <file.sqlite> [--no-exception-facts]
FlagArgumentMeaningDefault
--db<file.sqlite>
--no-exception-facts
--stdio
--clientProcessId
--proxy
--delphi-lsp<path>
--trace<file>
--merge-diagnostics
--merge-completion
--merge-hover
--merge-definition
--merge-navigation
--merge-budget-ms<n>
--full-rules
--delphi-lsp-bits32|64
--no-preprocess

Described in:

manifest

Shows which drag-lint.json this engine reads and why; moves the exe-side one to %APPDATA% once (renamed, never deleted). Installed layout v2, off by default.

drag-lint manifest where [--manifest <path>] [--json] (read-only: which drag-lint.json, log folder and library folder this engine resolves, and each lookup rung. Order: explicit DRAGLINT_MANIFEST / --manifest, then with DRAGLINT_LAYOUT=v2 the file in %APPDATA%\drag-lint, then beside the exe. Creates, moves and renames nothing)
drag-lint manifest migrate [--apply] [--dry-run] [--json] (one-time, installed layout v2 phase 2: without --apply (or with --dry-run, which overrides --apply) plans and touches nothing; with --apply and DRAGLINT_LAYOUT=v2 writes %APPDATA%\drag-lint\drag-lint.json with outDir and relative includes made absolute, so every DB stays put, then RENAMES the exe-side file to drag-lint.json.migrated-<date>. Never deletes, never overwrites. Exit 0 done / would / nothing to do, 2 refused, 1 failed)
FlagArgumentMeaningDefault
--manifestpath
--json
--apply

Described in manifest where / migrate (installed layout v2).

mcp-config

Adds drag-lint serve to Claude Code, VS Code and Cursor MCP config: merged, backed up, idempotent, removable.

drag-lint mcp-config (--claude-code | --vscode | --cursor | --all) [--remove] [--dry-run] [--name <n>] [--db <index>] [--engine <exe>] [--config-path <file>] [--json]
FlagArgumentMeaningDefault
--claude-code
--vscode
--cursor
--all
--remove
--dry-run
--name<n>
--db<index>
--engine<exe>
--config-path<file>
--json
--home-dir
--appdata-dir

Described in Register the MCP server (Claude Code, VS Code, Cursor).

The menu tree a Delphi program builds in code, read statically, and a check that the registered menu paths still match it.

drag-lint menu-drift --project <X.dproj> --db <file.sqlite> --registry <features dir> [--with-dfm] [--format text|json] [--output <f>] (code-built menu tree vs the registry's ide-menu paths and app-menu (form, path) surfaces, which imply --with-dfm; --registry defaults to <project>\_D-RAG\menu-registry: missing / moved / unregistered / notes; exit 0 no drift, 1 drift, 2 usage/setup, 3 stale index)
FlagArgumentMeaningDefault
--project<X.dproj>
--db<file.sqlite>
--registry<features dir>
--with-dfm
--formattext|json
--output<f>

Described in Code-built menu tree and registry drift.

The menu tree a Delphi program builds in code, read statically, and a check that the registered menu paths still match it.

drag-lint menu-tree --project <X.dproj> --db <file.sqlite> [--root <QName>] [--with-dfm] [--format text|json|paths] [--output <f>] (the menu tree a program builds in code, read statically; --with-dfm adds the .dfm menus with code links grafted in; exit 0 ran, 2 usage/setup, 3 stale index)
FlagArgumentMeaningDefault
--project<X.dproj>
--db<file.sqlite>
--root<QName>
--with-dfm
--formattext|json|paths
--output<f>

Described in Code-built menu tree and registry drift.

metrics

Size and complexity rows from the index per routine, class, unit and folder, repeated parameter groups, single implementors, and a saved trend.

drag-lint metrics --db <file.sqlite> [--level routine,class,unit,folder|all] [--in <path prefix>] [--top <n>] [--save] [--trend] [--halstead] [--json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--levelroutine,class,unit,folder|all
--in<path prefix>
--top<n>
--save
--trend
--halstead
--json

Described in:

migrate-dbs

Moves project index databases into each project's own D-RAG folder, matching the current index layout.

drag-lint migrate-dbs [--config <drag-lint.json>] [--apply] move project indexes into each project's _D-RAG folder
FlagArgumentMeaningDefault
--config<drag-lint.json>
--apply

Described in migrate-dbs.

migrate-reports

Rewrites the old PowerShell-style COMMAND line of saved reports to the CLI style and lists every file it left alone, with the reason.

drag-lint migrate-reports <file-or-folder>... [--project <P.dproj>] [--dry-run] [--json]
FlagArgumentMeaningDefault
--project<P.dproj>
--dry-run
--json

Described in Migrate saved reports.

narrow-param

Retypes a class-typed parameter to the deepest ancestor that declares every member the routine uses, when a static proof holds, through the compile gate.

drag-lint narrow-param (--routine <QName> [--param <name>] | --all) (--plan | --apply --project <X.dproj>) --db <db> [--no-backup] [--platform <p>] [--rsvars <bat>] [--build-timeout <s>] [--no-compile] [--library-db <db>] [--show-bound] [--json|--format json]
FlagArgumentMeaningDefault
--routine<QName>
--param<name>
--all
--plan
--apply
--project<X.dproj>
--db<db>
--no-backup
--platform<p>
--rsvars<bat>
--build-timeout<s>
--no-compile
--library-db<db>
--show-bound
--formatjson

Described in Narrow parameter types (compile-gated).

outline

Prints the file-scoped symbol outline for one Pascal unit.

drag-lint outline --in <path.pas> [--db <path>] [--format text|json] [--json] [--kind <k[,k...]>] [--no-locals] [--limit N]
FlagArgumentMeaningDefault
--in<path.pas>
--db<path>
--format
--json
--kind<k[,k...]>
--no-locals
--limitN

Described in outline.

pp-profile

Diagnostic that prints the resolved preprocessor define profile for a project, one symbol per line.

drag-lint pp-profile [--dproj PATH] [--platform win32|win64] [--config Release|Debug] [--in <file.pas> [--db <file.sqlite>]] (diagnostic: print the resolved define profile, one symbol per line; --in prints the profile of the owning project's active build)
FlagArgumentMeaningDefault
--dprojPATH
--platform
--config

Described in pp-profile.

preprocess-file

Diagnostic that prints a file's {$IFDEF}-resolved source to stdout under a given define set.

drag-lint preprocess-file --in PATH [--define SYM]... [--numeric K=V]... [--include-mode off|defines-only] [--no-near-search] [--tolerances] [--include-sites] (diagnostic: print {$IFDEF}-resolved source to stdout)
FlagArgumentMeaningDefault
--inPATH
--defineSYM
--numericK
--include-mode
--no-near-search
--tolerances
--include-sites

Described in preprocess-file.

project-context

Writes or checks the .dlcontext.json file beside a project: platform, config and define set, with the .dproj SHA-1 for staleness.

drag-lint project-context --project <x.dproj|x.dpr> [--platform P] [--config C] [--output <file>] [--json] [--check] (writes <base>.dlcontext.json beside the project: platform, config and the complete effective define set, plus the .dproj SHA-1 for staleness; --check writes nothing and exits 1 saying why when the file is missing or stale; a .dpr with no .dproj exits 2 unless --platform and --config are both given)
FlagArgumentMeaningDefault
--project<x.dproj|x.dpr>
--platformP
--configC
--output<file>
--json
--check

Described in project-context.

project-facts

Report what the build does: defines that are on and what sets each, imports, output paths and packages.

drag-lint project-facts --dproj PATH [--platform win32|win64] [--config Release|Debug] [--db PATH] [--json] (what the BUILD does: defines ON and what sets each, <Import>s, output paths, packages; flags a post-processor define with no build step imported)
FlagArgumentMeaningDefault
--dprojPATH
--platform
--config
--dbPATH
--json

Described in project-facts.

proptree

Recursive deep-property enumerator for a class: flattens its own and inherited properties into dotted paths, recursing into class-typed properties.

drag-lint proptree --qname <X> [--depth N] [--rules <file>] [--progress-interval S] [--no-to-persistent] [--refs-as-leaves] [--no-write-back] [--min-visibility published|public] [--format text|json] [--json] --db PATH [--db ...] (recursive deep-property enumerator: flattened dotted paths of a class's own+inherited properties, recursing into class-typed types; depth = --depth N (an integer >= 1), else the --rules book's #depth N (1..10), else 5 -- a K-segment path needs depth >= K-1; a bad --depth or #depth exits 2; --refs-as-leaves leaves TComponent-typed properties unexpanded (references, not owned sub-objects); types recovered by the ancestry-bridge are memoized back into the index automatically -- --no-write-back forces a read-only, non-mutating query; --min-visibility filters emitted leaves by effective visibility, default = all, schema proptree/2; --progress-interval S: see PROGRESS below)
FlagArgumentMeaningDefault
--qname<X>
--depthN
--rules<file>
--progress-intervalS
--no-to-persistent
--refs-as-leaves
--no-write-back
--min-visibility
--format
--json
--dbPATH

Described in proptree.

protocol

Registers draglint:// so a chart row opens its line in RAD Studio; a GUI helper exe, no PowerShell.

drag-lint protocol register [--handler <drag-lint-open.exe>] [--dry-run] [--force] (HKCU\Software\Classes\draglint -> the handler; --force accepts a *-wt\ path or replaces a foreign registration)
FlagArgumentMeaningDefault
--handler<drag-lint-open.exe>
--dry-run
--force

Described in Click-to-source: the draglint:// handler.

purge-locals

A size escape hatch for an index database that has grown too large: it drops local-variable and parameter symbols and runs VACUUM to reclaim space.

drag-lint purge-locals --db PATH [--json] (size escape hatch: drop skLocalVar/skParam symbols + VACUUM; call graph unchanged; re-inflated on next index)
FlagArgumentMeaningDefault
--dbPATH
--json

Described in purge-locals.

query

Find a database field by its screen caption; every hit says which place it came from and where the field is shown, edited and used.

drag-lint query --concept "<words>" [--place library,project,repository] [--links N] [--limit N] [--kind k,...] [--json] --db <db>
drag-lint query hints --db <file.sqlite> [--name <code>] [--rule <severity>]
drag-lint query find [--doc-tag X | --doc-contains Y | --decl-contains Z | --no-docs] [--kind K] [--name N] [--unit U] [--public] [--db ...]
drag-lint query implementors --target <IFoo|TFoo> --db <file.sqlite> [same flags] (alias of the implementors verb; --name is accepted for --target)
drag-lint query ancestors --name <type> [--of <ancestor>] [--db ...] [--json] (transitive class/interface hierarchy)
drag-lint query descendants --of <ancestor> [--db ...] [--json] (the REVERSE of ancestors: every CLASS descending from <ancestor>, across all scanned DBs. Derived INTERFACES are deliberately excluded -- this backs the conversion editor's class pickers. exit 1 = no such ancestor)
drag-lint query find-callers --name <callee-name> [--context N] [--resolved] [--db ...] [--json]
drag-lint query regions [--in <path|tail|mask>] [--region <id|key|mask>] [--list] [--db ...] [--json]
drag-lint query type-usage --in <file.pas> (--names A,B,C | --names-file <f>) [--db ...] [--json]
drag-lint query typecat --name <type> [--db ...] [--json] (resolve type category: float/string/class/interface/...)
drag-lint query unit-usage --unit <UnitName> [--in <file.pas>] [--db ...] [--json] [--limit N]
FlagArgumentMeaningDefault
--concept<words>
--place<list>
--linksN
--limitN
--kind<k,...>
--json
--db
--name<code>
--rule<severity>
--doc-tagX
--doc-containsY
--decl-containsZ
--no-docs
--unitU
--public
--of<ancestor>
--contextN
--resolvedprecise callers via resolved call_edges (grouped by target, certain|ambiguous); a PROPERTY/FIELD name lists its bound accesses [certain, read|write]; an ENUM VALUE name lists each bound read [certain, read] (resolver 1.6.0-alpha)
--qname<Unit.TClass.Method>
--receiver-type<type|qname|mask>
--case-sensitive
--exact
--in<path|tail|mask>
--region<id|key|mask>
--list
--text"<phrase>"
--near<QName>
--hops1..3
--hops-uses
--near-boost
--namesA
--names-file<f>

Described in:

reconcile-project

Lists every unit a project uses that is neither a project member nor in the library, judges each one (project unit or third-party) and fixes it either way.

drag-lint reconcile-project <App.dpr|.dproj> [--apply] [--to project|library] [--only <unit,...>] [--db <db>] [--full] [--json] [--config <path>] - sync project member list; flag stale used units. --only restricts MISSING (and therefore --apply) to a reviewed selection, so a dry run with --only previews exactly what --apply would write. --json carries `applied` (the OUTCOME, false when --apply had nothing to write) plus `backups` and `edited` when --apply is passed. MISSING = used units neither listed nor in the library (registry library path or the manifest library section's include); each is judged by the project's own roots: project unit (fix --apply) or third-party (fix --apply --to library, which adds its folder to that include in --config or the exe-dir drag-lint.json, .bak first). --json items carry owner, suggestedFix and folder
FlagArgumentMeaningDefault
--apply
--toproject|library
--only<unit,...>
--db<db>
--full
--json
--config<path>

Described in:

refresh-findings

Recompiles every unit of a project (a forced full build, refresh-findings --full) and refreshes its stored compiler findings.

drag-lint refresh-findings --project <X.dproj> [--db <db>] [--full] [--json] (recompile stale units + refresh compiler_findings; >=2 stale -> full build; no --db = the project's own DB)
FlagArgumentMeaningDefault
--project<X.dproj>
--db<db>
--full
--json

Described in Full Compile Sweep.

register-project

Add a new project to the manifest so index --all and the IDE can see it.

drag-lint register-project <file.dproj> [--name <Section>] [--apply] [--json] (add a NEW project to the manifest so index --all and the IDE can see it; dry-run without --apply)
FlagArgumentMeaningDefault
--name<Section>
--apply
--json

Described in register-project.

rename

Renames a symbol across the whole indexed project; LSP rename: the renameCompileGate setting builds the edits on a scratch mirror first (1.66).

drag-lint rename --kind symbol --name <QName> --to <New> [--json|--plan|--apply|--no-backup] [--project <X.dproj>] [--library-db <lib>] --db <db> - cross-unit rename, proved per occurrence; --apply passes the compile gate
FlagArgumentMeaningDefault
--kind
--name<QName>
--to<New>
--json
--apply
--plan
--project<X.dproj>
--library-db<lib>
--no-backup
--db<db>
--platform<p>
--rsvars<bat>
--build-timeout<s>
--no-compile

Described in Rename Symbol.

repo

Reports columns, fields and properties that are really enums, scored from code, DFMs, the repository and the database; read only.

drag-lint repo <init|info|import-fb|seed-fb|refresh-schema|backup|restore|gen-memtable|gen-param-array|gen-orm|update-orm|upgrade-orm-headers|gen-dataservice|migrate|check|paths|gen-const|check-const|read-dfm> (--repo <file> | --project <project file>) [--connection "<Firebird connection string>"] [--ddl <file.sql>[;...]] [--select <file>] [--in <file>] [--output <file>] [--name <Name>] [--replace] [--apply] [--dry-run] [--json] [--unit <UnitName>] [--datamodule <Name>] [--unit-file <file.pas>] [--dfm <file.dfm>[;...]] [--dataset <Name>] [--direction dfm-to-repo] [--from <table>] [--to <table>] [--depth <n>] [--stats] [--format text|sql|zip] [--db <project index>] [--library-db <library index>]   (the field repository: one SQLite file per database; Firebird is only read; gen-param-array needs no repository)
drag-lint repo enum-candidates --db <index> [--db <index> ...] [--project <x.dproj>] [--repo <file.dlrepo>] [--connection "<firebird>"] [--fields "A,B"] [--json] [--output <file>]
drag-lint repo enum-gen [--in <enum-candidates.json> | --db <index> ... | --project <x.dproj>] [--repo <file.dlrepo>] [--connection "<firebird>"] [--fields "A,B"] [--legacy <file.pas|dir> ...] [--output <Unit.pas>]
drag-lint repo init (--repo <file> | --project <project file>) (create an empty field repository; exit 1 when the file exists)
drag-lint repo info (--repo <file> | --project <project file>) [--json|--format json] (path, schema version, rows per table, DL_META keys; exit 1 when not a repository)
drag-lint repo import-fb --connection "<Firebird connection string>" (--repo <file> | --project <project file>) [--replace] (copy the FIB$ registry tables; ALIGNMENT -2 becomes NULL; read-only on Firebird; --replace writes a before-import text backup first; exit 1 failure, 2 schema drift)
drag-lint repo seed-fb (--connection "<Firebird connection string>" | --ddl <file.sql>[;...]) (--repo <file> | --project <project file>) [--apply | --select <id file>] [--json] (fill an EMPTY repository from the Firebird schema or a DDL script; prints the change set and writes nothing unless --apply or --select; read-only on Firebird)
drag-lint repo refresh-schema (--connection "<Firebird connection string>" | --ddl <file.sql>[;...]) (--repo <file> | --project <project file>) [--apply | --select <id file>] [--json] (re-read the schema into a filled repository as a change set: new and changed values are checked, vanished ones are unchecked deletes; hand-edited columns are never touched; no --apply = dry run; --select <id file> writes exactly the listed ids; schema 8: also column position, own default, COMPUTED BY, identity, precision, charset, collation, COMMENT ON text, CHECK text, constraint index, sequence options, tables (global temporary, external) and indices, then DL_META schema_facts_version = 8 once every fact change is applied)
drag-lint repo backup (--repo <file> | --project <project file>) [--format text|sql|zip] [--output <file>]
drag-lint repo restore --run <run id|run folder|manifest> [--run-dir <folder>] [--repo <file> | --project <project file>] [--apply] [--json]
drag-lint repo gen-memtable --in <csv file> [--name <Name>] [--output <file>] (Pascal source that builds the fields of a TFDMemTable from a field-definition CSV; exit 2 on a bad CSV)
drag-lint repo gen-param-array (--in <unit.pas> [--dfm <file>] | --project <X.dproj> --all [--only <unit,...>]) [--query <Name>] [--table <Name>] [--step-size <n>] [--progress-form <Form>] [--prepare-queries] [--plan | --apply --project <X.dproj> [--no-backup] [--platform <p>] [--rsvars <bat>] [--build-timeout <s>]] [--json] (FireDAC Array-DML loop from the unit's DFM, inserted as a braced comment before the final end.; no flag prints the block, --plan the diff, --apply writes through ONE compile gate; --prepare-queries first does the IDE assistant's query preparation (each SELECT TFDQuery gets its TFDUpdateSQL INSERT SQL, ObjectView=False, no CachedUpdates; update object / schema adapter renamed ZZZ*, persistent fields removed with their declarations; .dfm + .pas diffs in --plan, both written through the gate); exit 1 a unit refused or no block, 2 bad flags or a baseline that does not build)
drag-lint repo gen-orm (--repo <file> | --project <project file>) --code-dir <folder> [--table <T,...>] [--db <index>] [--library-db <db>] [--json] [--apply [--no-backup] [--run-dir <folder> | --no-manifest]] (new i<T>.PAS + u<T>.PAS ORM units per repository table; --db / --library-db: each uses clause lists the unit the index says declares a symbol, the generator's table where it does not know; dry run prints the diff, --apply writes 7-bit ASCII, an existing file is first copied to <file>.BCKn; prints add to project: per new file; 1.65: an enumeration column (ISENUM) starts at Low(T), streams as its byte via DefineProperties (DB-RAD regions 16 / 17) and is stored as a byte (AsByte) or an integer (any other FIELD_AS_TYPE); 1.66: every u<T> also gets BinWrite / BinRead for the ORM3 Binary object format (DB-RAD regions 18 / 19: one TMicBinaryWriter call per column in name order, BinRead its mirror; an enumeration is one byte, ToByte / FromByte); TDate / TTime columns go through TDateTime(fX) in regions 10 / 11 (1.66); --json (1.65): one JSON plan document on stdout whatever the exit code -- verb, apply, units[] (file, kind, regions[{id, differing_lines}], uses[], diff on a dry run), skipped[{text, refused}], summary {new, changed, unchanged, skipped, refused, written}.)
drag-lint repo update-orm (--repo <file> | --project <project file>) --code-dir <folder> [--server-dir <folder>] [--client-dir <folder>] [--table <T,...>] [--save-form legacy|current] [--overwrite-edited <id,...|all>] [--db <index>] [--library-db <db>] [--json] [--apply [--no-backup] [--run-dir <folder> | --no-manifest]] (rewrites ONLY the DB-RAD regions of the existing i/u/_SERVER/_CLIENT units, every other byte kept -- except, with --db / --library-db, the uses clauses: a needed unit is added (uses +X), a TableTools unit is removed (uses -X) only when every name the unit uses resolves and none needs it, and a clause holding {$IFDEF} or a comment is never rewritten (its changes are listed as uses ?-X / ?+X); a region of an id it does not generate (DB-RAD 99) is hand code and kept; a unit whose markers cannot be trusted is REFUSED and left unchanged, the others are written, exit 1 with --apply (a dry run lists them, exit 0); each regenerated start marker carries the hash of its body (a legacy marker gets one on its first write), and a region whose body no longer matches its hash is hand-edited: kept and listed as REFUSED region (exit 1 with --apply) unless --overwrite-edited names it or all, or you answer YES at the console question (asked only when stdin is a console); --save-form legacy (default) = the FIELD_AS_TYPE parameter binding the ORM3 units carry, current = TableTools 2026-05-19 .Value / .AsWideMemo / Set1Byte / NULL-timestamp Clear; 1.65: a u<T> unit of a table with an enumeration column that lacks region 16 / 17 (DefineProperties + Read/Write<X>Byte) gets them -- region 16 after the AssignTo declaration, region 17 after the end of Initialize -- so stored False on the enumeration is never written without the byte stream; when a place is missing the unit keeps its identifier stream (no stored False) and the run lists 'skipped <file>: regions 16 / 17 not inserted: <why>' (not a REFUSED, exit unchanged); 1.66: a u<T> unit of any table that lacks region 18 / 19 (BinWrite / BinRead) gets them -- region 18 behind region 16 or else the AssignTo declaration, region 19 behind region 17 or else the end of Initialize -- and ', uMicBinaryStream' behind the last unit of its interface uses clause; a class that declares BinWrite / BinRead itself (the ORM3 hand prototype), a missing place or a uses clause holding a compiler directive or a path gets nothing (comments there do not count) and the run lists 'skipped <file>: regions 18 / 19 not inserted: <why>' (not a REFUSED, exit unchanged); 1.66: a region WITHOUT a hash whose body holds a line no generator form writes (hand code; legacy generator output under the OrmLegacyForm equivalences and the named TableTools line forms is not) is kept and listed 'REFUSED region <id>, hand code in a region without a hash (...)'; --overwrite-edited <id> overwrites it; --json (1.65): one JSON plan document on stdout whatever the exit code -- verb, apply, units[] (file, kind, regions[{id, differing_lines}], uses[], diff on a dry run), skipped[{text, refused}], summary {new, changed, unchanged, skipped, refused, written}.)
drag-lint repo upgrade-orm-headers (--repo <file> | --project <project file>) --code-dir <folder> [--table <T,...>] [--fix-callers --db <index>] [--json] [--apply [--no-backup] [--run-dir <folder> | --no-manifest]] (one-time, 1.54: replaces the generated with-header of Assign / AssignTo and the unused Reader locals in the existing u<T> units, and AssignI by the overloaded Assign in each i<T> + u<T> pair (both units or neither); dry-run diff unless --apply; a hand-edited header or pair is listed and left alone; every remaining call of AssignI is listed as file(line); --fix-callers --db <index> (1.66): also rewrites the calls of AssignI that the index (built before the upgrade) resolves onto a converted pair's Tmc<T> / Imc<T> (find-callers --receiver-type), in any file, each listed as caller L:C AssignI -> Assign (type) in the dry run; other receivers and untyped calls stay, and a file whose sites no longer read AssignI( is left alone and listed as stale; run repo update-orm as well, it rewrites the regions; --json (1.65): one JSON plan document on stdout whatever the exit code -- verb, apply, units[] (file, kind, regions[{id, differing_lines}], uses[], diff on a dry run), skipped[{text, refused}], summary {new, changed, unchanged, skipped, refused, written}.)
drag-lint repo gen-dataservice (--repo <file> | --project <project file>) --server-dir <folder> --client-dir <folder> [--code-dir <folder>] [--table <T,...>] [--save-form legacy|current] [--db <index>] [--library-db <db>] [--json] [--apply [--no-backup] [--run-dir <folder> | --no-manifest]] (new u<T>_SERVER.PAS + u<T>_CLIENT.PAS per table and the two DI container units; the base units uMicServerDataService / uMicClientDataService only when absent from their target folder, from --code-dir (ORM3 COMMON) and from the index: a customised copy is never overwritten, a skipped one is listed; --db / --library-db: uses clauses from the index, as gen-orm; prints add to project: per new file; --json (1.65): one JSON plan document on stdout whatever the exit code -- verb, apply, units[] (file, kind, regions[{id, differing_lines}], uses[], diff on a dry run), skipped[{text, refused}], summary {new, changed, unchanged, skipped, refused, written}.)
drag-lint repo migrate (--repo <file> | --project <project file>) [--apply] (schema 1 .. 7 -> 8: adds DL_TABLES_INFO, DL_INDICES, DL_INDEX_SEGMENTS, DL_ENUM_TYPES and the schema-8 fact columns of DL_FIELDS_INFO, DL_DOMAINS, DL_CONSTRAINTS, DL_GENERATORS, DL_ENUMVALUES, DL_DATASETS_INFO and DL_ERROR_MESSAGES, from schema 6 also DL_GRID_CONTAINERS (bands / layout groups), DL_FIELDS_INFO.LOOKUP_DATASET / LOOKUP_CACHE / FIELD_PROPS and DL_GRID_COLUMNS.CONTAINER_NAME / ROW_INDEX / COL_INDEX / LAYOUT, from schema 5 also DL_FIELDS_INFO.UNBOUND_KIND and DL_GRID_COLUMNS.VIEW_CLASS / CAPTION / WIDTH / EVENT_NAMES, from schema 4 also DL_FIELDS_INFO.NOTES / DERIVED_KIND and DL_GRID_COLUMNS.PROPERTIES_CLASS_NAME / PROPERTIES, from schema 3 also DL_RELATIONS, DL_RELATION_COLUMNS and DL_FIELD_INPUTS (cross-table fields), from schema 2 also the event columns of DL_FIELDS_INFO and DL_GRID_COLUMNS, from schema 1 also CALC_BODY, DL_LAYOUT_EVENTS, DL_EXCEPTIONS, the schema-fact tables and FIELD_KIND 2 for ISCALCULATED rows; ALIGNMENT -2 becomes NULL; no --apply = dry run that changes no byte; --apply writes <repo>.before-migrate-<yyyymmdd-hhnnss>.txt first; a schema-8 file prints already at schema 8)
drag-lint repo check (--repo <file> | --project <project file>) [--json] (read-only: FIELD_KIND vs ISCALCULATED/ISLOOKUP, lookup wiring, calc and event macros, dependency cycles, ALIGNMENT, layout-event and grid-column rows; schema 4: {{ALIAS.FIELD}} inputs, their paths and bindings, relations and their parent keys; schema 8: indices and their segments, identity and computed columns, table kinds, CHECK text; exit 0 clean, 1 findings)
drag-lint repo paths (--from <table> --to <table> | --stats) [--depth <n>] (--repo <file> | --project <project file>) [--json] (read-only, 1.55: the relation paths from a home table UP to a parent table within --depth steps (default 3): FKs onto a PK / UNIQUE of the schema facts plus confirmed FORM / HAND relations; a parent with no key is never an edge; each path with its default input alias (TABLE, TABLE_2, ...) and the rule that chooses it: stored IS_DEFAULT, exactly one path, or ambiguous (asked once, never chosen by data); --stats instead counts the reachable and ambiguous table pairs at depth 1..n; exit 0 listed, 1 no path, 2 usage)
drag-lint repo gen-const (--repo <file> | --project <project file>) [--unit <UnitName>] --output <file.pas> [--table <T,...>] [--datamodule <Name>] [--dry-run] (the repository as ONE read-only Pascal unit shared by SERVER and CLIENT: constant record arrays per table; with --datamodule <Name> instead a data module unit plus its .dfm whose TFDMemTables open PRE-FILLED and read only, no fill code; default tables DL_FIELDS_INFO, DL_DATASETS_INFO, DL_ENUMVALUES, DL_ERROR_MESSAGES; writes only --output and the .dfm beside it; exit 2 on a bad --table / --unit / --datamodule / --output)
drag-lint repo check-const (--repo <file> | --project <project file>) --unit-file <file.pas> (does a unit written by gen-const still match the repository? exit 0 current, 1 stale naming the changed tables or the edited form, 2 the check could not be made; a pre-build step)
drag-lint repo gen-orm-tests (--repo <file> | --project <project file>) --tests-dir <folder> [--table <T,...>] [--apply [--no-backup]] (1.66: one DUnitX unit Test.BinRoundTrip.<T>.pas per table: fills every stored column of Tmc<T>, BinWrite -> BinRead (DB-RAD regions 18 / 19) and compares column by column (FirstDiff names the column); tests FilledRoundTrip, DefaultsOverwriteFilled, TruncatedStreamRaises, FirstDiffNamesEachColumn (NoStoredColumnStreamsNothing for a table without a stored column). Dry run unless --apply; prints 'add to project: <file>' per new unit; a table with a column that has no Binary form is skipped ('skipped <file>: column <C> has no Binary form (VAR_TYPE <V>); ...'). Exit 1 without --tests-dir <existing folder> or for an unknown table.)
drag-lint repo gen-calc --dfm <file.dfm> [--unit <file.pas>] [--dataset <Name>] [--apply | --select <file>] [--dry-run] [--json] (--repo <file> | --project <project file>)
drag-lint repo <gen-handlers|gen-maxlen|renumber-regions> (--repo <file> | --project <project file>) [--dfm <file.dfm>[;...]] [--dataset <Name>] [--code-dir <folder>] [--table <T,...>] [--in <file.pas>[;...]] [--apply] [--dry-run] [--json]
drag-lint repo gen-maxlen --code-dir <folder> [--table <T,...>] (--repo <file> | --project <project file>) [--apply] [--dry-run] [--json] (writes the <TABLE>_<FIELD>_MAXLEN constants into region DLFR 2a of each interface unit i<TABLE>.pas; no --apply = dry run; exit codes as gen-handlers)
drag-lint repo renumber-regions (--code-dir <folder> | --in <file.pas>[;...]) (--repo <file> | --project <project file>) [--apply] [--dry-run] [--json] (renames the numbered ORM region markers DB-RAD n to DLFR n, whole units only; update-orm reads both; no --apply = dry run; exit codes as gen-handlers)
drag-lint repo describe --table <T> (--repo <file> | --project <project file>) [--form <F> --view <V>] [--kinds <list>] [--json]
drag-lint repo adopt-regions (--repo <file> | --project <project file>) [--code-dir <folder>] [--server-dir <folder>] [--client-dir <folder>] [--table <T,...>] [--include-edited] [--json] [--apply [--no-backup] [--run-dir <folder> | --no-manifest]]
drag-lint repo alter-table --table <T> --direction repo-to-db --connection "<Firebird connection string>" (--repo <file> | --project <project file>) [--safe-path] [--rename <OLD=NEW[,...]>] [--order <A,B,...>] [--hook <name>] [--code-dir <folder>] [--server-dir <folder>] [--client-dir <folder>] [--select <id file>] [--apply] [--dry-run] [--backup-dir <folder>] [--backup-name <name>] [--verify <full|quick>] [--json]
drag-lint repo copy-grid --dfm <file.dfm> [--unit <file.pas>] (--from <view> --to <view> [--event <name> [--from-column <col> [--to-column <col>]]] | --list [--from <view>]) (--repo <file> | --project <project file>) [--apply | --select <id file>] [--dry-run] [--json]
drag-lint repo fib-readers (--db <index> | --project <project file>) [--all] [--json] [--output <file>]
drag-lint repo field-usage --fields "A,B,C" [--json] [--db <index> | --project <project file>]
drag-lint repo gen-events --dfm <file.dfm> [--unit <file.pas>] --to <view> [--table <TABLE>] (--repo <file> | --project <project file>) [--apply | --select <id file>] [--dry-run] [--json]
drag-lint repo gen-fib-consumer (--repo <file> | --project <project file>) --table <DL_ or FIB$ table> [--mode const|dfm] [--unit <name>] [--datamodule <name>] --output <file.pas>
drag-lint repo gen-lookup-layer (--repo <file> | --project <project file>) --client-dir <folder> [--server-dir <folder>] [--impl none|orm3] [--table <T,...>] [--apply [--no-backup]] [--json]
drag-lint repo lookup-source (--table <T> | --form <file.dfm> | --tables) [--field <Dataset.Field>] (--repo <file> | --project <project file>) [--db <index>] [--server-unit <file>] [--explain] [--fail-on blocked|ranked] [--json]
drag-lint repo read-dfm --dfm <file.dfm>[;...] [--dataset <Name>] --direction dfm-to-repo (--repo <file> | --project <project file>) [--apply | --select <id file>] [--dry-run] [--json] [--db <project index>] (the persistent fields of a form's datasets as a change set: data, calc, lookup, internal-calc and aggregate fields, captions / formats / widths, lookup wiring, OnCalcFields code as CALC_BODY with {{FIELD}} component macros, OnGetText / OnSetText / OnValidate / OnChange code and OnGetDisplayText / OnCustomDrawCell code of TcxGridDBTableView columns, the column order of table and banded grid views and each column's in-place editor, PropertiesClassName and its Properties.* lines as the form has them (DL_GRID_COLUMNS; the editor needs schema 5, an older repository gets a warning); code in generated DLFR regions (hashed or volatile) is not read back; needs a schema-4 repository or later (schema 7: also LOOKUP_DATASET, LOOKUP_CACHE, FIELD_PROPS of non-data fields); text or binary DFM, BDE or FireDAC; the table comes from UpdateTableName, TableName or a one-table SELECT, a join gives every field its own table, a calc reading several tables goes to the child end with {{ALIAS.FIELD}} inputs (alias = the table name) and DL_FIELD_INPUTS / DL_RELATIONS rows (the form's ON / WHERE joins choose the path; a join on a parent key with no FK is offered as a FORM relation, unchecked), a memory table takes the source of its AttachedTo or of a literal AttachTable / CloneCursor / CopyDataSet / CopyData / AppendData / Data := (cycle or two sources = unresolved), a link source, a lookup dataset and a grid's dataset that the module only inherits are read from the DFM of the ancestor form / data module (ancestor class from the unit beside the DFM, the one DFM of the same folder with that root class; not found or two = a warning, nothing picked), AttachTable(X.Table, ...) links to dataset X, an inherited dataset of an inherited form or module is itself read from the ancestor DFM (handler code from the unit of the form that states it), a module dmX.tblY that is not in the form's folder is found through the units the form's unit uses, in the project folder (nearest folder with a .dpr/.dproj/.dpk, up to three levels up) and below it, folders starting with __ or . left out, two candidates = a warning, nothing picked, anything else is listed as UNRESOLVED; with --dataset --json also lists the persistent fields and the repository fields of the table; --db <project index> = the index the lineage facts are read from: a persistent data field without a table column that code fills from other fields is proposed as insert DL_FIELDS_INFO T|F: derived(direct|aggregate); inputs {{..}} + insert DL_FIELD_INPUTS T|F||ALIAS, all unchecked (write them with --select), without it one warning lineage: skipped (no index); no --apply = dry run; exit 1 read / apply failure, 2 usage or a bad --select file)
drag-lint repo read-grid --dfm <file.dfm> [--unit <file.pas>] [--from <view>] (--repo <file> | --project <project file>) [--apply | --select <id file>] [--dry-run] [--json]
drag-lint repo regen-plan (--repo <file> | --project <project file>) [--source "<connection>"] [--seed-dir <folder of TABLE.csv>] [--select <id,...|all>] --output <plan dir> [--json]
drag-lint repo regen-verify --plan-dir <plan dir> --source "<connection>" --target "<connection>" [--for-swap [--backup-manifest <file>]] [--json]
drag-lint repo regen-build --plan-dir <plan dir> --target "<connection of a NEW local file>" [--source "<connection>"] [--seed-dir <folder of TABLE.csv>] [--apply | --discard] [--json]
drag-lint repo verify-preserve (--before <folder|file> --after <folder|file> | --run <run id|run folder|manifest> [--run-dir <folder>] [--repo <file> | --project <project file>]) [--json]
drag-lint repo write-dfm --dfm <file.dfm>[;...] [--dataset <Name> [--names <FIELD,...>|all]] --direction repo-to-dfm (--repo <file> | --project <project file>) [--apply | --select <id file>] [--dry-run] [--json]
drag-lint repo write-grid --dfm <file.dfm> [--unit <file.pas>] --to <view> [--table <TABLE>] (--repo <file> | --project <project file>) [--columns <names>] [--apply | --select <id file>] [--dry-run] [--json]
drag-lint repo gen-wiki (--repo <file> | --project <file>) --output <dir> [--per-field] [--table <T,...>] [--db <project db>] [--dry-run] [--json]
FlagArgumentMeaningDefault
--db<index>
--project<x.dproj>
--repo<file.dlrepo>
--connection"<firebird>"
--fields"A,B"
--json
--output<file>
--in<enum-candidates.json>
--legacy<file.pas|dir>
--all
--apply
--build-timeout<s>
--dfm<file>
--no-backup
--only<unit,...>
--plan
--platform<p>
--progress-form<Form>
--query<Name>
--rsvars<bat>
--step-size<n>
--table<Name>
--unit<UnitName>
--datamodule<Name>
--dataset<Name>
--directiondfm-to-repo
--unit-file<file.pas>
--ddl<file.sql>[;...]
--select<id file>
--dry-run
--formattext|sql|zip
--name<Name>
--replace
--prepare-queries
--code-dir<folder>
--server-dir<folder>
--client-dir<folder>
--save-form<legacy|current>
--overwrite-edited<id,...|all>
--fix-callers
--tests-dir<folder>
--from<table>
--to<table>
--depth<n>
--stats
--form<F>
--view<V>
--kinds<list>
--include-edited
--run-dir<folder>
--no-manifest
--safe-path
--rename<OLD=NEW[,...]>
--order<A,B,...>
--hook<name>
--backup-dir<folder>
--backup-name<name>
--verify<full|quick>
--to-bytetag
--map"<T.C>[=<TEnum>][:<CODE>=<BYTE>,...][;...]"
--event<name>
--from-column<col>
--to-column<col>
--list
--keep<N>
--modeconst|dfm
--implnone|orm3
--tables
--field<Dataset.Field>
--server-unit<file>
--explain
--fail-onblocked|ranked
--source"<connection>"
--seed-dir<folder of TABLE.csv>
--plan-dir<plan dir>
--target"<connection>"
--for-swap
--backup-manifest<file>
--discard
--before<folder|file>
--after<folder|file>
--run<run id|run folder|manifest>
--names<FIELD,...>|all
--columns<names>
--per-field

Described in:

resolve-dbs

Prints which database(s) drag-lint would actually use for a given project, file, or platform, without running a real query.

drag-lint resolve-dbs [--platform win32|win64] [--repo <file>] [--config <path>] [--json] (print the consumer DB list query/lsp/serve would use)
FlagArgumentMeaningDefault
--platform
--config<path>
--repo<file>
--json

Described in Show Resolved DBs (debug).

reverse-calltree

Shows callers and callees of one symbol together in a single "butterfly" view.

drag-lint reverse-calltree --qname <X> [--direction callers|callees] [--depth N] [--format text|json|dot|mermaid] [--json] [--output F] --db PATH [--db ...] (N-deep call tree; callers=who calls X (default), callees=what X calls; cycle-guarded)
FlagArgumentMeaningDefault
--qname<X>
--direction
--depthN
--format
--json
--dbPATH
--outputF

Described in:

rules

Rules carry CWE / CERT / MISRA ids; --labels prints them, rules --standard filters by standard, JSON gains a compliance field.

drag-lint rules [--json] [--category <name>] [--standard cwe|cert|misra] [--rule <id>[,<id>]] [--rules-dir <dir>] [--target-compiler <ver|auto> [--project <.dproj>]] - list every lint rule (catalog; each labelled rule shows its CWE/CERT/MISRA ids, --json adds `compliance`; --standard lists only rules labelled under it; --rule <id>[,<id>] lists only those rules, an unknown id is exit 2)
FlagArgumentMeaningDefault
--json
--category<name>
--standardcwe|cert|misra
--rule<id>[,<id>]
--rules-dir<dir>
--project<X.dproj>
--target-compiler<ver|auto>
--scopeline|unit|project
--in<F>
--line<N>
--reason<text>
--config<drag-lint-lint.json>

Described in:

safe-delete

Deletes a symbol if and only if it has zero references in the index.

drag-lint safe-delete --name <QName> [--json|--apply|--no-backup] --db <db> - delete a symbol iff it has zero references
FlagArgumentMeaningDefault
--name<QName>
--json
--apply
--no-backup
--project<X.dproj>
--no-compile-gate
--rsvars<bat>
--build-timeout<s>
--db<db>

Described in safe-delete.

sbom

Writes a CycloneDX 1.6 JSON software bill of materials for a project from its index: the application, its library components and their dependencies.

drag-lint sbom --project <x.dproj> [--output <file.cdx.json>] [--exe <delivered.exe>] [--app-version <v>] [--db <project.sqlite>] [--library-db <db>|none]... [--catalogue <file.json>] [--map <file.map>] [--bsi] [--creator <name>] [--creator-email <address>] [--vex <vulnerabilities.json>]
FlagArgumentMeaningDefault
--project<x.dproj>
--output<file.cdx.json>
--exe<delivered.exe>
--app-version<v>
--db<project.sqlite>
--library-db<db>|none
--catalogue<file.json>
--map<file.map>
--bsi
--creator<name>
--creator-email<address>
--vex<vulnerabilities.json>

Described in sbom.

schema

Table-by-table reference of the SQLite index file: every table, column, key, writer pass and schema version 23 to 27.

drag-lint schema --db <file.sqlite> [--format text|json] [--output <file>] (self-documenting LIVE index schema: schema_version + tables + columns + row counts, read-only)
FlagArgumentMeaningDefault
--db<file.sqlite>
--format
--output<file>

Described in:

serve

Starts the MCP (Model Context Protocol) stdio server, for AI clients such as Claude or Cursor to query a drag-lint index.

drag-lint serve --db <file.sqlite> [--json] (MCP stdio server)
FlagArgumentMeaningDefault
--db<file.sqlite>

Described in serve.

settings

Per-project settings store: drag-lint settings list|get|set|unset over _D-RAG\drag-lint-project.json and a local overlay.

drag-lint settings list|get|set|unset [<key> [<value>]] [--local] [--project <.dproj> | --db <db> | --in <file>] [--json|--format json]   (per-project settings in _D-RAG\drag-lint-project.json; --local = this machine only, _D-RAG\drag-lint-project.local.json; exit 0 done, 1 nothing to do, 2 refused)
FlagArgumentMeaningDefault
--local
--project<.dproj>
--db<db>
--in<file>
--json

Described in Project settings.

shared-unit

Reads or extends the dl:shared marker on a unit, recording which projects share it.

drag-lint shared-unit --in <file.pas> [--add-project <name>] [--apply] [--json] (read/extend the dl:shared marker; dry-run without --apply)
FlagArgumentMeaningDefault
--in<file.pas>
--add-project<name>
--apply
--json

Described in shared-unit.

site

Offline API reference site from the index: hub + search, a page per unit / class: DocInsight, members, callers, impact, DFM wiring, tables; incremental.

drag-lint site (--db <project.sqlite> | --project <x.dproj>) --output <dir> [--max-pages N] [--full]
FlagArgumentMeaningDefault
--db<project.sqlite>
--project<x.dproj>
--output<dir>
--max-pagesN
--full

Described in site.

slice

Shows the slice of code relevant to one symbol: its declaration, body, and immediate context.

drag-lint slice --qname <Foo.TBar> [--db <file.sqlite>] [--format text|json]
FlagArgumentMeaningDefault
--qname<Foo.TBar>
--db<file.sqlite>
--format

Described in Symbol Slice.

sql

Table-by-table reference of the SQLite index file: every table, column, key, writer pass and schema version 23 to 27.

drag-lint sql --query "SELECT ..." | --in <q.sql> --db <file.sqlite> [--format text|json] [--json] [--limit N] [--timeout-ms N] [--output <file>] (guarded READ-ONLY SQL over the index: exactly one statement, an sqlite3 authorizer refuses ATTACH/PRAGMA/DDL/writes, row cap 200 (none with --output unless --limit is given; --limit 0 = every row; JSON says truncated + total_rows) and time cap 10000 ms; ask `schema --format json` for the columns)
FlagArgumentMeaningDefault
--query
--in<q.sql>
--db<file.sqlite>
--format
--json
--limitN
--timeout-msN
--output<file>

Described in:

stop-now

Ask running engines (lsp, cycles --fix, index, lint-all) to stand down cleanly, so an index can be rebuilt or an engine replaced.

drag-lint stop-now [--db <file.sqlite>]... [--wait <sec>] [--dry-run] [--force] (ask running engines to stand down: close every store, exit 0; `index` and `lint-all` runs exit 4)
FlagArgumentMeaningDefault
--db<file.sqlite>
--wait<sec>
--dry-run
--force

Described in stop-now.

surface

Shows the public surface of a class: its members and signatures, without the method bodies.

drag-lint surface --qname <Foo.TBar> [--db <file.sqlite>] [--include-impl] [--all-visibility] [--format text|json]
FlagArgumentMeaningDefault
--qname<Foo.TBar>
--db<file.sqlite>
--include-impl
--all-visibility
--format

Described in Class Surface.

syntax-count

Counts modern syntax in the parse of every unit, uncapped: Delphi 13 if-expressions, is not, not in; inline var/const; anonymous methods; multiline strings.

drag-lint syntax-count (--db <file.sqlite> | --in <path>...) [--feature <a,b>|all] [--per-file] [--hits] [--json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--in<path>
--feature<a,b>|all
--per-file
--hits
--json

Described in syntax-count.

todos

Scans source for TODO/FIXME/HACK/XXX/REVIEW/NOTE markers.

drag-lint todos [<path>] (TODO/FIXME/HACK/XXX/REVIEW/NOTE scanner; [--json])
FlagArgumentMeaningDefault
--json

Described in Scan TODOs / FIXMEs.

top

Ranks indexed symbols by fan-in -- how many places reference them.

drag-lint top --db <file.sqlite> [--by fanin] [--limit N] [--json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--by
--limitN
--json

Described in Top Symbols (fan-in).

typeat

Resolves the static type of the expression under the editor caret.

drag-lint typeat <file>:<line>:<col> [--db <file.sqlite>] [--format text|json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--format

Described in Type at Cursor.

unwith

Removes with blocks, proving every name binds to what it bound before.

drag-lint unwith --db <db> [--in <F> [--line <N>]] (--plan | --apply --project <X.dproj>) [--platform <p>] [--rsvars <bat>] [--build-timeout <s>] [--library-db <L>|none] [--exclude-under <dir>]... [--no-backup] [--build-config <c>] [--no-preprocess] [--json|--format json] - remove with blocks, proved binding by binding
FlagArgumentMeaningDefault
--db<db>
--in<F>
--line<N>
--plan
--apply
--project<X.dproj>
--platform<p>
--rsvars<bat>
--build-timeout<s>
--library-db<L>|none
--exclude-under<dir>
--no-backup
--json
--build-config<c>
--no-preprocess
--formatjson

Described in unwith.

usages

Lists references to the symbol represented by a Structure-tree node.

drag-lint usages --name <X> [--width narrow|wide|very-wide] [--db <path>] [--depth N] [--format json|--json]
FlagArgumentMeaningDefault
--name<X>
--width
--db<path>
--depthN
--format
--json
--limitN
--rw
--in<file>
--library-db<lib.sqlite>
--no-create
--scopesymbol|project|group|everywhere
--group<x.groupproj>
--line<L>
--col<C>

Described in:

uses-audit

For one unit, reports which uses entries could move from the interface section to implementation, and which are unused entirely.

drag-lint uses-audit <unit.pas> --db <file.sqlite> [--format json|text] (interface->impl moves + unused units)
FlagArgumentMeaningDefault
--db<file.sqlite>
--format

Described in Uses Audit -- interface->impl moves + unused (this unit).

uses-fix

Applies the fix for the single lint finding on a Structure-tree node; an unused unit is removed or moved to implementation by compiling.

drag-lint uses-fix <unit.pas> --project <dproj> --db <file.sqlite> [--platform win32|win64] [--apply] [--remove-unused] [--only <unit,...>] [--format json|text] (compiler-verified uses cleanup; --format json lists every candidate with a status -- verified | skipped | deselected -- and --only restricts which are compiled and written, so a reviewed partial apply is expressible; a unit --only names that is in the uses clause but in no project index -- an RTL/VCL/library unit -- is decided by compiling too: removed when it has no initialization section (with --remove-unused), else moved to the implementation section, else skipped)
FlagArgumentMeaningDefault
--project<dproj>
--db<file.sqlite>
--platform
--apply
--remove-unused
--only<unit,...>
--format

Described in:

uses-recover

Recovers the uses edges of units that ship without source, from the vendor's .hpp headers and a dcc map; never reads a .dcu; --apply stores them in the index.

drag-lint uses-recover --db <db> --hpp-dir <dir>... [--library-db <db>...] [--map <file.map>] [--project <x.dproj>] [--apply] [--json]
FlagArgumentMeaningDefault
--db<db>
--hpp-dir<dir>
--library-db<db>
--map<file.map>
--project<x.dproj>
--apply
--json

Described in uses-recover.

uses-report

Exports the project's unit-dependency data as a CSV file.

drag-lint uses-report --output <out.csv> [--db ...] [--depth N] [--include-external] [--all-sources] [--name <pattern>] (--name is a substring on the unit stem; one that matches NO source unit exits 2 with an ERROR and writes nothing, like outline)
FlagArgumentMeaningDefault
--output<out.csv>
--db
--depthN
--include-external
--all-sources
--name<pattern>

Described in Uses Report (CSV).

warm-rule-cache

Fills the lint rule cache for a project index; index runs warm it, or start it in the background (--rule-cache-warm).

drag-lint warm-rule-cache --db <project.sqlite> [--library-db <lib.sqlite>] [--detached]
FlagArgumentMeaningDefault
--db<project.sqlite>
--library-db<lib.sqlite>
--detached

Described in warm-rule-cache.

wiki

Looks up the dl:wiki concept topics a team has written into their own doc comments, and routes a human phrase to the code that implements it.

drag-lint wiki --term "<phrase>" | --list | --check [--json] [--db <file.sqlite>] (dl:wiki CONCEPT topics written in doc comments: --term routes a human word or alias ("the scheduler") to the owning symbol, --list prints every topic, --check resolves every SeeCode entry and exits 1 on drift. Authoring format: docs\wiki\Wiki-Blocks-Authoring.md)
FlagArgumentMeaningDefault
--term
--list
--check
--json
--db<file.sqlite>

Described in:

wiring

Surfaces bindings the compiler does not make obvious: Spring4D container registrations and DFM event hookups for a type.

drag-lint wiring --qname <IIntf|TForm> [--db <file.sqlite>] [--format text|json] (Spring4D DI + DFM event edges)
FlagArgumentMeaningDefault
--qname<IIntf|TForm>
--db<file.sqlite>
--format

Described in Show Wiring (Spring4D DI + DFM events).

workspace

Registers a project file into a .drag-lint-workspace.json workspace config, so multi-project workspace commands know about it.

drag-lint workspace index [--config <.drag-lint-workspace.json>]
drag-lint workspace add <projfile> [--config <.drag-lint-workspace.json>]
drag-lint workspace status [--config <.drag-lint-workspace.json>]
FlagArgumentMeaningDefault
--config<.drag-lint-workspace.json>

Described in:

Flag aliases

A verb's usage line names the canonical flag only. Each alias is accepted wherever its canonical flag is and means exactly the same, so scripts that use one keep working; write the canonical spelling. drag-lint --help lists them in its "Flag aliases:" section. Policy: docs/CLI-FLAG-ALIASES.md.

CanonicalAliasesWhy
--force-reparse--no-skipback-compat: the first spelling of the index re-parse switch
--help-h, -?convention: the short help tokens every CLI user tries first
--in--fileone input-file option (TArgs.InFile); --in is the spelling the ask verb's own parser accepts, so it is the one that works on every verb
--output--out, --reportback-compat: owner ruling ENG-6 (2026-09-22/23) -- scripts that use --out keep working; --report (1.52 SMALLS 8611fb1d1) names the lint-all report file
--scan-libraries-win--scan-librariesback-compat: the spelling before --scan-libraries-all existed