Skip to content

Getting Started

Get up and running with devmux in just a few minutes.

  • Node.js 18+
  • tmux installed on your system
Terminal window
brew install tmux
Terminal window
pnpm add -D @chriscode/devmux

Or run directly with npx:

Terminal window
npx @chriscode/devmux status
  1. Initialize configuration

    If you’re using Turborepo, devmux can auto-discover your services:

    Terminal window
    npx devmux discover turbo

    This creates a devmux.config.json based on your turbo.json tasks.

    Alternatively, create the config manually:

    Terminal window
    npx devmux init
  2. Configure your services

    Edit devmux.config.json in your project root:

    {
    "project": "myapp",
    "services": {
    "api": {
    "command": "pnpm dev",
    "cwd": "./api",
    "port": 8787
    },
    "web": {
    "command": "pnpm dev",
    "cwd": "./web",
    "port": 3000
    }
    }
    }
  3. Start a service

    Terminal window
    npx devmux ensure api

    This:

    • Creates a tmux session named omo-myapp-api
    • Runs pnpm dev in the ./api directory
    • Waits for port 8787 to be ready
  4. Check status

    Terminal window
    npx devmux status

    Output:

    Service Status Port Session
    api running 8787 omo-myapp-api
    web stopped 3000 -
  5. View logs

    Terminal window
    npx devmux attach api

    Press Ctrl+B then D to detach without stopping the service.

Add these to your package.json for convenience:

{
"scripts": {
"svc:status": "devmux status",
"svc:ensure": "devmux ensure",
"svc:stop": "devmux stop",
"svc:attach": "devmux attach"
}
}

Now you can run:

Terminal window
pnpm svc:ensure api
pnpm svc:status