Skip to main content

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

GoalGuide
Put modular on PATH and open a workspaceSetup
Create, check, inspect, or recover a modMod development
Run commands and read state or eventsWorkspace context
Chat with or automate an agent sessionAgent 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

CommandWhat 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

CommandOutput
modJSON
context callone JSON object
context watch or subscriptionnewline-delimited JSON
agentreadable 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