Bunmagic Commands
Bunmagic is a script management tool that makes it easy to create, manage, and run Bun-based shell scripts. These commands help you manage your scripts - creating new ones, editing existing ones, and keeping everything organized.
Usage: bunmagic <command> [arguments]
Quick Reference
Section titled “Quick Reference”Command | Alias | Description |
---|---|---|
doctor | Check if Bunmagic is set up correctly | |
help | Display the full list of available commands | |
install | Install Bunmagic and set up your environment | |
unlink | Remove a directory from the script source list | |
edit | Edit scripts | |
remove | rm | Remove and unlink a script |
reload | Reload script files | |
symlink | Create symlinks to Bunmagic root | |
create | new | Create a new script |
version | -v | Display version information |
clean | Remove orphaned bin files | |
list | ls | List all scripts |
update | Update Bunmagic | |
link | Add script source directory |
Detailed Command Reference
Section titled “Detailed Command Reference”Usage: bunmagic edit [script-name]
Edit scripts in your default editor. If no script name is provided, opens all scripts and the ~/.bunmagic
directory.
Examples:
# Edit a specific scriptbunmagic edit hello-world
# Open all scripts for editingbunmagic edit
remove
Section titled “remove”Usage: bunmagic remove <script-name>
(alias: rm
)
Remove a script and its corresponding symlink.
Examples:
# Remove a scriptbunmagic remove hello-world
# Using the aliasbunmagic rm old-script
reload
Section titled “reload”Usage: bunmagic reload [--force]
Reload all script files and ensure they have executable bin files.
Parameters:
--force
- Force creation of bin files even if they already exist
Examples:
# Reload all scriptsbunmagic reload
# Force recreation of all bin filesbunmagic reload --force
symlink
Section titled “symlink”Usage: bunmagic symlink [options]
Create symlinks from your script sources to the Bunmagic root directory for easy access.
Parameters:
--target
- Specify the target directory (Default:~/.bunmagic
)--remove
- Remove existing symlinks
Examples:
# Create symlinks using default targetbunmagic symlink
# Create symlinks in a custom directorybunmagic symlink --target ~/scripts
# Remove existing symlinksbunmagic symlink --remove
create
Section titled “create”Usage: bunmagic create <script-name>
(alias: new
)
Create a new script with the specified name. Opens the script in your default editor after creation.
Examples:
# Create a new scriptbunmagic create project-setup
# Using the aliasbunmagic new git-cleanup
version
Section titled “version”Usage: bunmagic version
(alias: -v
)
Display the current version of Bunmagic.
Examples:
# Check versionbunmagic version
# Using the aliasbunmagic -v
Usage: bunmagic list [filter] [options]
(alias: ls
)
List all scripts with their status and description.
Parameters:
[filter]
- Optional fuzzy match filter for script paths--info
or-i
- Display more detailed information about each script
Examples:
# List all scriptsbunmagic list
# Filter scripts containing "git"bunmagic list git
# Show detailed informationbunmagic list --info
# Using the alias with filterbunmagic ls project