Command-line interface for Auto Engineer, a tool for building applications with Narrative Driven Development.
npm install @auto-engineer/cliCommand-line interface for Auto Engineer, a tool for building applications with Narrative Driven Development.
---
The CLI orchestrates a pipeline-based architecture that loads plugins, starts development servers, and synchronizes files between local development and remote sandboxes. It serves as the primary entry point for running Auto Engineer workflows.
---
``bashGlobal
npm install -g @auto-engineer/cli
Quick Start
`bash
Step 1: Create a config file
cat > auto.config.ts << 'EOF'
import { define } from '@auto-engineer/pipeline';export const plugins = [
'@auto-engineer/narrative',
'@auto-engineer/server-generator-apollo-emmett',
];
export const pipeline = define('my-pipeline')
.on('SchemaExported')
.emit('GenerateServer', (e) => ({
modelPath: e.data.outputPath,
destination: e.data.directory,
}))
.build();
EOF
Step 2: Start the server
auto startStep 3: View the pipeline diagram
auto diagram
`---
How-to Guides
$3
`bash
auto start
or simply
auto
`$3
`bash
auto dispatch GenerateServer --data '{"modelPath": "./schema.json", "destination": "."}'
`$3
`bash
auto status
`$3
`bash
auto dispatch MyCommand --host http://localhost:5555 --data '{}'
`$3
`bash
auto start --port 8080 --config ./ci.config.ts
`---
CLI Reference
$3
####
auto startStart the pipeline server with loaded config (default command).
`bash
auto start [options]
`| Option | Alias | Type | Default | Description |
|--------|-------|------|---------|-------------|
|
--port | -p | number | 5555 | Server port |
| --debug | -d | boolean | false | Enable debug mode |
| --config | -c | string | auto.config.ts | Path to config file |####
auto dispatch Dispatch a command to the pipeline server.
`bash
auto dispatch [options]
`| Option | Type | Default | Description |
|--------|------|---------|-------------|
|
--data | string | {} | Command data as JSON |
| --host | string | localhost | Connect to existing server |####
auto statusCheck pipeline server health and registry status.
`bash
auto status
`####
auto diagramOpen the pipeline diagram in a browser.
`bash
auto diagram
`$3
`typescript
// auto.config.ts
import { define } from '@auto-engineer/pipeline';export const fileId = 'my-project';
export const plugins = [
'@auto-engineer/narrative',
'@auto-engineer/server-generator-apollo-emmett',
];
export const pipeline = define('my-pipeline')
.on('SchemaExported')
.emit('GenerateServer', (e) => ({
modelPath: e.data.outputPath,
destination: e.data.directory,
}))
.build();
`---
Troubleshooting
$3
Symptom:
No pipeline config found errorCause: Missing auto.config.ts file in current directory
Solution:
`bash
Create a minimal config
cat > auto.config.ts << 'EOF'
export const plugins = [];
export const pipeline = { nodes: [] };
EOF
`$3
Symptom: Server fails to bind to port
Cause: Another process is using the port
Solution:
`bash
auto start --port 5556
`$3
Symptom: Command handlers not found
Cause: Plugin package not installed or COMMANDS not exported
Solution:
`bash
pnpm add @auto-engineer/my-plugin
`$3
`bash
DEBUG=auto:* auto start
`---
Architecture
`
src/
├── index.ts
├── file-syncer/
│ └── index.ts
└── bin/
└── auto.js
`$3
| Endpoint | Description |
|----------|-------------|
|
/health | Server health check |
| /registry | List registered handlers |
| /pipeline | Pipeline state |
| /pipeline/diagram | Visual diagram |
| /events | SSE stream |
| ws:// | File sync WebSocket |$3
| Package | Usage |
|---------|-------|
|
@auto-engineer/pipeline | Pipeline server infrastructure |
| @auto-engineer/narrative | File discovery for sync |
| @auto-engineer/file-store | Virtual file system |
| commander | CLI argument parsing |
| socket.io | WebSocket communication |
| chokidar` | File system watching |