Configuration
Setting Up GitHub Credentials
Bimagic requires your GitHub username and a personal access token. Add these to your shell configuration file:
- Open your shell configuration file:
# For bash users
nano ~/.bashrc
# For zsh users
nano ~/.zshrc
- Add these lines at the end of the file:
# GitHub credentials for bimagic
export GITHUB_USER="your_github_username"
export GITHUB_TOKEN="your_github_personal_access_token"
- Reload your shell configuration:
source ~/.bashrc # or source ~/.zshrc
Creating a GitHub Personal Access Token
- Go to GitHub → Settings → Developer settings → Personal access tokens.
- Click Generate new token.
- Give your token a descriptive name (e.g., "bimagic-cli").
- Select the repo scope (this provides full control of private repositories).
- Click Generate token.
- Copy the token immediately (you won't be able to see it again!).
Treat your Personal Access Token like a password. Never commit it to a public repository or share it with anyone. The .bashrc and .zshrc files where it is stored are typically private, but ensure they remain that way.
Hardware Security Keys & Passkeys (FIDO2 / U2F / Touch ID) 🔐
Bimagic v2.1.1+ features first-class interactive support for modern authentication hardware and passkeys:
- Interactive Terminal Pass-Through: All Git operations (
push,pull,fetch,clone,commit,rebase,tag) execute through real-time interactive terminal sessions (GIT_TERMINAL_PROMPT=1). - Supported Key Types: Fully compatible with
ed25519-skandecdsa-skSSH keys, YubiKeys, Apple Touch ID via Secure Enclave, and 1Password / Bitwarden SSH agents. - Presence & PIN Prompts: Prompts such as
Confirm user presence for key...andEnter PIN for authenticator:stream directly to your terminal without blocking or hanging. - Cryptographic Commit Signing: Seamlessly works with GPG (
commit.gpgsign=true) or SSH-based commit signing across all commit, rebase, and squash spells.
Theme Customization 🎨
Bimagic allows you to fully customize the UI colors through a theme file.
- Location: The theme file is located at
~/.config/bimagic/theme.wz. - Formats: You can use ANSI color numbers (0-255) or Hex codes (#RRGGBB).
- TrueColor Support: Hex codes will automatically enable TrueColor mode in supported terminals.
Example theme.wz:
# Bimagic Theme - Arctic Neon
# Copy this to ~/.config/bimagic/theme.wz
# Primary color - Neon Cyan
BIMAGIC_PRIMARY="#00FFFF"
# Secondary color - Deep Sky Blue
BIMAGIC_SECONDARY="#00AFFF"
# Success color - Spring Green
BIMAGIC_SUCCESS="#00FF87"
# Error color - Hot Pink
BIMAGIC_ERROR="#FF005F"
# Warning color - Amber
BIMAGIC_WARNING="#FFD700"
# Info color - Seafoam
BIMAGIC_INFO="#00FFAF"
# Muted color - Steel Grey
BIMAGIC_MUTED="243"
# Banner Gradients (Deep Blue to Cyan)
BANNER_COLOR_1="21"
BANNER_COLOR_2="27"
BANNER_COLOR_3="33"
BANNER_COLOR_4="39"
BANNER_COLOR_5="45"
Matugen Integration
Step 1: Create the Matugen Template for Bimagic
Create a new file at ~/.config/matugen/templates/bimagic-theme.wz:
# Bimagic Theme - Generated by Matugen
# Do not edit manually!
BIMAGIC_PRIMARY="{{colors.primary.default.hex}}"
BIMAGIC_SECONDARY="{{colors.secondary.default.hex}}"
# Material You doesn't have strict 'success/warning', so we map them to complementary accent colors
BIMAGIC_SUCCESS="{{colors.tertiary.default.hex}}"
BIMAGIC_ERROR="{{colors.error.default.hex}}"
BIMAGIC_WARNING="{{colors.tertiary_container.default.hex}}"
BIMAGIC_INFO="{{colors.primary_container.default.hex}}"
# Muted colors for hints
BIMAGIC_MUTED="{{colors.outline.default.hex}}"
# Banner Gradients (Creating a smooth transition using Material shades)
BANNER_COLOR_1="{{colors.primary.default.hex}}"
BANNER_COLOR_2="{{colors.primary_fixed.default.hex}}"
BANNER_COLOR_3="{{colors.secondary.default.hex}}"
BANNER_COLOR_4="{{colors.secondary_fixed.default.hex}}"
BANNER_COLOR_5="{{colors.tertiary.default.hex}}"
Step 2: Update your Matugen Config
Open your Matugen config (usually ~/.config/matugen/config.toml) and add this block to the bottom:
[templates.bimagic]
input_path = "~/.config/matugen/templates/bimagic-theme.wz"
output_path = "~/.config/bimagic/theme.wz"
Step 3: Test the Magic
Run your usual matugen command to generate colors from your current wallpaper. For example:
matugen image /path/to/your/wallpaper.jpg