Skip to main content

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

ArgumentDescription
PROJECT_IDProject ID (e.g. wdp-api, wdp-import)
COMMANDCommand to execute (as a string)

Flags

FlagTypeDescriptionDefault
--jsonflagOutput 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 run
  • ops exec runs an arbitrary shell command string inside a project's directory.
  • ops run invokes 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.