@moru-ai/cli
v0.3.4
Published
CLI for managing Moru sandbox templates
Downloads
397
Readme
Moru CLI
The Moru CLI lets you build and manage cloud sandboxes directly from your terminal. Create isolated environments, run code safely, and develop custom templates—all with simple commands.
Installation
Option 1: Install Script
No Node.js required. Works on Linux and macOS with automatic PATH configuration.
curl -fsSL https://raw.githubusercontent.com/moru-ai/moru/main/install.sh | bashOption 2: npm
Good for Node.js developers. Requires Node.js 20+.
npm install -g @moru-ai/cliOption 3: Homebrew (macOS/Linux)
Simple for Homebrew users.
brew tap moru-ai/moru
brew install moruVerify Installation:
moru --versionQuick Start
1. Authenticate
moru auth loginThis opens your browser for authentication. Creates an account if you don't have one yet.
[!TIP] For CI/CD or headless environments, set the
MORU_ACCESS_TOKENenvironment variable.
2. Create Your First Sandbox
moru sandbox create baseWhat happens:
- Creates an isolated cloud environment
- Connects your terminal to it
- You can now run commands as if you're SSH'd into a remote machine
3. Try It Out
# You're now inside the sandbox!
echo "Hello from cloud sandbox!"
ls
python --version
# Upload files, run scripts, test code
echo 'print("Hello Moru!")' > test.py
python test.pyExit the sandbox: Type exit or press Ctrl+D
Core Concepts
Sandbox: An isolated cloud environment where you can run code safely. Each sandbox is ephemeral—create, use, and destroy as needed.
Template: A pre-configured environment (like base, python, node). Templates define what's installed and available in your sandbox.
Custom Templates: You can create your own templates with specific dependencies, tools, or configurations.
Common Commands
Sandbox Management
moru sandbox create <template> # Create new sandbox
moru sandbox list # List all active sandboxes
moru sandbox connect <id> # Reconnect to existing sandbox
moru sandbox kill <id> # Delete sandbox
moru sandbox logs <id> # View sandbox logsAliases: moru sbx works the same as moru sandbox
Template Management
moru template init # Create new template (interactive)
moru template list # List your templates
moru template build # Build template from current directory
moru template delete <name> # Delete a template
moru template publish <name> # Make template publicAliases: moru tpl works the same as moru template
Authentication
moru auth login # Login to Moru
moru auth info # View current auth status
moru auth configure # Change team settings
moru auth logout # LogoutExamples
Quick Python Script
# Create Python sandbox and run script
moru sandbox create python
# Inside the sandbox:
cat > script.py << 'EOF'
import sys
print(f"Python {sys.version}")
print("Hello from Moru!")
EOF
python script.py
exitDevelopment Workflow
# 1. Create a custom template
moru template init
# Follow prompts: Choose language, name template, configure settings
# 2. Edit template files
# Add dependencies, customize Dockerfile, etc.
# 3. Build template
cd <template-directory>
moru template build
# 4. Test it
moru sandbox create <your-template-name>Testing Code in Isolation
# Create sandbox, run tests, destroy
moru sandbox create node
npm install
npm test
exit
# Sandbox is automatically destroyed when you disconnectNeed Help?
- Documentation: moru.io/docs
- Command Help: Run
moru <command> --helpfor detailed options - Issues: github.com/moru-ai/moru/issues
License
MIT
Built for developers who need cloud environments on-demand. Create sandboxes for testing, development, CI/CD, or any isolated execution.
