AI Agents Integration
This guide provides instructions for AI coding agents (Cursor, Windsurf, Cline, Aider, Claude Code, etc.) on how to control DevAll using CLI commands. These commands allow agents to manage development services programmatically.
Two Ways to Integrate DevAll
Section titled “Two Ways to Integrate DevAll”There are two approaches to integrating DevAll with AI coding agents:
1. Simple Approach: AGENTS.md or CLAUDE.md Files (Recommended)
Section titled “1. Simple Approach: AGENTS.md or CLAUDE.md Files (Recommended)”Best for: Most projects, quick setup, no additional configuration needed
Add DevAll instructions directly to your project’s AGENTS.md or CLAUDE.md file. This is simpler than MCP integration and works with all AI coding agents that read these instruction files.
Skip to the copyable instructions block
2. Advanced Approach: MCP Integration
Section titled “2. Advanced Approach: MCP Integration”Best for: Claude Code users who want deep integration with function calling
Use DevAll’s Model Context Protocol (MCP) server for richer integration. This allows Claude Code to call DevAll functions directly without running CLI commands.
See the Claude Code Integration guide for MCP setup.
Overview
Section titled “Overview”DevAll provides a comprehensive CLI that AI agents can use to:
- Start, stop, and restart development services
- Monitor service status and health
- View and analyze service logs
- Manage configuration
- Check system resources
- Expose services via ngrok tunnels
Prerequisites
Section titled “Prerequisites”For AI agents to use DevAll commands:
-
DevAll must be running: Start the DevAll server first
Terminal window npx devall -
Run CLI commands in a separate terminal: Most commands require the server to be running
-
Use full command paths: Always use
npx devallor full path to ensure availability
Adding to AGENTS.md or CLAUDE.md
Section titled “Adding to AGENTS.md or CLAUDE.md”The simplest way to integrate DevAll with AI agents is to add instructions to your project’s AGENTS.md or CLAUDE.md file. AI coding agents automatically read these files to understand project-specific commands and workflows.
Copy and paste this block into your AGENTS.md or CLAUDE.md file:
# DevAll Service Management
This project uses DevAll for service orchestration. DevAll must be running before using these commands.
## Starting DevAll
```bash# Start DevAll dashboard (in a separate terminal)npx devallEssential DevAll Commands
Section titled “Essential DevAll Commands”List all configured services
Section titled “List all configured services”npx devall listStart a service
Section titled “Start a service”npx devall start <service-name>Stop a service
Section titled “Stop a service”npx devall stop <service-name>Restart a service
Section titled “Restart a service”npx devall restart <service-name>Restart all services
Section titled “Restart all services”npx devall restart --allCheck service status
Section titled “Check service status”npx devall status <service-name>View service logs (last 100 lines)
Section titled “View service logs (last 100 lines)”npx devall logs <service-name>View service logs (specific number of lines)
Section titled “View service logs (specific number of lines)”npx devall logs <service-name> 50View only error logs
Section titled “View only error logs”npx devall errors <service-name>Check system health
Section titled “Check system health”npx devall healthView configuration
Section titled “View configuration”npx devall configCheck port usage
Section titled “Check port usage”npx devall portsDevAll CLI Best Practices
Section titled “DevAll CLI Best Practices”- Always list services first: Use
npx devall listto get exact service names - Check status before starting: Run
npx devall status <service>to avoid starting already-running services - Output is JSON by default: Parse the JSON output for reliable automation
- DevAll server must be running: All commands except
--helprequire the DevAll dashboard to be running - Wait after state changes: After starting/stopping services, wait 2-3 seconds before checking status
Common DevAll Workflows
Section titled “Common DevAll Workflows”Starting development
Section titled “Starting development”npx devall list # See available servicesnpx devall start frontend # Start frontendnpx devall start backend # Start backendnpx devall status frontend # Verify it's runningDebugging a service
Section titled “Debugging a service”npx devall status backend # Check statusnpx devall logs backend 100 # View recent logsnpx devall errors backend # Check for errorsnpx devall restart backend # Restart if neededAfter config changes
Section titled “After config changes”npx devall validate # Validate configurationnpx devall restart --all # Restart all servicesnpx devall health # Verify all are runningTroubleshooting DevAll
Section titled “Troubleshooting DevAll”- “DevAll server is not running”: Start DevAll in a separate terminal with
npx devall - “Service not found”: Run
npx devall listto see exact service names - “Port already in use”: Run
npx devall portsto check port conflicts - Service won’t start: Check
npx devall errors <service>andnpx devall logs <service>
Additional Resources
Section titled “Additional Resources”For more DevAll commands and advanced usage, see: DevAll Documentation
**Note:** This block works for both `AGENTS.md` and `CLAUDE.md` files. Both are widely supported by AI coding assistants.
## Command Reference
### Service Management
#### List All Services
Get a list of all configured service names:
```bashnpx devall listOutput format: JSON array of service names
Example output:
["frontend", "backend", "database", "api-gateway"]Agent usage:
- Use this to discover available services
- Reference these exact names in other commands
Get Service Status
Section titled “Get Service Status”Check if a service is running:
npx devall status <service-name>Examples:
npx devall status frontendnpx devall status backendOutput: JSON object with status information
Example output:
{ "name": "frontend", "status": "running", "port": 3000, "pid": 12345, "uptime": "5m 23s"}Status values:
running: Service is activestopped: Service is not runningstarting: Service is starting upcrashed: Service has crashederror: Service encountered an error
Start a Service
Section titled “Start a Service”Start a stopped service:
npx devall start <service-name>Examples:
npx devall start frontendnpx devall start backendAgent usage:
- Always check status first to avoid starting already-running services
- Wait a few seconds after starting before checking status
- Handle errors if service fails to start
Stop a Service
Section titled “Stop a Service”Stop a running service:
npx devall stop <service-name>Examples:
npx devall stop frontendnpx devall stop backendAgent usage:
- Verify service is running before attempting to stop
- Use for graceful shutdown
- Check status after stopping to confirm
Restart a Service
Section titled “Restart a Service”Restart a service (stop then start):
npx devall restart <service-name>Examples:
npx devall restart frontendnpx devall restart backendRestart all services:
npx devall restart --allAgent usage:
- Use after configuration changes
- Use when a service is misbehaving
- More reliable than manual stop+start
Logs and Debugging
Section titled “Logs and Debugging”View Service Logs
Section titled “View Service Logs”Get recent log output from a service:
npx devall logs <service-name> [lines]Examples:
# Last 100 lines (default)npx devall logs frontend
# Last 50 linesnpx devall logs frontend 50
# Last 200 linesnpx devall logs backend 200Agent usage:
- Use to diagnose issues
- Look for errors, warnings, stack traces
- Check startup messages
- Default is 100 lines if not specified
Follow Logs (Real-time)
Section titled “Follow Logs (Real-time)”Watch logs in real-time:
npx devall logs <service-name> --followExamples:
npx devall logs frontend --follownpx devall logs api-gateway -fAgent usage:
- Use when debugging active issues
- Stop with Ctrl+C when done
- Not recommended for automated scripts
View Error Logs
Section titled “View Error Logs”Get only error log lines:
npx devall errors <service-name> [lines]Examples:
npx devall errors frontendnpx devall errors backend 50Agent usage:
- Quick way to find errors
- Filters for error-level logs only
- Use for quick health checks
Configuration
Section titled “Configuration”View Configuration
Section titled “View Configuration”Get the current configuration:
# View all configurationnpx devall config
# View specific service confignpx devall config <service-name>Examples:
npx devall confignpx devall config frontendOutput: JSON object with configuration
Agent usage:
- Check service settings
- Verify port assignments
- Understand service dependencies
Validate Configuration
Section titled “Validate Configuration”Check if configuration file is valid:
npx devall validateAgent usage:
- Run after modifying config files
- Catches syntax errors
- Ensures required fields are present
Health and Monitoring
Section titled “Health and Monitoring”Health Check
Section titled “Health Check”Check overall system health:
# Check all servicesnpx devall health
# Check specific servicenpx devall health <service-name>Examples:
npx devall healthnpx devall health frontendOutput: Health status for services
Agent usage:
- Quick health overview
- Check if services are responding
- Verify system is operational
System Information
Section titled “System Information”Get detailed system and service information:
# All system infonpx devall info
# Specific service infonpx devall info <service-name>Examples:
npx devall infonpx devall info frontendOutput: Detailed system metrics
Agent usage:
- Check resource usage
- Monitor memory consumption
- Verify CPU usage
- Check disk space
Port Usage
Section titled “Port Usage”View which ports are in use:
npx devall portsWith process details:
npx devall ports --processOutput: List of ports and services
Agent usage:
- Diagnose port conflicts
- Verify services are listening
- Check for unexpected processes
Process List
Section titled “Process List”View all running DevAll processes:
npx devall processesAgent usage:
- See all managed processes
- Check PIDs
- Monitor resource usage per process
Tunneling (Ngrok)
Section titled “Tunneling (Ngrok)”Expose a Service
Section titled “Expose a Service”Create a public ngrok tunnel:
npx devall expose <service-name>Multiple services:
npx devall expose frontend backendExamples:
npx devall expose frontendnpx devall expose api-gateway databaseAgent usage:
- Share local development with others
- Test webhooks
- Demo features
- Requires ngrok installed
Stop Exposing
Section titled “Stop Exposing”Stop the ngrok tunnel:
npx devall unexpose <service-name>Examples:
npx devall unexpose frontendCheck Tunnel Status
Section titled “Check Tunnel Status”Get ngrok tunnel URL:
npx devall tunnel <service-name>Examples:
npx devall tunnel frontendOutput: Tunnel URL and status
Agent usage:
- Get public URL
- Verify tunnel is active
- Share URL with team
Output Formats
Section titled “Output Formats”DevAll CLI supports multiple output formats:
JSON (Default)
Section titled “JSON (Default)”Machine-readable JSON output:
npx devall status frontend --format jsonAgent recommendation: Use JSON for parsing responses
YAML format output:
npx devall status frontend --format yamlHuman-readable output:
npx devall status frontend --format humanDefault format is JSON, ideal for agent parsing.
Error Handling
Section titled “Error Handling”Common Errors
Section titled “Common Errors””DevAll server is not running”
Section titled “”DevAll server is not running””Cause: DevAll server is not started
Solution:
# Terminal 1: Start servernpx devall
# Terminal 2: Run CLI commandsnpx devall list“Service not found”
Section titled ““Service not found””Cause: Service name doesn’t exist in config
Solution:
- List available services:
npx devall list - Use exact service name from list
- Check configuration:
npx devall config
”Port already in use”
Section titled “”Port already in use””Cause: Another process is using the port
Solution:
- Check port usage:
npx devall ports - Stop conflicting process
- Or change port in config
Command timeout
Section titled “Command timeout”Cause: Server not responding
Solution:
- Check server is running
- Verify server URL:
--server-url http://localhost:7777 - Check firewall settings
Agent Workflows
Section titled “Agent Workflows”Workflow 1: Start Development Environment
Section titled “Workflow 1: Start Development Environment”# 1. Check what services existSERVICES=$(npx devall list)
# 2. Start essential servicesnpx devall start frontendnpx devall start backendnpx devall start database
# 3. Verify they're runningnpx devall status frontendnpx devall status backendnpx devall status database
# 4. Check for errorsnpx devall errors frontendnpx devall errors backendWorkflow 2: Diagnose Service Issue
Section titled “Workflow 2: Diagnose Service Issue”# 1. Check service statusnpx devall status backend
# 2. View recent logsnpx devall logs backend 100
# 3. Check for errorsnpx devall errors backend 50
# 4. Check resource usagenpx devall info backend
# 5. Restart if needednpx devall restart backend
# 6. Verify it's workingnpx devall health backendWorkflow 3: Deploy Configuration Changes
Section titled “Workflow 3: Deploy Configuration Changes”# 1. Validate new confignpx devall validate
# 2. Restart affected servicesnpx devall restart --all
# 3. Check all are runningnpx devall health
# 4. Monitor logs for issuesnpx devall logs frontend 50npx devall logs backend 50Workflow 4: Debug Port Conflict
Section titled “Workflow 4: Debug Port Conflict”# 1. Check port usagenpx devall ports --process
# 2. Stop conflicting servicenpx devall stop backend
# 3. Verify port is freenpx devall ports
# 4. Start service againnpx devall start backend
# 5. Confirm it's runningnpx devall status backendWorkflow 5: Share Local Service
Section titled “Workflow 5: Share Local Service”# 1. Verify service is runningnpx devall status frontend
# 2. Expose via ngroknpx devall expose frontend
# 3. Get public URLnpx devall tunnel frontend
# 4. Share URL with team# URL is in JSON response
# 5. Stop exposing when donenpx devall unexpose frontendBest Practices for Agents
Section titled “Best Practices for Agents”1. Always Check Server Status First
Section titled “1. Always Check Server Status First”Before running any command, verify DevAll is running:
npx devall healthIf it fails, instruct user to start DevAll.
2. Use Service Names from List
Section titled “2. Use Service Names from List”Don’t guess service names. Always get them from:
npx devall list3. Parse JSON Output
Section titled “3. Parse JSON Output”Use --format json (default) for consistent parsing:
STATUS=$(npx devall status frontend --format json)# Parse JSON in your agent code4. Handle Errors Gracefully
Section titled “4. Handle Errors Gracefully”Check command exit codes and output:
if npx devall start frontend; then echo "Service started successfully"else echo "Failed to start service" npx devall errors frontendfi5. Wait After State Changes
Section titled “5. Wait After State Changes”After starting/stopping services, wait 2-3 seconds before checking status:
npx devall start frontendsleep 3npx devall status frontend6. Use Specific Commands
Section titled “6. Use Specific Commands”Use the most specific command for the task:
- ✅
npx devall errors frontend- Get errors only - ❌
npx devall logs frontend | grep error- Unnecessary filtering
7. Provide Context to Users
Section titled “7. Provide Context to Users”When reporting status, include relevant details:
The frontend service is running on port 3000 (PID: 12345).It has been up for 5 minutes and 23 seconds.No errors detected in recent logs.8. Suggest Next Steps
Section titled “8. Suggest Next Steps”After diagnosing issues, suggest solutions:
The backend service crashed with this error:"ECONNREFUSED: Connection refused to database on port 5432"
This suggests the database service is not running.Would you like me to start the database service?Why Use AGENTS.md or CLAUDE.md?
Section titled “Why Use AGENTS.md or CLAUDE.md?”Adding DevAll instructions to AGENTS.md or CLAUDE.md has several advantages:
Advantages Over MCP
Section titled “Advantages Over MCP”- Simpler setup: No configuration files, no building, just copy-paste
- Works everywhere: Compatible with all AI coding agents, not just Claude Code
- Project-specific: Instructions are version-controlled with your project
- No dependencies: Doesn’t require MCP server to be running
- Easier debugging: AI agents execute CLI commands you can see and test
When to Use MCP Instead
Section titled “When to Use MCP Instead”Consider using MCP integration if you:
- Use Claude Code exclusively
- Want natural language control without CLI syntax
- Need real-time function calling
- Prefer deeper tool integration
For most use cases, the AGENTS.md/CLAUDE.md approach is simpler and sufficient.
Advanced Usage
Section titled “Advanced Usage”Custom Server URL
Section titled “Custom Server URL”Connect to DevAll on a non-default port:
npx devall list --server-url http://localhost:8888JSON Parsing Examples
Section titled “JSON Parsing Examples”Parse status in bash:
Section titled “Parse status in bash:”STATUS=$(npx devall status frontend --format json)IS_RUNNING=$(echo $STATUS | jq -r '.status')
if [ "$IS_RUNNING" = "running" ]; then echo "Service is running"fiParse in Python:
Section titled “Parse in Python:”import subprocessimport json
result = subprocess.run( ['npx', 'devall', 'status', 'frontend'], capture_output=True, text=True)
status = json.loads(result.stdout)if status['status'] == 'running': print(f"Service is running on port {status['port']}")Parse in Node.js:
Section titled “Parse in Node.js:”const { execSync } = require('child_process');
const output = execSync('npx devall status frontend').toString();const status = JSON.parse(output);
if (status.status === 'running') { console.log(`Service is running on port ${status.port}`);}Troubleshooting Guide for Agents
Section titled “Troubleshooting Guide for Agents”Issue: Commands hang or timeout
Section titled “Issue: Commands hang or timeout”Diagnosis:
# Check if server is runningcurl http://localhost:7777/api/healthSolution:
- Ensure DevAll server is started:
npx devall - Check firewall settings
- Verify port 7777 is not blocked
Issue: “Command not found: devall”
Section titled “Issue: “Command not found: devall””Diagnosis:
# Check if devall is installednpm list -g devallSolution:
- Install globally:
npm install -g devall - Or use npx:
npx devall
Issue: Service won’t start
Section titled “Issue: Service won’t start”Diagnosis:
# Check detailed statusnpx devall info <service>
# Check for port conflictsnpx devall ports
# View error logsnpx devall errors <service>Solution:
- Check if port is in use
- Verify service configuration
- Check system resources
- Review error logs for specific issues
Issue: Can’t find service
Section titled “Issue: Can’t find service”Diagnosis:
# List all servicesnpx devall list
# Check configurationnpx devall configSolution:
- Use exact service name from list
- Check service is defined in config
- Validate configuration:
npx devall validate
Example Agent Implementations
Section titled “Example Agent Implementations”Cursor Agent
Section titled “Cursor Agent”When working with DevAll:1. Check service list: `npx devall list`2. Use exact service names from list3. Always check status before starting: `npx devall status <service>`4. View logs when debugging: `npx devall logs <service> 100`5. Parse JSON output for consistent resultsAider Instructions
Section titled “Aider Instructions”# DevAll Commands
Available services: Run `npx devall list`
To start service: `npx devall start <service>`To stop service: `npx devall stop <service>`To check status: `npx devall status <service>`To view logs: `npx devall logs <service> [lines]`To restart: `npx devall restart <service>`
Always verify DevAll server is running first.Windsurf Agent
Section titled “Windsurf Agent”DevAll service management:- List services: `npx devall list`- Service status: `npx devall status <service>`- Start service: `npx devall start <service>`- Stop service: `npx devall stop <service>`- View logs: `npx devall logs <service> 100`- Check errors: `npx devall errors <service>`
Output is JSON by default. Parse accordingly.Resources
Section titled “Resources”Support
Section titled “Support”If you encounter issues:
- Check DevAll server is running
- Verify command syntax:
npx devall --help - Check service names:
npx devall list - Review logs:
npx devall logs <service> - Report issues: GitHub Issues