@workwayco/cli
v0.3.5
Published
WORKWAY CLI - Build, test, and publish workflows and integrations
Maintainers
Readme
@workway/cli
WORKWAY CLI — Build, test, and publish workflows. Cloudflare-native. Less, but better.
Installation
npm install -g @workway/cliQuick Start
# Authenticate
workway login
# Create a workflow
workway workflow init my-workflow
# Or create an AI-powered workflow (no API keys required)
workway workflow init --ai my-ai-workflow
# Test locally
cd my-workflow
workway workflow test --mock
# Publish to marketplace
workway workflow publishCommands
Authentication
| Command | Description |
|---------|-------------|
| workway login | Authenticate with WORKWAY platform |
| workway logout | Clear local authentication |
| workway whoami | Display current authenticated user |
Workflow Development
| Command | Description |
|---------|-------------|
| workway workflow init [name] | Create a new workflow project |
| workway workflow init --ai [name] | Create AI-powered workflow (Cloudflare Workers AI) |
| workway workflow dev | Start development server with hot reload |
| workway workflow test | Test workflow execution |
| workway workflow build | Build workflow for production |
| workway workflow publish | Publish workflow to marketplace |
Test options:
workway workflow test --mock # Use mocked integrations
workway workflow test --live # Use live OAuth connections
workway workflow test --data file.json # Custom test dataBuild options:
workway workflow build --minify # Minify output
workway workflow build --sourcemap # Generate sourcemaps
workway workflow build --out-dir dist # Custom output directoryAI Commands (Cloudflare Workers AI)
| Command | Description |
|---------|-------------|
| workway ai models | List available AI models with costs |
| workway ai test [prompt] | Test AI model with a prompt |
| workway ai estimate | Estimate AI workflow costs |
List models:
workway ai models # All models
workway ai models --type text # Text generation only
workway ai models --type embeddings # Embeddings only
workway ai models --json # JSON outputTest AI:
workway ai test "Summarize this text" --mock # Mock response
workway ai test --model LLAMA_3_8B # Specific modelEstimate costs:
workway ai estimate # Interactive
workway ai estimate --executions 1000 --tokens 500 --model LLAMA_3_8BOAuth Management
| Command | Description |
|---------|-------------|
| workway oauth connect [provider] | Connect an OAuth account (gmail, slack, notion, zoom) |
| workway oauth list | List connected OAuth accounts |
| workway oauth disconnect [provider] | Disconnect an OAuth account |
Developer Profile
| Command | Description |
|---------|-------------|
| workway developer register | Register as a workflow developer |
| workway developer profile | View/edit developer profile |
| workway developer earnings | View earnings and payouts |
Status & Logs
| Command | Description |
|---------|-------------|
| workway status | Show developer dashboard and health |
| workway logs | View production workflow execution logs |
Logs options:
workway logs --workflow <id> # Filter by workflow
workway logs --limit 50 # Number of logs
workway logs --follow # Stream in real-time
workway logs --status failed # Filter by statusAI Workflow Development
Create AI-powered workflows using Cloudflare Workers AI — no external API keys required.
1. Initialize AI Workflow
workway workflow init --ai "Email Summarizer"This creates a project with:
workflow.ts— AI workflow templatetest-data.json— Test inputspackage.json— Dependencies
2. Explore Available Models
workway ai modelsOutput:
TEXT GENERATION
────────────────────────────────────────────────────────
Model Alias Cost/1M Context
────────────────────────────────────────────────────────
Llama 2 7B LLAMA_2_7B $0.005 4096
Llama 3 8B LLAMA_3_8B $0.010 8192
Mistral 7B MISTRAL_7B $0.020 81923. Estimate Costs
workway ai estimate --executions 1000 --tokens 5004. Test Your Workflow
workway workflow test --mock5. Publish
workway workflow publishCost Comparison
| Provider | Model | Cost/1M tokens | |----------|-------|----------------| | Workers AI | Llama 3 8B | $0.01 | | OpenAI | GPT-4o-mini | $0.15-0.60 | | Anthropic | Claude Haiku | $0.25-1.25 |
Workers AI runs on Cloudflare edge. No API keys. Zero egress.
Configuration
Global Config
Stored in ~/.workway/config.json:
{
"apiUrl": "https://workway-api.half-dozen.workers.dev",
"credentials": {
"token": "...",
"userId": "...",
"email": "..."
}
}Project Config
Stored in workway.config.json:
{
"dev": {
"port": 3000,
"hotReload": true,
"mockMode": true
},
"test": {
"testDataFile": "./test-data.json",
"timeout": 30000
},
"build": {
"outDir": "./dist",
"minify": false
}
}Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Test
npm test
# Link locally for testing
npm linkDocumentation
License
Apache-2.0 © WORKWAY
