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:
- Core Built-in commands - Core Miso functionality
- Scripts folder - Custom scripts in your configured scripts directory
- Package Management Commands - Commands to manage dependencies
- Package.json scripts - Scripts defined in package.json
- 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 projectversion- Display Miso versionupgrade- Upgrade installed miso versionenv- Validate environment variables from .env filesskills- 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/staging3. Package Management Commands
If no script is found, miso then checks for it’s built in commands:
installori- Install dependenciesadd- Add new dependenciesremove- Remove dependenciesscripts- 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 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.