Bunosh Logo
Powered by Bun

Transform JavaScript Functions into CLI Commands

Write once, run anywhere. Bunosh is the modern CLI task runner that transforms your JavaScript functions into executable commands with zero configuration.

Quick Start

Linux

For Ubuntu, Debian, CentOS, and other Linux distributions

curl -fsSL https://buno.sh/for_linux | tar -xz
sudo mv bunosh-linux-x64 /usr/local/bin/bunosh

Write JS Code

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!');
}

See it Running

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!

Why Choose Bunosh?

Built for modern developers who value simplicity, speed, and developer experience.

No Bashit

You don't want to write bash. Conditionals, loops, parallel tasks, is not what it does the best.

Zero Configuration

No YAMLs, no JSONs. Only functions from Bunoshfile.js.

JavaScript Native

Write your tasks in familiar JavaScript or TypeScript. No new syntax to learn.

Easy to Start

Install once as a single executable or globally via bun. Run from any folder.

Auto CLI

Automatically generates CLI interface from your function parameters and JSDoc.

AI Built-In

Apply agentic approach. Ask LLMs to analyze results or suggest next commands.

Power in Simplicity

See how Bunosh transforms simple JavaScript functions into powerful CLI tools

JS is now in CLI

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}!`);
}

Interactive I/O

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!')

Minimal Set of Tasks

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' }),
});

AI Interactions

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',
  });

Scripting in GitHub Actions

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

Get Deeper

Bunosh is fully opensource. Visit GitHub repository for release, issues, documentation, examples, and source code. Start building your awesome CLI tools today!

View on GitHub

Don't forget to ⭐ star the repo!

Used By

Using Bunosh in your company? Let us know!