Skip to main content
This guide walks you through creating a preset, registering it, and installing packages with PM-Auto.
1

Install PM-Auto

If you haven’t already, install PM-Auto globally:
npm install -g pm-auto
Verify the installation:
pm-auto -V
2

Create a config file

Create a config.json file in your preferred location (e.g., your home directory or a dotfiles repo):
config.json
{
  "vite-react": {
    "presetName": "vite-react",
    "description": "Vite + React + TypeScript setup",
    "packageManager": "npm",
    "packages": [
      {
        "command": "vite",
        "interactive": false,
        "dev": true
      },
      {
        "command": "@vitejs/plugin-react",
        "interactive": false,
        "dev": true
      },
      {
        "command": "react",
        "interactive": false,
        "dev": false
      },
      {
        "command": "react-dom",
        "interactive": false,
        "dev": false
      },
      {
        "command": "@types/react",
        "interactive": false,
        "dev": true
      },
      {
        "command": "@types/react-dom",
        "interactive": false,
        "dev": true
      }
    ]
  }
}
  • vite-react: Internal key (can be anything unique)
  • presetName: Name you’ll use in the CLI (pm-auto install vite-react)
  • description: Shows up when you run pm-auto list --desc
  • packageManager: Which package manager to use (npm, pnpm, yarn, or bun)
  • packages: Array of packages to install in order
    • command: Package name
    • interactive: Set to true for interactive installers (e.g., create-next-app)
    • dev: Set to true to install as a dev dependency
    • version (optional): Specify a version like "3.11.4" or "latest"
    • flags (optional): Additional CLI flags like ["--legacy-peer-deps"]
3

Register your config path

Tell PM-Auto where to find your config file:
pm-auto config ./config.json
You must register the config path before using PM-Auto. If you move your config file or edit its location, run this command again with the new path.
Verify the config path was saved:
pm-auto config-path
Output:
Config Path: /Users/yourname/config.json
4

Install your preset

Navigate to an empty project directory and install your preset:
mkdir my-vite-app
cd my-vite-app
pm-auto install vite-react
PM-Auto will execute each package installation in order:
  pm-auto

  Installing preset: vite-react

  Running: npm install vite --save-dev
  added 23 packages, and audited 24 packages in 3s

  Running: npm install @vitejs/plugin-react --save-dev
  added 8 packages, and audited 32 packages in 2s

  Running: npm install react
  added 3 packages, and audited 35 packages in 1s

  Running: npm install react-dom
  added 1 package, and audited 36 packages in 1s

  Running: npm install @types/react --save-dev
  added 1 package, and audited 37 packages in 1s

  Running: npm install @types/react-dom --save-dev
  added 1 package, and audited 38 packages in 1s

 All packages installed successfully
You can use the --dry-run flag to preview commands without executing them: pm-auto install vite-react --dry-run
5

Verify installation

Check that all packages were installed:
cat package.json
You should see all your dependencies listed:
package.json
{
  "dependencies": {
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  },
  "devDependencies": {
    "@types/react": "^18.3.12",
    "@types/react-dom": "^18.3.1",
    "@vitejs/plugin-react": "^4.3.4",
    "vite": "^6.0.5"
  }
}

What’s next?

Now that you’ve created your first preset, you can: Add more presets
Add additional presets to your config.json for different project types (Next.js, Express, Three.js, etc.).
Use advanced features
Explore version pinning, custom flags, and interactive commands to build more complex presets.
Share your config
Commit your config.json to a dotfiles repo or share it with your team for consistent setups.
List available presets
See all your configured presets:
pm-auto list
View preset details
Inspect a specific preset:
pm-auto describe vite-react

Common patterns

Here are some example presets you might want to create:
{
  "next-tailwind": {
    "presetName": "next-tailwind",
    "description": "Next.js with Tailwind CSS",
    "packageManager": "npm",
    "packages": [
      {
        "command": "create-next-app",
        "interactive": true,
        "dev": false,
        "flags": ["."]
      },
      {
        "command": "tailwindcss",
        "interactive": false,
        "dev": true
      },
      {
        "command": "postcss",
        "interactive": false,
        "dev": true
      },
      {
        "command": "autoprefixer",
        "interactive": false,
        "dev": true
      }
    ]
  }
}
{
  "threejs-react": {
    "presetName": "threejs-react",
    "description": "Three.js with React Three Fiber",
    "packageManager": "pnpm",
    "packages": [
      {
        "command": "three",
        "interactive": false,
        "dev": false
      },
      {
        "command": "@react-three/fiber",
        "interactive": false,
        "dev": false
      },
      {
        "command": "@react-three/drei",
        "interactive": false,
        "dev": false
      },
      {
        "command": "@types/three",
        "interactive": false,
        "dev": true
      },
      {
        "command": "gsap",
        "interactive": false,
        "dev": false,
        "version": "3.11.4"
      }
    ]
  }
}
{
  "express-api": {
    "presetName": "express-api",
    "description": "Express API with TypeScript",
    "packageManager": "npm",
    "packages": [
      {
        "command": "express",
        "interactive": false,
        "dev": false
      },
      {
        "command": "dotenv",
        "interactive": false,
        "dev": false
      },
      {
        "command": "cors",
        "interactive": false,
        "dev": false
      },
      {
        "command": "helmet",
        "interactive": false,
        "dev": false
      },
      {
        "command": "typescript",
        "interactive": false,
        "dev": true
      },
      {
        "command": "ts-node",
        "interactive": false,
        "dev": true
      },
      {
        "command": "@types/node",
        "interactive": false,
        "dev": true
      },
      {
        "command": "@types/express",
        "interactive": false,
        "dev": true
      },
      {
        "command": "@types/cors",
        "interactive": false,
        "dev": true
      }
    ]
  }
}

Tips

  • Keep preset names short and memorable (vite, next, api)
  • Group packages you always install together
  • Use the --dry-run flag to test presets before running them
  • Commit your config.json to version control for easy sharing

Build docs developers (and LLMs) love