Basic Example: Scan Tools, Explore via Browser¶
Scans ls, jq and curl, reviews the generated default-deny ACL, then
starts an HTTP server with Explorer UI, ACL enforcement, and approval enabled.
Prerequisites¶
callpactinstalled (cargo install --path ../..)ls,jq, andcurlon your$PATH
Run¶
Set CALLPACT_EXAMPLE_PORT=18000 ./run.sh to choose another HTTP port. The default
remains 8000; automated validation chooses a free temporary port.
What it does¶
- Scans
ls,jq, andcurl(extracts flags and generates JSON Schema) - Writes binding files to
./output/modules/ - Prints the generated
~/.callpact/acl.yamlfor review - Prints Claude Desktop and Cursor configs with
--acland--enable-approval - Starts the HTTP server with the same governance flags and Explorer UI at http://127.0.0.1:8000/explorer
The generated ACL allows local readonly tools and denies destructive,
open-world, and unclassified modules by default. cli.ls is a useful safe call
for this example, while cli.curl is expected to be denied until an operator
reviews the policy and adds a narrowly scoped allow rule. Inspect the generated
ACL for cli.jq rather than assuming a classification from its name.
When ls is scanned without a reviewed overlay, accepted flags can mark the
module as approval-capable. --enable-approval lets the
approval gate
check the actual arguments. Neither listing below sends an escalating flag, so
neither needs a prompt. Calls that do require approval are refused if the client
cannot prompt for it. The ACL still denies cli.curl.
Using the Explorer UI¶
-
Open http://127.0.0.1:8000/explorer in your browser
-
Click
You'll see your current directory listing immediately. This is the quickest way to verify CallPact works.cli.ls→ type{}→ click Call: -
Click
cli.lsagain to request a long listing and an operand. Use the schema property that declares the-lflag:lfor BSD/GNUls, orlongfor uutilsls(including Ubuntu 26.04). JSON property names are derived from each installation's declared flags, not portable CLI aliases.
BSD/GNU:
uutils:
Inspect the input schema in Explorer or run callpact list --verbose --format json
with the example's --bindings-dir ./output/modules to confirm the property.
-
Check that
cli.curlis absent from the tool list. The generated ACL denies it becausecurlis an open-world tool. Review the matched rule withcallpact acl explain cli.curl --caller @external --path ~/.callpact/acl.yaml. -
The response includes
stdout,stderr,exit_code,trace_id, andduration_ms
Explorer prefills only required fields. It uses
nullwhen a required field has no declared default, so replacenullwith a value before executing the call. An untouched required string is rejected by schema validation rather than being sent to the CLI.
Claude Desktop integration¶
After testing with Explorer, switch to stdio for Claude Desktop:
callpact serve --show-config claude-desktop --bindings-dir ./output/modules \
--acl ~/.callpact/acl.yaml --enable-approval
Copy the JSON into ~/Library/Application Support/Claude/claude_desktop_config.json, restart Claude Desktop.