@71zone/rundev
v0.2.0
Published
Smart dev server launcher with environment switching
Maintainers
Readme
rundev
Smart dev server launcher with environment switching.
Features
- Environment Switching: Automatically copies environment files based on project patterns
- Script Discovery: Scans
package.jsonfordev*scripts and prompts for selection - Last Script Memory: Use
-lflag to re-run the last selected script - Auto-detection: Detects environment from
.envSTAGE=or$AWS_PROFILE
Installation
# Clone and build
git clone https://github.com/71zone/rundev.git
cd rundev
pnpm install
pnpm build
# Link globally
npm linkUsage
# Prompt for script selection with environment
rundev staging
# Use last selected script
rundev staging -l
# Auto-detect environment from .env or AWS_PROFILE
rundev
rundev -lConfiguration
Global Config: ~/.config/rundev/config.json
{
"envDir": "~/.config/env",
"globalEnvFile": "~/.config/env/global",
"mappings": [
{
"pattern": "*/admin/web",
"envPath": "admin/{env}"
},
{
"pattern": "*/web",
"envPath": "{env}"
}
]
}Local Config (per-project): .rundevrc.json
{
"envPath": "custom/{env}",
"scriptFilter": "dev*"
}Local config overrides global mappings for that project.
How It Works
- Loads config (global + local override)
- Detects or uses provided environment name
- Copies
{envDir}/{envPath}to.env, appending global env file if exists - Scans
package.jsonfor scripts matching filter (default:dev*) - Prompts for selection (or uses last with
-l) - Runs the selected script
License
MIT
