Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CmdOpsNew to Visual Studio Code? Get it now.
CmdOps

CmdOps

cmdandquery

|
1 install
| (0) | Free
Dynamic ops runner driven by .cmdops.json config files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CmdOps

A VS Code sidebar extension that turns a declarative .cmdops.json configuration file into an interactive operations command runner. Define your DevOps workflows — deployments, SSH connections, Ansible vault management, Rake tasks, Rails console, and more — as structured JSON and execute them from a convenient sidebar UI.

Getting Started

  1. Create a .cmdops.json file in your workspace root (or configure a custom path via the cmdOps.configFile setting).
  2. Open the CmdOps panel from the activity bar.
  3. Select options from dropdowns, pick commands, and run them in the integrated terminal.

The extension watches your config file and automatically reloads when it changes.

Settings

Setting Type Default Description
cmdOps.configFile string ".cmdops.json" Path to the config file relative to workspace root

Configuration File Structure

The .cmdops.json file has three top-level sections:

{
  "system": { ... },   // Optional — define data pipelines
  "options": [ ... ],   // Optional — define UI dropdowns
  "items": [ ... ]      // Required — define runnable items
}

system — Data Pipelines

The system block defines named pipelines — arrays of actions executed in sequence. Each pipeline produces values used to populate option dropdowns or interpolate into commands.

execute Action

Runs a shell command in the workspace root directory.

Property Type Required Description
action "execute" Yes Action type
command string Yes Shell command to run. Supports variable interpolation (e.g. {{options:envs}})
store string No Store stdout into a named pipeline variable for subsequent parse steps
pick boolean No When true, splits stdout by newlines and adds each non-empty line to the pipeline's result array

parse Action

Parses a previously stored variable and extracts values by path.

Property Type Required Description
action "parse" Yes Action type
var string Yes Name of a previously stored variable
format "yml" | "json" Yes Parse format
path string Yes Dot-separated path to navigate into the parsed object (e.g. "admin.name")
pick boolean No When true, add the value(s) at the path to the pipeline result. Arrays are expanded, scalars are added as single values

options — UI Dropdowns

Defines dropdown controls rendered in the sidebar when an item is selected. Supports two formats:

Option Properties

Property Type Required Description
values string \| string[] Yes Source of dropdown values (see below)
ui "select" Yes UI control type (currently only "select" is supported)
default string No Pre-selected value. Falls back to the first value if not found in the list
empty_value string No Placeholder text shown as a disabled first option (like an HTML select placeholder). When set, no value is auto-selected

Value Sources

Source Example Description
System variable reference "{{system:envs}}" Resolves the named system pipeline and uses its results
Static string "admin, deployer" Split by comma, each value trimmed
Array of strings ["~", "/home/deployer/{{system:app_name}}/current"] Each element is resolved via variable interpolation

Automatic Dependency Resolution

Options that reference system pipelines containing {{options:*}} are automatically detected as dependent. The extension:

  1. Detects {{options:*}} references inside system pipeline commands
  2. Renders the dependent dropdown as disabled with a "Select X first..." placeholder
  3. When all dependencies are satisfied (user selects values), resolves the pipeline and populates the dropdown
  4. Tracks previous selections and skips re-resolution if dependency values haven't changed

items — Runnable Items

Each item appears as a button in the sidebar. An item uses either commands or template (not both).

Property Type Required Description
name string Yes Display name in the sidebar
description string No Subtitle text shown below the name
commands_mode string No Execution mode (see below)
delay_ms number No Delay in ms between sequential commands (default: 1000)
commands CommandDef[] No Array of commands to execute
template TemplateDef No Template editor definition
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft