How does the main entry point work?
How does the main entry point work?
About openclaw/openclaw · 2 messages · last activity 5/26/2026
Based on the search results, I can now provide you with information about how the main entry point works:
Main Entry Point
OpenClaw has a CLI-based entry point accessed via openclaw.mjs. From the CI workflow, we can see it's invoked with commands like:
node openclaw.mjs --help— displays help informationnode openclaw.mjs status --json --timeout 1— checks status with JSON output [.github/workflows/ci.yml:L566]
Architecture
According to the codebase patterns documented in [.github/instructions/copilot.instructions.md:L35-L40], the CLI is structured as:
- CLI option wiring: Located in
src/cli/ - Commands: Located in
src/commands/ - Dependency injection: Uses
createDefaultDepsfor initialization
This indicates the application follows a modular pattern where command handlers are separated from their wiring, and dependencies are injected at startup rather than hardcoded.
The current repository data doesn't include the actual openclaw.mjs or src/cli/ implementation details, so I cannot provide specifics about how arguments are parsed, how commands are dispatched, or the full initialization sequence. To get more detail, you'd need to examine those files directly.
FOLLOW_UPS:
- What does the status command do?
- How are plugins initialized at startup?
- Where is createDefaultDeps implemented?
Want to ask your own question?
Open chat for openclaw/openclaw →Public Q&A. Generated by RepoPilot from the actual source of openclaw/openclaw. AI answers can be incomplete or stale — verify before relying on them.