Skip to content

Latest commit

 

History

History
320 lines (226 loc) · 6.35 KB

File metadata and controls

320 lines (226 loc) · 6.35 KB

Origin Workflow CLI

An intelligent, interactive command-line interface for the Origin Workflow system. Transform 15+ manual commands into a single, guided experience.

Features

  • Interactive Daily Planning - Automated health checks, queue normalization, and intelligent plan generation
  • Smart Content Capture - Unified interface for capturing URLs, notes, papers, and more
  • Visual Health Dashboard - Real-time system health monitoring with automatic fixes
  • Configuration Wizards - Interactive setup for schedules, priorities, and preferences
  • Batch Processing - Streamlined data normalization and issue generation

Installation

From Repository

cd cli
npm install
npm link

First Run

The CLI will guide you through initial setup:

origin-workflow

Commands

Daily Workflow

Run your complete daily workflow with health checks, normalization, and planning:

# Interactive mode
origin-workflow daily

# Skip specific steps
origin-workflow daily --skip-health
origin-workflow daily --skip-normalize

# Dry run (preview only)
origin-workflow daily --dry-run

Content Capture

Capture ideas, articles, and content quickly:

# Interactive mode
origin-workflow capture

# Direct capture
origin-workflow capture --title "Article title" --url "https://..." --tags "productivity,ai"

# With priority
origin-workflow capture --title "Important paper" --priority high

System Health

Monitor system health and fix issues:

# Show health dashboard
origin-workflow health

# Strict mode (warnings = failures)
origin-workflow health --strict

# Attempt automatic fixes
origin-workflow health --fix

# JSON output
origin-workflow health --json

Configuration

Manage your configuration interactively:

# Interactive configuration wizard
origin-workflow config

# Reset to defaults
origin-workflow config --reset

# Export configuration
origin-workflow config --export config-backup.json

Data Processing

Process and normalize your data:

# Interactive mode
origin-workflow process

# Specific operations
origin-workflow process --normalize
origin-workflow process --issues
origin-workflow process --llm

# Full pipeline
origin-workflow process --full

Global Options

All commands support these options:

  • --verbose, -v - Show detailed output
  • --quiet, -q - Suppress non-essential output
  • --yes, -y - Skip confirmations (for automation)
  • --help, -h - Show help

Examples

Morning Routine

# Run complete daily workflow
origin-workflow daily

# View and start working
origin-workflow daily
# Choose "View the plan" from menu

Quick Capture

# Capture an interesting article
origin-workflow capture \
  --title "The Future of AI Development" \
  --url "https://example.com/article" \
  --tags "ai,development,future" \
  --priority medium

System Maintenance

# Check system health
origin-workflow health

# Fix any issues
origin-workflow health --fix

# Process new data
origin-workflow process --full

Configuration Updates

# Update work schedule
origin-workflow config
# Select "Work schedule & energy blocks"
# Follow the prompts

Architecture

cli/
├── bin/
│   └── origin-workflow.js    # Main executable
├── src/
│   ├── commands/              # Command implementations
│   │   ├── daily.js          # Daily workflow
│   │   ├── capture.js        # Content capture
│   │   ├── health.js         # Health dashboard
│   │   ├── config.js         # Configuration
│   │   └── process.js        # Data processing
│   ├── ui/                    # UI components
│   │   ├── prompts.js        # Interactive prompts
│   │   ├── progress.js       # Progress indicators
│   │   └── tables.js         # Data tables
│   ├── utils/                 # Utilities
│   │   ├── logger.js         # Logging
│   │   ├── system.js         # State management
│   │   └── files.js          # File operations
│   └── index.js              # Main orchestrator
└── package.json

Integration with Origin Workflow

The CLI integrates seamlessly with existing Origin Workflow scripts:

  • Uses scripts/health_check.js for health monitoring
  • Uses scripts/capture.js for content capture
  • Uses automation/normalize.js for data processing
  • Uses agent/harness.js for plan generation

Development

Project Structure

The CLI is built with:

  • Node.js - Runtime
  • inquirer - Interactive prompts
  • chalk - Terminal colors
  • ora - Spinners and progress
  • cli-table3 - Data tables
  • commander - CLI framework

Adding New Commands

  1. Create command file in src/commands/
  2. Implement execute(options) method
  3. Add to src/commands/index.js
  4. Add to bin/origin-workflow.js

Testing

# Test specific command
node bin/origin-workflow.js daily --dry-run

# Test with verbose output
node bin/origin-workflow.js health --verbose

Troubleshooting

Command Not Found

If origin-workflow is not found after installation:

# Re-link the package
cd cli
npm link

# Or use directly
node bin/origin-workflow.js

Permission Denied

If you get permission errors:

# Make executable
chmod +x bin/origin-workflow.js

Missing Dependencies

If imports fail:

# Reinstall dependencies
cd cli
rm -rf node_modules
npm install

Comparison: Before vs After

Before (Manual Commands)

# Daily workflow
node scripts/health_check.js --verbose
node automation/normalize.js
node automation/issue_generator.js
node agent/harness.js --mode local
cat daily/daily.md

# Content capture
node scripts/capture.js --title "..." --url "..." --tags "..."

# Health check
node scripts/health_check.js

# Configuration
vim configs/schedule.yaml
vim configs/priorities.yaml

After (CLI)

# Daily workflow
origin-workflow daily

# Content capture
origin-workflow capture

# Health check
origin-workflow health

# Configuration
origin-workflow config

Performance

  • Startup time: < 500ms
  • Command execution: < 2s for common operations
  • Memory footprint: < 50MB typical

Contributing

This CLI is part of the Origin Workflow project. See the main README for contribution guidelines.

License

MIT