Skip to content

jnarowski/agentcmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

agentcmd

AI Code Workflow Orchestration Platform

Why agentcmd?

I was sick of babysitting my agents. Love Claude Code. Hate babysitting. Like a good AI Engineer I called /plan, then /implement, then /review again and again and again until my fingers partially eroded. Then I got to work on agentcmd. Vibe Engineering needed a platform.

agentcmd lets you:

  • Chain Slash Commands - Slash commands into recursive workflows that run until done
  • Define in Code - Bring your tools, process, and custom steps (security checks, code reviews, multi-agent review)
  • Multi-Agent - Leverage Claude Code, OpenAI Codex, and other AI agents
  • Fully Responsive - Code from anywhere (after you setup Tailscale)
  • Session Management - Save, resume, organize code sessions
  • Isolated Worktrees - Nothing conflicts across projects
  • Integrated Terminal - Full terminal with WebSocket streaming
  • Git Integration - Commit, branch, PR from interface

License: MIT TypeScript pnpm

Example Workflow

import { defineWorkflow } from "agentcmd-workflows";
import { buildSlashCommand } from ".agent/generated/slash-commands";

export default defineWorkflow(
  {
    id: "implement-review",
    name: "Implement & Review",
    description: "Implement a spec, review it, and create a PR",
    phases: [
      { id: "implement", label: "Implement" },
      { id: "review", label: "Review" },
      { id: "complete", label: "Complete" },
    ],
  },
  async ({ event, step }) => {
    const { specFile } = event.data;

    await step.phase("implement", async () => {
      await step.agent("implement-spec", {
        agent: "claude",
        prompt: buildSlashCommand("/cmd:implement-spec", {
          specIdOrNameOrPath: specFile,
        }),
      });

      await step.git("commit-implementation", {
        operation: "commit",
        message: `feat: implement ${event.data.name}`,
      });
    });

    await step.phase("review", async () => {
      const review = await step.agent("review-implementation", {
        agent: "claude",
        json: true,
        prompt: buildSlashCommand("/cmd:review-spec-implementation", {
          specIdOrNameOrPath: specFile,
          format: "json",
        }),
      });

      step.annotation("review-result", {
        message: `Review ${review.data.success ? "passed" : "needs fixes"}`,
      });
    });

    await step.phase("complete", async () => {
      await step.agent("create-pr", {
        agent: "claude",
        prompt: buildSlashCommand("/cmd:create-pr", {
          title: `feat: ${event.data.name}`,
        }),
      });
    });
  }
);

See the First Workflow Guide for a complete tutorial.

Getting Started

Install and run as standalone application:

# First-time setup (creates ~/.agentcmd/)
npx agentcmd install

# Start server - Access at http://localhost:4100
npx agentcmd start

# Customize ports
npx agentcmd start --port 8080 --inngest-port 9000

# Manage configuration
npx agentcmd config --show
npx agentcmd config --set port=7000

Development

Clone and run in development mode with hot reload:

# Clone and install
git clone https://github.com/jnarowski/agentcmd.git
cd agentcmd
pnpm install

# Setup database and environment
pnpm dev:setup

# Start Turborepo
pnpm dev

Access at:

For Production (pm2)

Run optimized builds locally with process management:

# Build and start
pnpm build
pm2 start ecosystem.config.js

Config stored in ~/.agentcmd/config.json with auto-generated JWT secret and database.

Configuration

Environment Variables

For development and production (pnpm/pm2):

Add your API key to apps/app/.env:

ANTHROPIC_API_KEY=your-api-key-here

All other variables are auto-generated by pnpm dev:setup. See apps/app/.env.example for full options.

For CLI tool (npx agentcmd):

npx agentcmd config --set anthropicApiKey=your-api-key-here

Or manually edit ~/.agentcmd/config.json.

Ports

Service Default Configure Via
Fastify Server 4100 PORT env var or --port flag
Vite Dev Server 4101 VITE_PORT env var (dev only)
Inngest Dev UI 8288 inngestPort in config.json, INNGEST_PORT env var, or --inngest-port flag

Priority: CLI flags > config.json > .env > defaults

Common Commands

# Development
pnpm dev              # Start dev server (from apps/app/)
pnpm build            # Build all packages (from root)
pnpm test             # Run tests
pnpm lint             # Lint code
pnpm check-types      # Type check

# Database
pnpm prisma:migrate   # Run migrations (from apps/app/)
pnpm prisma:studio    # Open database GUI

# Troubleshooting
pnpm dev:kill         # Kill dev processes (from apps/app/)

Project Structure

This is a Turborepo monorepo containing:

  • apps/app - Full-stack application (React + Fastify)

    • Domain-driven backend architecture
    • WebSocket support for real-time features
    • Inngest workflow engine integration
  • packages/agent-cli-sdk - SDK for AI CLI tools (Claude, Codex)

  • packages/agentcmd-workflows - Workflow orchestration library

Documentation

Full documentation available at agentcmd.dev/docs

Common Issues

Issue Solution
Module not found Run pnpm build from root
Database errors cd apps/app && pnpm prisma:generate && pnpm prisma:migrate
WebSocket issues Check logs: tail -f apps/app/logs/app.log
Port conflicts cd apps/app && pnpm dev:kill && pnpm dev
Build failures rm -rf packages/*/dist apps/*/dist && pnpm build

Tech Stack

Frontend: React 19, Vite, TanStack Query, Zustand, Tailwind v4, shadcn/ui, CodeMirror, xterm.js Backend: Fastify, Prisma (SQLite), JWT, WebSocket, node-pty, Inngest Build: Turborepo, pnpm, TypeScript (strict mode)

Contributing

  1. Fork and create a feature branch
  2. Make changes following code style (pnpm lint and pnpm check-types)
  3. Write tests for new features
  4. Submit a PR with clear description

See CLAUDE.md for detailed development guidelines.

License

MIT License - see LICENSE for details

About

✨ AI Code Workflow Orchestration Platform

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •