--- title: Get Started description: Start using Bunmagic quickly --- Bunmagic is a script management tool that makes it incredibly easy to create and run shell scripts using Bun's powerful runtime and APIs. ## 🌍 Everything is Global! **This is the key feature of Bunmagic:** All utilities are available as global variables in your scripts. No imports needed for `$`, `args`, `flags`, `cd`, `ack`, `select`, `glob`, and all other Bunmagic utilities. They're just there, ready to use! ## Quick Start 1. **Install Bun:** ```bash curl -fsSL https://bun.sh/install | bash ``` 2. **Install Bunmagic:** ```bash bunx bunmagic install ``` 3. **Create Your First Script:** ```bash bunmagic create hello-world ``` This will create a new script and open it in your editor. 4. **Write Your Script:** ```ts // No imports needed! All bunmagic utilities are global variables! console.log(ansis.green("Hello from bunmagic! 🪄")) // Run shell commands with $ (no import needed!) await $`echo "Running shell commands is easy!"` // Use args and flags directly (they're global!) if (args[0]) { console.log(`You passed: ${args[0]}`) } // File operations with global utilities if (await isDirectory("./src")) { const files = await glob("src/*.ts") console.log(`Found ${files.length} TypeScript files`) } // Interactive prompts - also global! const name = await ask("What's your name?") const confirmed = await ack(`Nice to meet you, ${name}! Continue?`, 'y') if (confirmed) { const choice = await select("Pick your favorite:", ["Bun", "Node", "Deno"]) console.log(`Great choice: ${choice}!`) } ``` 5. **Run Your Script:** ```bash hello-world ``` That's it! Your script is now available as a command in your terminal. ## What's Next? - **Explore [Bunmagic Commands](/reference/bunmagic-commands/)** to learn how to manage your scripts - **Check the [Script Basics](/reference/script-basics/)** to understand arguments, flags, and shell execution - **Browse the [Reference](/reference/)** for all available APIs and utilities