Skip to content

ctx exec

ctx exec <command> runs any shell command and applies a context-aware filter to compress the output before returning it. Commands without a registered filter pass through unchanged.

Terminal window
ctx exec git status # only modified files, no boilerplate
ctx exec cargo test # only failures + summary preserved
ctx exec kubectl logs my-pod # deduplicates repeated lines with (×N) grouping
ctx exec terraform plan # strips refresh/lock noise, keeps diff + summary
ctx exec git push origin main # reduces to "ok abc1234..def5678 main -> main"
Terminal window
ctx exec report
ctx exec report --days 7 # last week
ctx exec report --project /path # filter by project
ctx exec report --json # machine-readable
CategoryCommands
VCSgit status/log/diff/show/branch/tag/stash/blame/push/pull/add/commit/fetch
Rustcargo test/build/check/clippy/fmt/run/install
JS/TSnpm/yarn/pnpm (install/test/build/run), jest, vitest
Linters JS/TStsc, eslint, prettier, biome
Pythonruff, mypy, pytest
Gogo test, go build, go vet, golangci-lint
Rubyrubocop, rspec, rake
JVMgradle/gradlew/mvn/mvnw (test/build/package/install/verify), grails
Containersdocker ps/images/logs/compose, kubectl get/logs/describe
AWSaws logs/sts/s3/ec2/lambda/iam/dynamodb/cloudformation
IaCterraform plan/apply/init/validate, tofu plan/apply/init/validate
GitHubgh pr/issue/run
Filesystemls, find, tree, grep/rg/ag
Datacurl/wget, jq, sqlite3
  • Log deduplicationkubectl logs, docker logs, aws logs normalize timestamps/UUIDs/hex/paths and group identical messages with (×N) suffix
  • Git ok-stylegit push/pull/commit/add reduce to ok abc1234 main: feat: msg (-92% as in RTK)
  • AWS service-specificdynamodb unwraps {"S":"value"}"value"; iam strips inline PolicyDocument blocks
  • Terraformplan keeps diff + final Plan: N to add summary, strips refresh/install noise
  • Linters formatted — preserves file:line:col: error/warning code msg removing tables and footer noise

The command passes through unchanged. No surprise behavior. To request a new filter, open an issue at github.com/JaimeJunr/context-engine.

ctx exec is also available as the ctx_exec MCP tool — agents can call it directly with {"command": ["git", "status"]} JSON arguments.