Skip to content

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]

CommandAliasDescription
doctorCheck if Bunmagic is set up correctly
helpDisplay the full list of available commands
installInstall Bunmagic and set up your environment
unlinkRemove a directory from the script source list
editEdit scripts
removermRemove and unlink a script
reloadReload script files
symlinkCreate symlinks to Bunmagic root
createnewCreate a new script
version-vDisplay version information
cleanRemove orphaned bin files
listlsList all scripts
updateUpdate Bunmagic
linkAdd script source directory

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:

Terminal window
# Edit a specific script
bunmagic edit hello-world
# Open all scripts for editing
bunmagic edit

Usage: bunmagic remove <script-name> (alias: rm)

Remove a script and its corresponding symlink.

Examples:

Terminal window
# Remove a script
bunmagic remove hello-world
# Using the alias
bunmagic rm old-script

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:

Terminal window
# Reload all scripts
bunmagic reload
# Force recreation of all bin files
bunmagic reload --force

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:

Terminal window
# Create symlinks using default target
bunmagic symlink
# Create symlinks in a custom directory
bunmagic symlink --target ~/scripts
# Remove existing symlinks
bunmagic symlink --remove

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:

Terminal window
# Create a new script
bunmagic create project-setup
# Using the alias
bunmagic new git-cleanup

Usage: bunmagic version (alias: -v)

Display the current version of Bunmagic.

Examples:

Terminal window
# Check version
bunmagic version
# Using the alias
bunmagic -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:

Terminal window
# List all scripts
bunmagic list
# Filter scripts containing "git"
bunmagic list git
# Show detailed information
bunmagic list --info
# Using the alias with filter
bunmagic ls project