ops exec
Execute a CLI command in a specific project's context. Runs an arbitrary command-line string inside a registered project's directory — useful for running project-specific tooling without cd-ing into the directory first.
Synopsis
Run a shell command inside a registered project's working directory
Terminal
$ops exec <PROJECT_ID> <COMMAND>
Arguments
| Argument | Description |
|---|---|
PROJECT_ID | Project ID (e.g. wdp-api, wdp-import) |
COMMAND | Command to execute (as a string) |
Flags
| Flag | Type | Description | Default |
|---|---|---|---|
--json | flag | Output as JSON for scripts and AI agents | — |
Examples
Run ops status from inside the wdp-import project directory
Terminal
$ops exec wdp-import "uv run ops status"
Check the git state of the dbt project without leaving the current shell
Terminal
$ops exec dbt "git status"
Run the wdp-api test suite in its own working directory
Terminal
$ops exec wdp-api "python -m pytest tests/"
exec vs runops execruns an arbitrary shell command string inside a project's directory.ops runinvokes a named command from the project's TOML manifest registry.
Use exec for ad-hoc commands; use run when the project has defined a reusable entry point.
Quote the Command
Always wrap the command string in quotes so flags and arguments aren't interpreted by your local shell before reaching the target project.