System Requirements
Before installing Bunli, ensure you have Bun installed on your system:Bunli requires Bun 1.0.0 or higher. The framework is specifically designed to leverage Bun’s unique features like the Bun Shell, fast startup times, and native TypeScript support.
Installing Bun
If you don’t have Bun installed yet:Installing Bunli CLI
There are two ways to install the Bunli CLI: globally or locally per project.Global Installation (Recommended)
Install Bunli globally to use it across all your projects:Local Installation
Install Bunli as a dev dependency in your project:Verifying Installation
Check that Bunli is installed correctly:Installing Core Framework
If you’re setting up a project manually (not usingcreate-bunli), you’ll need to install the core framework:
Troubleshooting
Command Not Found
If you get a “command not found” error after global installation:- Check your PATH: Make sure Bun’s global bin directory is in your PATH
- Restart your terminal: Close and reopen your terminal window
- Verify installation location:
Permission Errors
If you encounter permission errors during global installation: On macOS/Linux:Version Mismatch
If you experience issues with version compatibility:-
Update Bun:
-
Clear Bun cache:
-
Reinstall Bunli:
Module Resolution Issues
If you see module resolution errors:- Ensure you’re using ES modules: Add
"type": "module"to yourpackage.json - Use
.jsextensions: Import local files with.jsextensions, even in TypeScript files:
Installation Hangs or Fails
If installation hangs or fails:- Check internet connection: Ensure you have a stable connection
- Try with verbose logging:
- Check disk space: Ensure you have sufficient disk space
- Try alternative registry:
Next Steps
Now that you have Bunli installed, you’re ready to create your first CLI:Quick Start
Get up and running with create-bunli in under 2 minutes
Your First CLI
Build a complete CLI from scratch with step-by-step guidance