CLI Guide
The SmythOS CLI lets you build, test, and manage agents directly from your terminal.
It’s ideal if you want faster iteration, automation, or integration into existing developer workflows.
Install the CLI
Install globally using npm:
npm install -g @smythos/cli
Core Commands
These commands cover the majority of everyday tasks:
Command | Description |
---|---|
sre create | Scaffold a new SDK agent project with prompts |
sre run | Run an agent (SDK code or .smyth file) locally |
sre build | Compile and prepare your agent for deployment |
sre export | Convert SDK projects into .smyth files for Studio |
sre help | List all commands and usage examples |
Using the CLI in Practice
1. Scaffold a project
sre create
Follow the prompts to set language (TypeScript recommended), name your agent, and initialize project files.
2. Run an agent from Studio export
If you exported an agent to .smyth
:
sre run ./my-agent.smyth
The CLI loads the agent and executes it in your terminal.
3. Run your SDK agent
From within an SDK project directory:
sre run
Runs the project entrypoint (e.g. index.ts
) and streams the output.
4. Export for Studio
Convert your SDK project back into Studio format:
sre export
Generates a .smyth
file ready to open visually.
Automating with CLI Scripts
You can add CLI commands into npm scripts or shell scripts for automation.
package.json example:
{
"scripts": {
"dev": "sre run",
"build": "sre build",
"export": "sre export"
}
}
Now you can run:
npm run dev
npm run build
Troubleshooting
- Run
sre help
for a full list of commands - Confirm Node.js v18+ is installed
- Update regularly to avoid compatibility issues:
npm update -g @smythos/cli
If problems persist, check SRE GitHub Issues.
Next Steps
- Getting Started Guide – setup and prerequisites
- Building Agents – visual and code-first paths
- SDK Guide – extend workflows programmatically
- Hybrid Workflows – combine Studio, CLI, and SDK