Skip to Content
ScriptingScript Resolution

Script Resolution

Understanding how Miso resolves commands is important for organizing your scripts and avoiding conflicts. This page explains the resolution order and priority.

Resolution Order

When you run a command with Miso, it resolves the command in the following order:

  1. Built-in commands - Core Miso functionality
  2. Scripts folder - Custom scripts in your configured scripts directory
  3. Package.json scripts - Scripts defined in package.json
  4. Passthrough - Forwarded to the package manager

Let’s examine each step in detail.

1. Built-in Commands

Miso checks for built-in commands first. These include:

  • init - Initialize a new project
  • version - Display Miso version
  • dev - Start development server
  • install - Install dependencies
  • update - Update Miso itself
  • add - Add new dependencies
  • remove - Remove dependencies
  • scripts - List all available scripts
  • env - Validate environment variables from .env files

“Built-ins” are the only arguments that take priority over all others. These cannot be overridden with scripts, which is not the case for other package manager’s commands you may run with miso.

2. Scripts Folder

If no built-in command matches, Miso searches the configured scripts folder:

scripts/ build.sh → miso build test.py → miso test deploy/ staging.sh → miso deploy/staging

The scripts folder is searched recursively, and the first matching script is executed.

3. Package.json Scripts

If no script is found in the scripts folder, Miso looks for a matching entry in package.json:

{ "scripts": { "dev": "vite start", "build": "tsc && vite build", "lint": "eslint ." } }

If a match is found, it’s executed via your configured package manager:

miso dev # Executes: pnpm run dev (or npm run dev, yarn dev, bun dev)

4. Passthrough

If the command isn’t found in any of the previous steps, Miso forwards it to your package manager:

miso outdated # → forwarding "outdated" to pnpm # Executes: pnpm outdated

This allows you to use Miso as a unified interface for all package manager commands without needing to remember which package manager you’re using.

Last updated on