CLI & Scaffolding
bin/cli.ts is the loopengine command — eight subcommands, all thin
wrappers around a scaffolded project's own files rather than logic
hidden inside the package itself.
Scaffolding an agent
| Command | Usage | What it does |
|---|---|---|
add-agent |
loopengine add-agent <name> |
Writes agents/<name>/index.ts — see Add an Agent and Directory Structure for the convention it scaffolds into. |
add-subagent |
loopengine add-subagent <parent> <name> |
Writes agents/<parent>/subagents/<name>/index.ts, auto-registered as one of <parent>'s tools — no import, no tools array edit. <parent> can be a /-joined path to nest more than one level deep. |
Running a project
| Command | Usage | What it does |
|---|---|---|
run |
loopengine run <agent> [--session <id>] "<message>" |
One-shot: sends one message through adapters/cli.ts, prints the reply, exits. |
serve |
loopengine serve |
Runs adapters/http.ts as-is — every registered agent, no hot reload. |
dev |
loopengine dev |
Same server as serve, under tsx watch — editing agents/*/index.ts restarts automatically; actauth.yml/gateway-tools.yml/skills already reload without a restart either way. |
run/serve/dev all delegate to a file the project owns
(adapters/cli.ts/adapters/http.ts, created by create-loopengine's
own scaffold), not one bundled inside loopengine itself — see
Channels.
Managing abilities
bin/ability-manager.ts is a separate command with its own module map:
see Abilities for the spec resolution and
three-way merge mechanics, or Ability System for the
full format and publishing story.
| Command | Usage | What it does |
|---|---|---|
add-ability |
loopengine add-ability <spec> --agent <name> |
Installs an ability's tool/skill files and rules into agents/<name>/. |
upgrade-ability |
loopengine upgrade-ability <abilityName> --agent <name> [--spec <spec>] |
Three-way-merges each managed file against what changed upstream since install. |
remove-ability |
loopengine remove-ability <abilityName> --agent <name> [--force] |
Removes an ability's files — refuses anything hand-edited since install unless --force is given. |