CLI
Use the CLI to work with three parts of Modular:
modular mod build and inspect mods modular context use a running workspace modular agent operate agent sessions
Start here
| Goal | Guide |
|---|---|
Put modular on PATH and open a workspace | Setup |
| Create, check, inspect, or recover a mod | Mod development |
| Run commands and read state or events | Workspace context |
| Chat with or automate an agent session | Agent sessions |
Installed and development CLIs
Use modular with the installed app:
modular . modular mod list
Inside this repository, use modular-dev for the development app:
modular-dev . modular-dev context commands list
The two commands target different app instances and runtime data. Keep one name throughout a workflow.
Targeting
| Command | What selects the target |
|---|---|
modular <path> | the file or workspace path |
modular mod ... | the mod id |
modular context ... | the shell's current directory |
modular agent ... | the session URI or active-session marker |
Output
| Command | Output |
|---|---|
mod | JSON |
context call | one JSON object |
context watch or subscription | newline-delimited JSON |
agent | readable text, with --json or --jsonl where offered |
Failures exit non-zero. For the live command and option list, use --help at
the level you are working with:
modular mod --help modular context commands run --help modular agent logs --help