Back to Home
· product · apexe
apexe logo

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 with the shared Agent Skill for terminal agents, or expose CLI and imported OpenAPI operations through MCP and A2A. Typed schemas, configured access rules, approval checks and audit records govern each call. Start with reviewed rules, inspect the generated policy, then choose terminal execution, eligible shell shims or an agent server. Normal execution uses host privileges; apexe is not a sandbox.

· 01

Get Started

Rust · Implementation

Rust implementation for Unix CLI tools and HTTP APIs. Use a prebuilt macOS/Linux release or build from Git with current stable Rust and Cargo. Native Windows is unsupported; no older minimum Rust version is declared or tested.

Install
$ cargo install --git https://github.com/aiperceivable/apexe
Quick Start
shell
# Initialize installed CLI coverage from reviewed rules
apexe init
apexe list --verbose

# Review ~/.apexe/acl.yaml before executing or serving
apexe exec cli.ls --dry-run
apexe exec cli.ls

# 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

# Agent Skill native route: requires native_ready coverage (BSD cat/head/ls)
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

# Optional: point a terminal agent at the governed shell
apexe agent pi --check
apexe agent pi --write
apexe sh --check

# 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.json
· 02

Features

01Initialize Reviewed Coverage: apexe init acquires rules from cli-permissions or your own Git source, matches installed tools and generates typed bindings plus a starter ACL. Pin a revision, work offline or refresh managed bindings while preserving custom bindings and existing policy.
02Discover CLI Contracts: Six built-in parsers combine help, man pages and completions with variant-aware overlays. Generate JSON Schema types, defaults, enums, required fields and argument placement, with flag confidence and provenance. No LLM or CLI source changes are required; coverage depends on discoverable grammar and matching rules.
03Execute Locally: apexe exec accepts module JSON or eligible native argv. Inspect a concrete call with --dry-run, supply JSON inline, from a file or stdin, and preserve native streams and child exit status. Local execution loads the default ACL when present and refuses calls that still require approval.
04Keep Familiar Shell Commands: apexe env installs PATH shims that route eligible external commands through local governance. Activation helpers and env --check support setup and diagnostics. Native exec and shims require reviewed grammar; the current BSD pilot covers cat/head/ls. Builtins, aliases and absolute paths can bypass shims.
05Agent Skill: Support Claude Code, Codex, pi, OpenCode and other compatible terminal agents. In configured projects, the shared Skill guides external CLI calls through apexe exec with discovery, preflight and refusal handling. Reviewed native grammar is required; no MCP server or shell activation is needed. Mandatory routing requires host enforcement.
06Connect AI Agents: Serve CLI and API modules through MCP stdio, streamable HTTP or legacy SSE, or publish an A2A agent using the same executor. HTTP-family transports require token authentication by default; JWT carries caller identities and roles. Explorer UI, client configuration snippets and optional metrics support integration.
07Import HTTP APIs: Load OpenAPI 3.0/3.1 JSON or YAML from a file or URL at server startup. Supported JSON proxy operations share schema validation, configured ACLs, filters and auditing with CLI modules. Specification-fetch, upstream API and client credentials stay separate. Import is available to serve/a2a; local exec and shims run CLI commands.
08Enforce Policy at Execution: A new starter ACL defaults to deny unknown, destructive and network-reaching modules. Servers require explicit --acl; configured missing or malformed policies fail closed. Approval checks evaluate actual escalating arguments: MCP prompting requires --enable-approval and a compatible client, while A2A approval stores are library-only. Audit executions, refusals and ACL decisions without input values.
09Bound CLI Processes and Paths: Always check schema-typed filesystem paths against configurable system and credential boundaries. Run argv without a shell, scrub the child environment, enforce timeouts and cap captured output. Servers offer retry and circuit breaking; local execution disables both. These controls do not provide an OS sandbox or govern remote API filesystems.
10Verify Contracts After Changes: apexe verify detects source drift against the pre-overlay baseline. Optional readonly, isolated and explicitly authorized dry-run cases test concrete invocations. Recorded evidence is bound to binding, binary and case digests, and invalidates when they change; passing cases do not certify every invocation.
11Build Your Own Integrations: Export YAML bindings and optional Claude Skills, embed the Rust library or export OpenAI tool definitions programmatically. Verbose discovery exposes schemas and ACL context; structured CLI errors and module guidance help callers inspect and correct failures.
· related

Related Products

apcore logo

apcore

The shared registry, schema validation and governed executor behind CLI and API modules.

View Product
apcore-toolkit logo

apcore-toolkit

Scanner, binding and OpenAPI utilities used to describe existing tools.

View Product
apcore-mcp logo

apcore-mcp

MCP serving with structured results, authentication, middleware and Explorer UI.

View Product
apcore-a2a logo

apcore-a2a

A2A serving with authenticated callers over the shared governed executor.

View Product