Skip to content

Command Reference

Install:

Terminal window
npm install -g @orgloop/cli
CommandDescription
orgloop initScaffold a new project
orgloop addAdd connectors, transforms, loggers, or routes
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 logsTail or query the event log
orgloop testInject a test event and trace its path
orgloop stopStop the current module (or daemon if last module)
orgloop shutdownStop the daemon and all modules unconditionally
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 `npm install` to install dependencies, then `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.

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

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 "my-filter" not found.
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)
  • 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 secret added)
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 project config, and starts an HTTP control API. The control API port is written to ~/.orgloop/runtime.port so that other commands (status, stop) can communicate with the running runtime.

orgloop start [options]
FlagDescription
--daemonRun as background daemon
--supervisedEnable supervisor for auto-restart on crash (requires --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
# Supervised daemon (auto-restarts on crash)
orgloop start --daemon --supervised

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

Terminal window
orgloop start --daemon --supervised

Adds a supervisor process that automatically restarts the runtime on crash. Exponential backoff with crash loop detection (max 10 restarts in 5 minutes). Recommended for production deployments.

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. 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:4800
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

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: dedup PASS (1ms)
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 current module. Module-aware — if multiple modules share a daemon, only the current directory’s module is unloaded. If it is the last module, the daemon shuts down entirely.

orgloop stop [options]
FlagDescription
--forceForce kill with SIGKILL
--allStop the daemon and all modules (alias for orgloop shutdown)
Terminal window
# Single module running:
$ orgloop stop
Module "engineering-org" is the last module. Shutting down daemon.
Stopping OrgLoop daemon (PID 42891)...
Stopped.
# Multiple modules running:
$ orgloop stop
Unloading module "engineering-org"...
Module "engineering-org" stopped. Daemon continues with 1 module(s).

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.


Stop the daemon and all loaded modules unconditionally. Unlike stop, which is module-aware, shutdown always takes down the entire daemon.

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

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, dedup] 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

The runtime includes an HTTP server (default port 4800, configurable via ORGLOOP_PORT) that starts automatically with orgloop start. It serves three route families.

EndpointDescription
GET /api/statusRuntime health, uptime, PID, per-module status, per-source detail
GET /api/routesAll routes with fire counts and last-fired timestamps
GET /api/eventsRecent events from ring buffer. Query params: from, to, source, route, limit
GET /api/sourcesPer-source connector detail (type, health, event count, poll interval)
GET /api/metricsPrometheus-format metrics (requires ORGLOOP_METRICS_PORT env var)
EndpointDescription
GET /control/statusRuntime status snapshot
POST /control/module/loadLoad a new module: { name, config }
POST /control/module/unloadUnload a module: { name }
POST /control/module/reloadReload a module: { name }
GET /control/module/listList all loaded modules
GET /control/module/status/:nameStatus of a specific module
POST /control/shutdownGraceful runtime shutdown
EndpointDescription
POST /webhook/:sourceIdReceive webhook events for hook-based sources (coding-agent, webhook)

The HTTP server binds to 127.0.0.1 (localhost only). CLI commands like orgloop status and orgloop stop communicate with the running runtime via these endpoints.