Commands
xlflow exposes a Cobra-based CLI. Every command accepts the global --json flag for machine-readable output.
bash
xlflow [command] --jsonUse command pages for workflow guidance and the canonical CLI contract in JSON Output.
| Command | Purpose |
|---|---|
| new | Create a new xlflow project and macro-enabled workbook. |
| init | Initialize an xlflow project from an existing workbook. |
| doctor | Diagnose Excel, COM, PowerShell, VBIDE access, and source GUI boundaries. |
| attach | Validate that the active Excel workbook matches the configured workbook. |
| backup | List rollback-capable workbook backups for the configured workbook. |
| list | List workbook resources. The public subcommand is list forms. |
| form | Manage UserForms through snapshot, build, and image export workflows. |
| pull | Export workbook VBA components into configured source directories. |
| push | Import edited source files back into the configured workbook. |
| rollback | Restore the configured workbook from an xlflow-managed backup. |
| session | Keep Excel and the configured workbook open across repeated commands. |
| save | Save the workbook held by the managed xlflow session. |
| runner | Manage the persistent xlflow runner marker module. |
| trace | Manage VBA trace logging support and trace log cleanup. |
| run | Run a workbook macro from the CLI. |
| export-image | Export a worksheet range as a PNG image through Excel COM. |
| edit | Mutate a live session workbook for setup and visual tuning. |
| macros | Discover runnable public workbook macro entrypoints without executing user code. |
| ui | Manage xlflow-owned worksheet buttons. |
| test | Discover and run workbook VBA test procedures. |
| diff | Compare workbook files and optionally exported VBA source trees. |
| inspect | Inspect saved workbook state or UserForm state. |
| inspect-gui | Scan source for automation-hostile GUI boundaries without opening Excel. |
| lint | Lint VBA source files for agent-hostile and compile-dialog-prone patterns. |
| analyze | Analyze VBA source for runtime-risk patterns without Excel COM. |
| check | Run lint, analyze, and doctor as a combined preflight. |
| completion | Generate shell completion scripts through Cobra. |
| skill | Install the bundled xlflow skill for AI agent tools. |
| version | Show xlflow build metadata. |