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:
- Built-in commands - Core Miso functionality
- Scripts folder - Custom scripts in your configured scripts directory
- Package.json scripts - Scripts defined in package.json
- 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 projectversion- Display Miso versiondev- Start development serverinstall- Install dependenciesupdate- Update Miso itselfadd- Add new dependenciesremove- Remove dependenciesscripts- List all available scriptsenv- 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/stagingThe 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 outdatedThis allows you to use Miso as a unified interface for all package manager commands without needing to remember which package manager you’re using.