Skip to content

Commands

This is the exact-command reference, not the best first learning path. If you are deciding what to do, start with Choose your workflow or a tutorial. Return here when you know your goal and need an option, argument, or machine-readable contract.

For almost every project, the basic story is: create/import a project → pull if Excel is newer → edit src/lint/analyzepushrun or test → inspect the result. The source, workbook, and session model explains why these are separate commands.

xlflow exposes a Cobra-based CLI. Every command accepts the global --json flag for machine-readable output. Retryable workbook commands also accept --wait and --wait-timeout <duration>; waiting is opt-in and defaults to a 30-second limit. A workbook recovery quarantine is different from lock contention: --wait does not bypass it, and an explicit recovery command is required.

bash
xlflow [command] --json
xlflow [command] --wait --wait-timeout 45s

Use command pages for workflow guidance and the canonical CLI contract in JSON Output.

CommandPurpose
newCreate a new xlflow project and macro-enabled workbook or add-in.
initInitialize an xlflow project from an existing workbook or add-in.
capabilitiesShow machine-readable command safety metadata.
rulesList canonical static-analysis rule metadata without opening Excel.
doctorDiagnose Excel, COM, PowerShell, VBIDE access, and source GUI boundaries.
attachValidate that the active Excel workbook matches the configured workbook.
backupList rollback-capable workbook backups for the configured workbook.
listList workbook resources. The public subcommand is list forms.
formManage UserForms through source scaffolds, snapshot, build, and image export.
formulasExtract worksheet formulas into region-based JSONL snapshots without Excel.
pullExport workbook VBA components into configured source directories.
pushImport edited source files back into the configured workbook.
buildBuild a validated Excel-backed release workbook without changing the development workbook.
packBuild a release .xlsm artifact from source and a workbook template.
rollbackRestore the configured workbook from an xlflow-managed backup.
statusShow project, source, workbook, and session state in one read-only command.
sessionKeep Excel and the configured workbook open across repeated commands.
saveSave the workbook held by the managed xlflow session.
recoveryVerify and clear workbook recovery-required state.
runnerManage the persistent xlflow runner marker module.
runRun a workbook macro from the CLI.
export-imageExport a worksheet range as a PNG image through Excel COM.
editMutate a live session workbook for setup and visual tuning.
macrosDiscover runnable public workbook macro entrypoints without executing user code.
uiManage xlflow-owned worksheet buttons.
testDiscover and run workbook VBA test procedures.
type dbManage generated TypeLib databases for LSP type intelligence.
diffCompare workbook files and optionally exported VBA source trees.
inspectInspect saved workbook state or UserForm state.
impactShow the confirmed VBA caller/callee blast radius for one procedure.
graph dependenciesShow confirmed procedure, module, and project-type dependency projections.
inspect-guiScan source for automation-hostile GUI boundaries without opening Excel.
lintLint VBA source files for agent-hostile and compile-dialog-prone patterns.
lspStart the reusable VBA language server for editor integrations.
fmtFormat VBA source files with a conservative, non-destructive formatter.
analyzeAnalyze VBA source for runtime-risk patterns without Excel COM.
metricsCalculate procedure metrics and architectural hotspot rankings without Excel COM.
checkRun lint, analyze, and doctor as a combined preflight.
moduleCreate module source files and install bundled xlflow helper modules.
completionGenerate shell completion scripts through Cobra.
processList and manage local Excel processes.
skillInstall the bundled xlflow skill for AI agent tools.
versionShow xlflow build metadata.
updateCheck whether a newer xlflow release is available.

Released under the MIT License.