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. Core Built-in commands - Core Miso functionality
  2. Scripts folder - Custom scripts in your configured scripts directory
  3. Package Management Commands - Commands to manage dependencies
  4. Package.json scripts - Scripts defined in package.json
  5. Passthrough - Forwarded to the package manager

Let’s examine each step in detail.

1. Core Built-In Commands

Miso starts by checking it’s core commands. These are the only commands that cannot be overwritten by the Script folder having a matched named action:

  • init - Initialize a new project
  • version - Display Miso version
  • upgrade - Upgrade installed miso version
  • env - Validate environment variables from .env files
  • skills - add miso skills if flag is present

2. Scripts Folder

After it passes it’s core commands, miso The searches it’s configured scripts folder recursively, and the first matching script is executed.

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

3. Package Management Commands

If no script is found, miso then checks for it’s built in commands:

  • install or i - Install dependencies
  • add - Add new dependencies
  • remove - Remove dependencies
  • scripts - List all available scripts and actions

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: npm run dev (or bun dev, pnpm dev, etc)

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