Write once, run anywhere. Bunosh is the modern CLI task runner that transforms your JavaScript functions into executable commands with zero configuration.
No need to choose over Bash or JS, use best of two!
// Bunoshfile.js
export async function helloWorld(name = 'person', opts = { cleanup: false }) {
say(`π Hello, ${name}!`);
const city = await ask('Which city do you live in?')
const result = await fetch(`https://wttr.in/${city}?format=3`)
say(`Weather in your city ${result.output}`)
if (!opts.cleanup) return;
await shell`rm -rf ${require('os').tmpdir()}/*`;
say('π§Ή Cleaned up! Have a great day!');
} Watch how Bunosh transforms your JavaScript function into an interactive CLI command
π Hello, Developer!? Which city do you live in? βΊ Weather in your city β
+18Β°Cπ§Ή Cleaned up! Have a great day!Built for modern developers who value simplicity, speed, and developer experience.
You don't want to write bash. Conditionals, loops, parallel tasks, is not what it does the best.
No YAMLs, no JSONs. Only functions from Bunoshfile.js.
Write your tasks in familiar JavaScript or TypeScript. No new syntax to learn.
Install once as a single executable or globally via bun. Run from any folder.
Automatically generates CLI interface from your function parameters and JSDoc.
Apply agentic approach. Ask LLMs to analyze results or suggest next commands.
See how Bunosh transforms simple JavaScript functions into powerful CLI tools
Transform any JavaScript function into a powerful CLI command. No configuration, no setup - just write the function and it's ready to use.
$ bunosh greet --name=Alice // hello.js
export function greet(opts = {name: 'World'}) {
console.log(`Hello, ${opts.name}!`);
} Create interactive CLI tools with simple async/await syntax. Ask questions, get input, and build complex workflows naturally.
ask say yell // print information
say('I need to ask you few questions!')
// ask for input in interactive mode
const name = await ask('Who are you?');
// provide options to select
const env = await ask('Environment?', ['staging', 'production']);
// ask for confirmation
const confirm = await ask(`Deploy to '${env}'?`, true);
yell('Thanks!') You don't need to remember complex API of tasks. We gave you few, while everything else can be done by NodeJS/Bun API.
exec shell fetch writeToFile await shell`
mkdir -p ${dest}/${backupName}
cp -r ${source}/* ${dest}/${backupName}
`;
await exec`npm run build`.cwd(`${dest}/${backupName}`);
await fetch('https://api.example.com/webhook', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ message: 'Backup created' }),
}); Connect your AI provider and call it as regular tasks. By default AI returns structured output which can be passed to other tasks. @ai-sdk is used under hood.
ai const releaseNotes = await ai(
`Generate notes changes:
Commits: ${gitLog}
Group changes logically and write user-friendly descriptions.`,
{
features: 'New features',
fixes: 'Bug fixes',
}); Have you thought of writing CI steps in JavaScript? Even you don't have Bunoshfile.js cooked, you can still run JS commands in pipelines.
steps:
- name: Deploy
run: |
bunosh -e << 'EOF'
say('π Starting deployment...')
if (!process.env.NODE_ENV === 'production') return;
await exec`npm run deploy`;
EOF Bunosh is fully opensource. Visit GitHub repository for release, issues, documentation, examples, and source code. Start building your awesome CLI tools today!
View on GitHubDon't forget to β star the repo!