Skip to content

Command Reference

Install:

Terminal window
npm install -g @orgloop/cli
CommandDescription
orgloop initScaffold a new project
orgloop addAdd connectors, transforms, loggers, routes, or modules
orgloop validateValidate configuration files and references
orgloop envCheck environment variable configuration
orgloop doctorFull environment health check
orgloop planPreview changes (Terraform-style diff)
orgloop routesVisualize the routing topology
orgloop startStart the runtime
orgloop statusShow runtime status and recent events
orgloop moduleManage runtime modules (list, status, load, unload, reload)
orgloop logsTail or query the event log
orgloop testInject a test event and trace its path
orgloop stopStop the runtime gracefully
orgloop hookForward hook events to the running engine
orgloop inspectDeep-dive into a source, actor, or route
orgloop install-serviceGenerate a platform service file
orgloop serviceManage the installed service
orgloop versionPrint version info

Available on all commands:

FlagShortDescription
--config <path>-cPath to orgloop.yaml (default: ./orgloop.yaml)
--jsonMachine-readable JSON output
--no-interactiveDisable interactive prompts
--verbose-vVerbose output
--help-hShow help
  1. CLI flags (highest priority)
  2. Environment variables (ORGLOOP_*)
  3. orgloop.yaml in current directory
  4. ~/.orgloop/config.yaml (user defaults)

Scaffold a new OrgLoop project.

orgloop init [options]
FlagDescription
--name <name>Project name
--connectors <list>Comma-separated connector names (e.g., github,linear,openclaw)
--no-interactiveSkip all prompts, use defaults and flags
Terminal window
$ orgloop init
? Project name: my-org
? Description: Engineering organization event routing
? Which connectors? (space to select)
* GitHub
* Linear
* OpenClaw
* Claude Code
Webhook (generic)
Created:
orgloop.yaml
connectors/github.yaml
connectors/linear.yaml
connectors/openclaw.yaml
connectors/claude-code.yaml
routes/example.yaml
loggers/default.yaml
transforms/transforms.yaml
sops/example.md
Next: run `orgloop add module <name>` to install a workflow, or `orgloop doctor` to check your environment.

If Claude Code is selected, init offers to install the OrgLoop stop hook into your Claude Code settings (global or project scope).

Terminal window
orgloop init --name my-org --connectors github,linear,openclaw --no-interactive

Scaffold new components or install workflow modules.

orgloop add connector <name> [options]
FlagDescription
--type <source|actor>Connector type
Terminal window
orgloop add connector jira
orgloop add connector my-custom --type source
orgloop add transform <name> [options]
FlagDescription
--type <script|package>Transform type
Terminal window
orgloop add transform my-filter --type script # Creates a bash script
orgloop add transform my-enricher --type package # Creates a TypeScript package

Script transforms: exit code 0 = pass, exit code 78 = drop.

orgloop add logger <name>
Terminal window
orgloop add logger datadog
orgloop add route <name> [options]
FlagDescription
--source <id>Source connector ID
--actor <id>Actor connector ID
Terminal window
orgloop add route my-route --source github --actor engineering

Install a composable workflow module.

orgloop add module <name> [options]
FlagDescription
--path <dir>Install from a local directory
--no-interactiveSkip parameter prompts, use defaults
--params <json>Parameter values as JSON string
Terminal window
# Install from npm registry
orgloop add module engineering
# Install from a local path
orgloop add module my-workflow --path ./modules/my-workflow
# Non-interactive with explicit params
orgloop add module engineering --no-interactive \
--params '{"github_source":"github","agent_actor":"engineering"}'

See Modules for details on the module system.


Validate configuration files and all references.

orgloop validate
Terminal window
$ orgloop validate
orgloop.yaml valid project manifest
connectors/github.yaml valid source definition
connectors/openclaw.yaml valid actor definition
routes/engineering.yaml error at routes[0].transforms[1]:
Transform "injection-scanner" not found. Did you mean "injection-scan"?
loggers/default.yaml valid logger group
1 error, 0 warnings

What gets validated:

  • YAML syntax
  • Schema conformance (JSON Schema via AJV)
  • Reference integrity — routes reference existing sources, actors, transforms
  • Connector config completeness (required fields present)
  • Transform script existence and permissions (executable bit)
  • Launch prompt file existence (routes with with.prompt_file)
  • Module manifest validation and route expansion
  • Environment variable references

Check environment variable configuration. Scans all YAML files for ${VAR_NAME} references and shows which are set and which are missing.

orgloop env [check] [options]
Terminal window
$ orgloop env
Environment Variables:
GITHUB_TOKEN connectors/github.yaml
LINEAR_API_KEY connectors/linear.yaml
Linear personal API key
https://linear.app/settings/api
OPENCLAW_WEBHOOK_TOKEN connectors/openclaw.yaml
2 of 3 variables set. 1 missing.

When connector setup metadata is available, missing variables show a description and a help URL for creating the credential.

Strict mode for CI. Exits with code 1 if any required variable is missing.

Terminal window
orgloop env check
Terminal window
orgloop env --json

Comprehensive environment health check. Goes beyond env to validate credentials against live APIs, detect running services, check config validity, and verify the route graph.

orgloop doctor [options]
FlagDescription
--jsonMachine-readable JSON output (stable interface for external tools)
Terminal window
$ orgloop doctor
OrgLoop Doctor my-org
Packages:
@orgloop/connector-github (1.2.0)
@orgloop/connector-openclaw (1.0.3)
@orgloop/connector-claude-code not installed
Fix: npm install @orgloop/connector-claude-code
Services:
OpenClaw running at localhost:18789 (v2.1.0)
Credentials:
GITHUB_TOKEN valid (user: @alice, scopes: repo, read:org)
LINEAR_API_KEY not set
Linear personal API key
https://linear.app/settings/api
Hooks:
Claude Code stop hook installed (global)
Config:
orgloop.yaml valid
3 routes, 2 sources, 1 actor all references resolve
1 package missing, 1 credential missing.
System will run in degraded mode.
Terminal window
$ orgloop doctor --json
{
"status": "degraded",
"checks": [
{ "category": "package", "name": "@orgloop/connector-github", "status": "ok", "version": "1.2.0" },
{ "category": "service", "name": "openclaw", "status": "ok", "version": "2.1.0" },
{ "category": "credential", "name": "GITHUB_TOKEN", "status": "ok", "identity": "@alice" },
{ "category": "credential", "name": "LINEAR_API_KEY", "status": "missing",
"help_url": "https://linear.app/settings/api" }
]
}

Preview what will change before starting the runtime. Terraform-style diff.

orgloop plan
Terminal window
$ orgloop plan
OrgLoop Plan my-org
Sources:
+ github (new poll every 5m)
+ linear (new poll every 5m)
~ claude-code (changed hook_type: post-exit exit)
Actors:
= engineering (unchanged)
Routes:
+ github-pr-review (new)
+ github-ci-failure (new)
+ linear-to-engineering (new)
+ claude-code-to-supervisor (new)
Transforms:
+ drop-bot-noise (new package)
Loggers:
= file-log (unchanged)
+ console-log (new)
Plan: 7 to add, 1 to change, 0 to remove.
Run `orgloop start` to execute this plan.

Symbols:

SymbolMeaning
+New — will be created
~Changed — will be updated
=Unchanged — already running
-Removed — will be stopped

Plan compares your YAML config against the last running state (stored in ~/.orgloop/state.json). On first run, everything shows as + new.


Visualize the routing topology as an ASCII graph.

orgloop routes [options]
FlagDescription
--jsonMachine-readable JSON output
Terminal window
$ orgloop routes
OrgLoop Routes my-org
github ──▶ github-pr-review ──▶ engineering
└─ filter: resource.changed, provenance.platform_event: pull_request.review_submitted
└─ transform: drop-bot-noise dedup
linear ──▶ linear-to-engineering ──▶ engineering
└─ filter: resource.changed
└─ transform: dedup
claude-code ──▶ claude-code-supervisor ──▶ engineering
└─ filter: actor.stopped
5 routes, 0 warnings

Shows sources, routes with filter criteria and transform chains, and target actors. Highlights unrouted sources and unreachable actors as warnings.


Start the runtime. Events begin flowing.

Internally, start creates a Runtime instance, loads your config as a module, and starts an HTTP control API. The control API port is written to ~/.orgloop/runtime.port so that other commands (status, stop, module) can communicate with the running runtime.

orgloop start [options]
FlagDescription
--daemonRun as background daemon
--forceSkip doctor pre-flight checks
Terminal window
$ orgloop start
Source github polling started (every 5m)
Source linear polling started (every 5m)
Source claude-code hook listener started
Actor engineering ready
Route github-pr-review active
Route linear-to-engineering active
Route claude-code-to-supervisor active
Logger file-log configured
Logger console-log configured
OrgLoop is running. PID: 42891
Logs: orgloop logs | Status: orgloop status | Stop: orgloop stop

Press Ctrl+C to stop in foreground mode.

Terminal window
orgloop start --daemon
# PID written to ~/.orgloop/orgloop.pid
# Control API port written to ~/.orgloop/runtime.port

One long-running process manages all source polling internally. Poll intervals are declared in YAML — no external schedulers, no separate LaunchAgents, no cron jobs.

Once the runtime is running, use orgloop module list to see loaded modules and orgloop module load to hot-load additional modules without restarting.

Start checks environment variables before starting. If any are missing, it fails fast with actionable guidance:

Environment Variables:
✓ GITHUB_REPO
✗ GITHUB_TOKEN connectors/github.yaml
→ GitHub personal access token (repo scope)
→ https://github.com/settings/tokens/new?scopes=repo,read:org
1 variable missing — run `orgloop env` for details.

Show runtime status and recent events. Queries the running runtime’s control API (GET /control/status) for module-aware status. Falls back to PID-based status if the control API is not reachable.

orgloop status [options]
FlagDescription
--jsonMachine-readable JSON output
Terminal window
$ orgloop status
OrgLoop Runtime
Status: running (PID 42891)
Uptime: 3h 22m
Control API: http://127.0.0.1:9801
Modules: 1
Module: my-org
State: running | Uptime: 3h 22m
Sources: 3 | Actors: 1 | Routes: 4
SOURCE TYPE HEALTH
github poll healthy
linear poll healthy
claude-code hook
Recent Events (last 5):
TIME SOURCE TYPE ROUTE STATUS
20:47:12 github resource.changed github-pr-review delivered
20:47:12 github resource.changed github-pr-review dropped (bot)
20:42:08 linear resource.changed linear-to-engineering delivered
20:18:33 cc actor.stopped claude-code-to-supervisor delivered
20:15:01 github resource.changed github-pr-review delivered

When multiple modules are loaded, each module is displayed as its own section with independent health tables. Use orgloop module status <name> for a detailed view of a single module.


Manage modules in a running runtime. All subcommands communicate with the runtime via its HTTP control API (port read from ~/.orgloop/runtime.port). The runtime must be running (orgloop start) before using these commands.

List all loaded modules.

orgloop module list
Terminal window
$ orgloop module list
Modules
NAME STATE SOURCES ROUTES ACTORS UPTIME
my-org running 3 4 1 3h 22m
monitoring running 1 2 1 1h 05m

Show detailed status for a loaded module, including per-source health.

orgloop module status <name>
Terminal window
$ orgloop module status my-org
Module: my-org
State: running
Uptime: 3h 22m
SOURCE TYPE HEALTH
github poll healthy
linear poll healthy
claude-code hook
Routes: 4

Load a module into the running runtime. The module is resolved, validated, and started without restarting the runtime.

orgloop module load <path> [options]
FlagDescription
--params <json>Module parameters as JSON string
--params-file <path>Path to JSON file with module parameters
Terminal window
# Load a local module
orgloop module load ./modules/monitoring
# Load with parameters
orgloop module load ./modules/engineering \
--params '{"github_source":"github","agent_actor":"engineering"}'
# Load with parameters from a file
orgloop module load ./modules/engineering --params-file params.json

Unload a module from the running runtime. Stops all sources, routes, and actors owned by the module.

orgloop module unload <name>
Terminal window
$ orgloop module unload monitoring
Module monitoring unloaded.

Reload a module (unload + load). Useful after changing module configuration or code.

orgloop module reload <name>
Terminal window
$ orgloop module reload my-org
Module my-org reloaded.

Tail or query the event log.

orgloop logs [options]
FlagDescription
--source <id>Filter by source connector ID
--route <name>Filter by route name
--result <result>Filter by result (drop, deliver, error)
--since <duration>Time window (e.g., 2h, 30m, 1d)
--event <id>Trace a specific event by ID
--jsonJSON output
--no-followDo not tail (print matches and exit)
Terminal window
# Tail all logs (follows new entries)
orgloop logs
# Filter by source
orgloop logs --source github
# Filter by route
orgloop logs --route github-pr-review
# Historical query (last 2 hours, resource.changed only)
orgloop logs --since 2h --source github
# Show only dropped events
orgloop logs --result drop
# Trace a specific event end-to-end
orgloop logs --event evt_abc123
# Query mode (do not follow, just print)
orgloop logs --no-follow --source linear --since 1h
# Machine-readable output
orgloop logs --json --no-follow

Log entries capture every phase of the pipeline:

{"ts":"...","phase":"source","source":"github","event_id":"evt_abc","event_type":"resource.changed"}
{"ts":"...","phase":"transform","transform":"drop-bot-noise","event_id":"evt_abc","result":"pass"}
{"ts":"...","phase":"route","event_id":"evt_abc","matched":"github-pr-review"}
{"ts":"...","phase":"deliver","event_id":"evt_abc","target":"engineering","status":"delivered"}

Inject a test event and trace its path through the pipeline.

orgloop test [file] [options]
FlagDescription
--dry-runTrace the event path without actual delivery
--generate <connector>Generate a sample event for a connector
-Read event from stdin
Terminal window
$ orgloop test event.json
Injecting test event: resource.changed (source: github)
Transform: drop-bot-noise PASS (2ms)
Transform: injection-scanner PASS (15ms)
Route match: github-pr-review
Delivery: engineering 200 OK (89ms)
Event evt_test_001 traced successfully through 1 route.
Terminal window
orgloop test event.json --dry-run

Traces the event through transforms and route matching without delivering to actors.

Terminal window
# Generate and print a sample event for a connector
orgloop test --generate github
# Generate and immediately test the pipeline
orgloop test --generate github | orgloop test -
Terminal window
echo '{"type":"resource.changed","source":"github","payload":{}}' | orgloop test -

Stop the runtime gracefully. Tries the control API first (POST /control/shutdown) for a clean shutdown of all modules and the HTTP server. Falls back to SIGTERM via PID file if the control API is not reachable.

orgloop stop [options]
FlagDescription
--forceForce kill with SIGKILL
Terminal window
$ orgloop stop
Stopping OrgLoop (PID 42891)...
Requesting graceful shutdown via control API...
Stopped.

Graceful shutdown: flushes log buffers, persists source checkpoints, waits for in-flight deliveries (with timeout), then exits. If the process does not exit within 10 seconds, it is force-killed with SIGKILL.


Forward hook events from external tools to the running OrgLoop engine.

orgloop hook <hook-type> [options]

Forward a Claude Code stop hook event.

Terminal window
orgloop hook claude-code-stop

Reads hook event data from stdin and POSTs it to the running engine’s webhook endpoint. Used by Claude Code’s post-exit hooks to forward session completion events into OrgLoop’s pipeline.

The engine must be running with a claude-code source registered.


Deep-dive into a specific source, actor, or route.

orgloop inspect <type> <name>
Terminal window
$ orgloop inspect source github
Name: github
Type: poll (every 5m)
Connector: @orgloop/connector-github
Config: repo=my-org/my-repo
Emits: resource.changed
Checkpoint: 2026-02-08T20:47:00Z
Routes: github-pr-review, github-ci-failure
Events: 47 (24h), 312 (7d)
Terminal window
$ orgloop inspect route github-pr-review
Name: github-pr-review
Source: github [drop-bot-noise, injection-scanner] engineering
Prompt: ./sops/pr-review.md
Matched: 45 (24h)
Dropped: 2 (24h) — all by drop-bot-noise
Errors: 0
Last event: 3 min ago (evt_abc123)

Shows configuration, event statistics, connected components, and recent activity.


Generate a platform service file to run OrgLoop as a system service.

orgloop install-service [options]
FlagDescription
--launchdmacOS LaunchAgent plist
--systemdLinux systemd user service
--dockerDockerfile + docker-compose.yaml
Terminal window
$ orgloop install-service
Detected platform: macOS (launchd)
Generated: ~/Library/LaunchAgents/com.orgloop.daemon.plist
KeepAlive: true
WorkingDirectory: ~/.orgloop
Config: ~/.orgloop/orgloop.yaml
To activate:
launchctl load ~/Library/LaunchAgents/com.orgloop.daemon.plist
Terminal window
orgloop install-service --systemd # Linux
orgloop install-service --launchd # macOS
orgloop install-service --docker # Docker

The generated service keeps OrgLoop alive across reboots and restarts on crash.


Manage the installed system service. Thin wrappers around platform tools (launchctl, systemctl).

orgloop service <action>
ActionDescription
startStart the OrgLoop service
stopStop the service
statusShow service status
logsView service logs
Terminal window
orgloop service start
orgloop service stop
orgloop service status
orgloop service logs

Print version information.

orgloop version
Terminal window
$ orgloop version
@orgloop/cli 1.0.0