npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-task-orchestrator

v0.4.0

Published

TUI multi-project task orchestrator powered by Claude Agent SDK

Readme

Claude Orchestrator

Multi-project task orchestrator with TUI, powered by Claude Agent SDK.

License: MIT TypeScript Claude Ink


Overview

Claude Orchestrator runs multiple AI-powered tasks across different projects from a single terminal interface. Define tasks in YAML, let the DAG resolver handle dependencies, and watch Claude execute them in parallel.

Define. Review. Execute. Monitor.


Features

| Feature | Description | |---------|-------------| | YAML Task Batches | Define tasks with dependencies, budgets, and tool permissions | | DAG Resolution | Automatic dependency resolution with topological sorting | | Parallel Execution | Run multiple tasks concurrently (configurable limit) | | Plan Mode | AI pre-analysis before execution — review what each task will do | | TUI Dashboard | Real-time monitoring with keyboard navigation | | Escalation Flow | Agent asks for human input when uncertain | | Project Context | Auto-loads CLAUDE.md and project settings | | State Persistence | Resume interrupted batches from saved state | | Cost Analytics | Track spending per task and project |


TUI Preview

Claude Orchestrator Demo


How It Works

┌─────────────────────────────────────────────────────────────────┐
│                     Claude Orchestrator                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│   1. Load YAML task file                                        │
│              ↓                                                  │
│   2. Parse & validate (dependencies, budgets, tools)            │
│              ↓                                                  │
│   3. DAG analysis → execution levels                            │
│              ↓                                                  │
│   4. [Plan Mode] AI analyzes each task                          │
│              ↓                                                  │
│   5. User reviews & approves                                    │
│              ↓                                                  │
│   6. Queue manager executes (parallel where possible)           │
│              ↓                                                  │
│   7. Real-time TUI updates                                      │
│              ↓                                                  │
│   8. Results saved to state/logs                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Start

Prerequisites

Installation

# Clone
git clone https://github.com/mariomosca/claude-orchestrator.git
cd claude-orchestrator

# Install dependencies
npm install

# Build
npm run build

# Link globally (optional)
npm link

Create a Task File

# tasks/morning-sprint.yaml
name: "Morning Sprint"
maxConcurrent: 3
defaultBudget: 3.00
defaultTools: [Read, Edit, Glob, Grep]

tasks:
  - id: fix-auth-bug
    project: my-app
    cwd: ~/Projects/my-app
    prompt: |
      Fix the authentication timeout bug in /api/auth/refresh.
      The token refresh fails after 30 minutes.
    tools: [Read, Edit, Bash]
    budget: 3.00

  - id: update-error-ui
    project: my-app
    cwd: ~/Projects/my-app
    prompt: |
      Update the error UI to show a friendly message
      when refresh token expires.
    dependsOn: [fix-auth-bug]
    budget: 2.00

  - id: add-pdf-export
    project: other-app
    cwd: ~/Projects/other-app
    prompt: |
      Add PDF export feature using jsPDF library.
    tools: [Read, Edit, Write, Bash]
    budget: 5.00

Run

# Run with TUI (includes Plan Mode)
claude-orchestrator run tasks/morning-sprint.yaml --tui

# Skip Plan Mode, execute immediately
claude-orchestrator run tasks/morning-sprint.yaml --tui --skip-plan

# Validate without executing
claude-orchestrator validate tasks/morning-sprint.yaml

# Resume interrupted batch
claude-orchestrator resume state/2026-01-31-morning-sprint.state.json

CLI Commands

| Command | Description | |---------|-------------| | run <yaml> | Run a task batch | | resume <state> | Resume interrupted batch | | validate <yaml> | Validate YAML and show DAG | | status <state> | Show batch status | | results <state> | Show task results | | report <state> | Generate AI summary report |

Options

| Option | Description | |--------|-------------| | --tui | Use terminal UI with Plan Mode | | --skip-plan | Skip Plan Mode, execute immediately | | --max-concurrent <n> | Override max concurrent tasks | | --dry-run | Parse and validate only |


Keyboard Shortcuts

Plan Mode

| Key | Action | |-----|--------| | ↑/↓ | Navigate tasks | | Enter | Expand/collapse task details | | X / Space | Toggle task inclusion | | A | Approve and start execution | | Q | Cancel and exit |

Execution Mode

| Key | Action | |-----|--------| | Tab | Switch between panes | | Space | Pause/Resume execution | | Enter | Show task details | | L | Open full log viewer | | S | Show cost statistics | | R | Retry failed task | | C | Cancel running task | | Q | Quit |


YAML Schema

name: string              # Batch name
maxConcurrent: number     # Max parallel tasks (default: 3)
defaultBudget: number     # Default cost limit per task
defaultTools: string[]    # Default allowed tools
globalInstructions: |     # Instructions for all tasks
  Additional context...

tasks:
  - id: string            # Unique task ID
    project: string       # Project name (for grouping)
    cwd: string           # Working directory (~ expanded)
    prompt: string        # Task prompt for Claude
    model: string         # haiku | sonnet | opus (default: sonnet)
    tools: string[]       # Allowed tools (overrides default)
    budget: number        # Cost limit (overrides default)
    dependsOn: string[]   # Task IDs that must complete first
    instructions: string  # Task-specific instructions

Project Structure

claude-orchestrator/
├── src/
│   ├── cli.ts              # CLI entry point
│   ├── App.tsx             # TUI application
│   ├── components/         # Ink React components
│   │   ├── Dashboard.tsx   # Main execution view
│   │   ├── PlanningPane.tsx # Plan Mode view
│   │   ├── LogViewerPane.tsx # Full log viewer
│   │   ├── StatsPane.tsx   # Cost analytics
│   │   └── ...
│   ├── engine/             # Core logic
│   │   ├── parser.ts       # YAML parsing
│   │   ├── dag.ts          # Dependency resolution
│   │   ├── queue.ts        # Execution manager
│   │   ├── runner.ts       # Claude SDK wrapper
│   │   ├── state.ts        # Persistence
│   │   ├── context.ts      # Project context
│   │   └── analyzer.ts     # AI pre-analysis
│   └── types/              # TypeScript interfaces
├── tasks/                  # Task YAML files
├── state/                  # Saved batch states
├── logs/                   # Execution logs
└── docs/                   # Documentation

State & Logs

Batch execution is automatically saved:

state/
└── 2026-01-31-morning-sprint-a1b2.state.json

logs/
└── 2026-01-31-morning-sprint-a1b2/
    ├── fix-auth-bug.log
    ├── fix-auth-bug.result.json
    ├── update-error-ui.log
    └── ...

Resume any interrupted batch:

claude-orchestrator resume state/2026-01-31-morning-sprint-a1b2.state.json

Escalation Flow

When Claude is uncertain, it escalates to you:

┌─────────────────────────────────────────────────────────────────┐
│  ⚠️  ESCALATION from: fix-auth-bug                              │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  The existing auth logic uses both JWT and session cookies.     │
│  Which approach should I use for the fix?                       │
│                                                                 │
│  [1] JWT only (recommended)                                     │
│  [2] Session cookies only                                       │
│  [3] Keep hybrid approach                                       │
│                                                                 │
│  Press 1-3 to select, or T for custom text response             │
└─────────────────────────────────────────────────────────────────┘

Agent Guardrails

Every task includes built-in safety instructions:

  1. No Regressions — Run tests before and after changes
  2. Study First — Read files before modifying
  3. Ask if Uncertain — Escalate ambiguous prompts
  4. Minimal Scope — Only do what's requested
  5. Transparency — Explain actions before taking them

Cost Analytics

Press S to view detailed cost breakdown:

┌─────────────────────────────────────────────────────────────────┐
│  Cost Analytics: Morning Sprint                                 │
├─────────────────────────────────────────────────────────────────┤
│  Total Cost:      $2.45                                         │
│  Avg Cost/Task:   $0.35                                         │
│  Cost/Minute:     $0.12                                         │
│  Elapsed Time:    20m 15s                                       │
├─────────────────────────────────────────────────────────────────┤
│  Cost by Project                                                │
│  ─────────────────────────────────────────────────────          │
│  my-app           3/3      $1.80    $0.60/task                  │
│  other-app        1/1      $0.65    $0.65/task                  │
├─────────────────────────────────────────────────────────────────┤
│  Top 5 Most Expensive Tasks                                     │
│  ─────────────────────────────────────────────────────          │
│  add-pdf-export              $0.65                              │
│  fix-auth-bug                $0.58                              │
│  update-error-ui             $0.57                              │
└─────────────────────────────────────────────────────────────────┘

Dependencies

| Package | Purpose | |---------|---------| | @anthropic-ai/claude-agent-sdk | Claude Code integration | | ink | React-based terminal UI | | react | Component framework | | yaml | YAML parsing |


Roadmap

  • [x] v0.1 — MVP with TUI and basic execution
  • [x] v0.2 — Escalation flow and project context
  • [x] v0.3 — Plan Mode with AI pre-analysis
  • [x] v0.4 — Polish (log viewer, stats, error handling)
  • [ ] v1.0 — Production ready (tests, full docs)
  • [ ] v2.0 — Notifications, scheduling, cloud sync

Related Projects


License

MIT License — see LICENSE for details.


Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

AI Pair Programming