apexe
Governed execution for CLI tools and HTTP APIs
Run your tools. Enforce your rules. apexe gives people and AI agents a shared execution layer built on apcore. Discover existing CLI commands without an LLM or source changes, run them locally or through eligible PATH shims, or expose CLI and imported OpenAPI operations through MCP and A2A. Every call passes three gates in order - the declared surface, the caller-permission policy and the filesystem access boundary - and leaves a typed schema decision and an audit record. Approvals fire on the flags that actually escalate, embedded child commands are policy decisions rather than holes, and a refusal names the gate that decided. Normal execution uses host privileges; selected modules can opt into sandbox delegation with macOS sandbox-exec, Linux bwrap or Docker, and required or auto modes refuse before spawn when the backend cannot enforce the translated path policy.
Get Started
Rust implementation for Unix CLI tools and HTTP APIs. Install the verified macOS/Linux release with the one-command installer, or build from Git with current stable Rust and Cargo. Native Windows is unsupported; no older minimum Rust version is declared or tested.
$ curl -fsSL https://raw.githubusercontent.com/aiperceivable/apexe/main/scripts/install.sh | sh# scripts/install.sh hands off to setup; preview or rerun the same
# preparation without reinstalling the binary
apexe setup --dry-run
apexe setup
# Inspect the generated bindings, then review the starter policy
apexe list --verbose
apexe list --path-census
apexe paths --path /etc/passwd --mode read
apexe acl explain cli.git.status --caller local
# Review ~/.apexe/acl.yaml before executing or serving
apexe exec cli.ls --dry-run
apexe exec cli.ls
# Agent Skill native route: requires reviewed native grammar
apexe exec --dry-run -- ls -la
apexe exec -- ls -la
# Optional shell integration for eligible commands
apexe env --enable
source ~/.apexe/bin/apexe-activate.sh
apexe env --check
# Same shims without touching shell startup files
apexe env --enable --no-rc
# MCP HTTP with ACL, interactive approval and Explorer UI
apexe serve --transport http --port 8000 --explorer --acl ~/.apexe/acl.yaml --enable-approval
# Or serve the same bindings through A2A
apexe a2a --acl ~/.apexe/acl.yaml
# Optional: point a terminal agent at the governed shell
apexe agent pi --check
apexe agent pi --write
apexe sh --check
# Opt selected modules into an OS sandbox (off by default)
apexe sandbox check
apexe exec --dry-run -- sed -i 's/a/b/' file
# Optional: serve an API using your specification and reviewed API ACL
apexe serve --openapi ./openapi.yaml --acl ./api-acl.yaml --no-log-arguments
# Check CLI source drift without replacing bindings
apexe verify --report ./drift-report.jsonFeatures
Related Products
apcore
The shared registry, schema validation and governed executor behind CLI and API modules.
View Productapcore-mcp
MCP serving with structured results, authentication, middleware and Explorer UI.
View Product