Interactive CLI for launching frontend dev environments.
Dev Runway is for projects that need a small layer above shell commands:
start or build flow across multiple environmentsIt is designed for simple and moderately complex setups. It is not a workflow engine.
pnpm add -D dev-runway
npx dev-runway init
npx dev-runway start
Create runway.config.ts:
import type { Config } from 'dev-runway'
export default {
defaultCommands: {
start: {
cmd: 'pnpm',
args: ['run', 'dev', '--mode', '{{environment.value}}'],
},
build: {
cmd: 'pnpm',
args: ['run', 'build'],
},
},
environments: [
{ name: 'development', value: 'development', description: 'Development' },
{ name: 'staging', value: 'staging', description: 'Staging' },
{ name: 'production', value: 'production', description: 'Production' },
],
} satisfies Partial<Config>
Dev Runway supports:
globalSelectorlocalSelector per environmentExample:
import type { Config } from 'dev-runway'
export default {
globalSelector: {
name: 'platform',
type: 'selector',
description: 'Select target platform',
options: [
{ label: 'Web', value: 'web' },
{ label: 'Desktop', value: 'desktop' },
],
},
environments: [
{
name: 'development',
value: 'development',
description: 'Development',
localSelector: {
name: 'target',
type: 'selector',
description: 'Select build target',
options: [
{ label: 'ES2019', value: 'es2019' },
{ label: 'ES2022', value: 'es2022' },
],
},
commands: {
start: {
cmd: 'pnpm',
args: ['run', 'dev', '--platform', '{{selectors.platform}}', '--target', '{{target}}'],
},
},
},
],
} satisfies Partial<Config>
CLI usage:
dev-runway start --platform=web --target es2022
Both --selector=value and --selector value are supported.
Hooks can run before or after the main command:
globalPreHooks: [
{ type: 'command', cmd: 'pnpm', args: ['install'] },
],
globalPostHooks: [
{
type: 'function',
fn: async (environment) => {
console.log(`${environment.name} is ready`)
},
},
]
Available placeholders:
{{environment.value}}{{environment.name}}{{environment.description}}{{selectors.foo}}{{foo}} as shorthand for selector valuesdev-runway build --env production --platform web
Or through environment variables:
export RUNWAY_ENV_VALUE=production
export RUNWAY_SELECTOR_PLATFORM=web
dev-runway build
Priority:
When user config is loaded:
environments always replaces the default environmentsThis keeps defaults useful while preserving explicit user intent.
dev-runway startdev-runway builddev-runway initdev-runway listdev-runway <custom-command>