Quickstart
This walkthrough uses examples/demos/openapi-fastapi. The same sync flow
applies to any app that exposes an OpenAPI document.
Prerequisites
Section titled “Prerequisites”appctlinstalled- Python 3.11+
- For the simplest setup, run
appctl setupfrom the demo folder after starting the app. The manual commands below are for users who want each step shown explicitly.
1. Clone and start the demo
Section titled “1. Clone and start the demo”git clone https://github.com/Esubaalew/appctl.gitcd appctl/examples/demos/openapi-fastapipython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txtuvicorn main:app --host 127.0.0.1 --port 8000 &Confirm the OpenAPI document is being served:
curl -s http://127.0.0.1:8000/openapi.json | head -c 60Output:
{"openapi":"3.1.0","info":{"title":"appctl demo API","ve2. Guided setup or manual sync
Section titled “2. Guided setup or manual sync”Recommended:
appctl setupChoose “OpenAPI document,” then enter:
- OpenAPI URL:
http://127.0.0.1:8000/openapi.json - Base URL:
http://127.0.0.1:8000
Manual equivalent:
In the same folder, point appctl at the live document:
appctl sync --openapi http://127.0.0.1:8000/openapi.json \ --base-url http://127.0.0.1:8000 --forceUse --force if this directory already has a schema.json (e.g. you ran
this before or copied the folder). Details.
Current output shape:
Sync complete✔ Openapi: 1 resources, 1 tools written under .appctlA new .appctl/schema.json describes the generated tool and .appctl/tools.json
holds the flattened tool list the model sees.
3. Verify the tool is reachable
Section titled “3. Verify the tool is reachable”appctl doctorOutput:
tool method path HTTP verdictcreate_widget_widgets_post POST /widgets 200 reachable4. Talk to it
Section titled “4. Talk to it”For a one-shot answer:
appctl run "create a widget named Demo"Or get structured output for scripts:
appctl run --json "create a widget named Demo"Or open the interactive REPL:
appctl chat# appctl[app · openai]▶ create a widget named DemoThe agent picks create_widget_widgets_post, calls it, and prints the
response. Every call is logged to .appctl/history.db.
appctl history --last 55. Run as a daemon (optional)
Section titled “5. Run as a daemon (optional)”appctl serve --port 4242See HTTP API for routes and WebSocket events.
Clean up
Section titled “Clean up”kill %1 # stop uvicorndeactivate # exit venvSequence summary
Section titled “Sequence summary”- The demo app serves an OpenAPI document.
appctl setupguides provider setup and sync; manualappctl syncmaps operations to tools in.appctl/schema.json(hereprovenance=declared).appctl doctorchecks reachability against the live base URL.appctl chat/appctl runsend the tool list to the model and execute the calls it requests.
Next: other sync sources · provenance and safety · deploy / serve