Skip to content

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.
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.
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.
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.
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.