---
title: "macOS Terminal Aliases: A Complete Guide"
description: "Learn how to set up and use aliases on macOS to simplify your command-line workflow with Claude CLI, Homebrew, and Zsh."
canonical: https://bahrul.me/blog/unlock-your-terminal-superpowers-with-macos-aliases
last-updated: 2026-06-13
---

# macOS Terminal Aliases: A Complete Guide

> Learn how to set up and use aliases on macOS to simplify your command-line workflow with Claude CLI, Homebrew, and Zsh.

**Canonical URL:** https://bahrul.me/blog/unlock-your-terminal-superpowers-with-macos-aliases
**Section:** Writing
**Last modified:** 2026-06-13

Unlock Your Terminal Superpowers with macOS AliasesImagine typing a single word and having your terminal run a whole symphony of commands — that’s the magic of aliases. On macOS, aliases let you turn long, repetitive commands into lightning-fast shortcuts. Whether you’re a developer juggling multiple AI backends or just someone who hates typing --dangerously-skip-permissions over and over, this guide will turn you into a terminal wizard. Let’s dive in and supercharge your workflow.What You’ll Need Before You StartThink of these as your toolbelt. Grab them now, and you’ll be set for life.Homebrew – The missing package manager for macOS. Install it from brew.sh.Zsh – Already your default shell if you’re on macOS Catalina or later (you’re golden).Claude CLI – Anthropic’s command-line powerhouse. Install it with a single curl command.Installing Homebrew and Claude CLIFire up your terminal and paste these commands. It’s like unlocking a treasure chest.# Install Homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install Claude CLI (native – recommended) curl -fsSL https://claude.ai/install.sh | bash # Alternative install methods brew install --cask claude-code bun add -g @anthropic-ai/claude-code Understanding Shell Configuration FilesOn macOS with Zsh, aliases live in two special places:~/.zshrc – Your main Zsh config file. This is where the magic happens.~/.zsh_aliases – A dedicated file for aliases (optional, but keeps things tidy).Pro tip: Always backup before editing. One command, zero regrets.cp ~/.zshrc ~/.zshrc.backupSetting Up Your Aliases – Step by StepOpen Your Zsh ConfigurationUse your favorite editor: nano ~/.zshrc, code ~/.zshrc, or zed ~/.zshrc.Drop in Your AliasesPaste the block below at the end of the file. Replace YOUR_API_KEY with your actual key from Z.AI or MiniMax (and never, ever commit it to Git).Apply the ChangesSave the file, then run source ~/.zshrc or open a fresh terminal window.Verify Your WorkType alias to see all your shortcuts, or which claude-skip to check one.Here’s the alias block that will turn your terminal into a multitool:# Claude CLI Aliases # ------------------ alias zai='ANTHROPIC_API_KEY="YOUR_API_KEY" \ ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic" \ API_TIMEOUT_MS="" \ ANTHROPIC_MODEL="glm-4.7" \ ANTHROPIC_SMALL_FAST_MODEL="glm-" \ ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-4.6" \ ANTHROPIC_DEFAULT_SONNET_MODEL="glm-4.7" \ ANTHROPIC_DEFAULT_OPUS_MODEL="glm-" \ claude --dangerously-skip-permissions' alias minimax='ANTHROPIC_API_KEY="YOUR_API_KEY" \ ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic" \ API_TIMEOUT_MS="" \ ANTHROPIC_MODEL="MiniMax-M" \ ANTHROPIC_SMALL_FAST_MODEL="MiniMax-M2.1" \ ANTHROPIC_DEFAULT_OPUS_MODEL="MiniMax-M2.1" \ ANTHROPIC_DEFAULT_SONNET_MODEL="MiniMax-M" \ ANTHROPIC_DEFAULT_HAIKU_MODEL="MiniMax-M2.1" \ claude --dangerously-skip-permissions' alias claude-skip='claude --dangerously-skip-permissions' # Editor Shortcuts # ---------------- alias edit-alias='zed ~/.zshrc' alias edit-claude='zed ~/.claude.json' alias edit-claude-skills='zed ~/.claude/skills/' alias edit-claude-agents='zed ~/.claude/agents/' alias edit-claude-commands='zed ~/.claude/commands/' alias edit-claude-plugins='zed ~/.claude/plugins' alias edit-sh='zed ~/.zsh_functions/' Your terminal, now a powerhouse of shortcuts.Putting Your Aliases to WorkHere are a few ways you’ll love using them:Claude Skip: Run claude-skip to skip permission prompts and get straight to work.Z.AI Backend: Type zai to use the Z.AI API – instant AI superpowers.MiniMax Backend: Type minimax to switch to MiniMax’s models.Editor Aliases Quick ReferenceAlias – What it opensAliasOpensedit-alias~/.zshrcedit-claude~/.claude.jsonedit-claude-skills~/.claude/skills/edit-claude-agents~/.claude/agents/edit-claude-commands~/.claude/commands/edit-claude-plugins~/.claude/pluginsedit-sh~/.zsh_functions/Troubleshooting – When Aliases Go RogueAlias not found after adding?You probably need to reload your shell. Run source ~/.zshrc or just open a new terminal window – that’s the “did you turn it off and on again?” of the Unix world.“command not found: claude”Make sure Claude CLI is installed globally. Run bun add -g @anthropic-ai/claude-code and verify with which claude.API authentication errors?Double-check your API key: is it correct, active, and properly quoted? No extra spaces around the = signs. And please, never paste a real key into a public file – use environment variables for production.The Big Picture – How It All Fits Togetherflowchart TD A[Start] --&gt; B[Install Homebrew &amp; Claude CLI] B --&gt; C[Configure ~/.zshrc] C --&gt; D[Add alias definitions] D --&gt; E[source ~/.zshrc] E --&gt; F{Verify?} F --&gt;|Yes| G[Use aliases like a boss] F --&gt;|No| H[Check errors or re-source] H --&gt; C That’s it. You’ve just turbocharged your Mac. Every time you type a short alias instead of a monstrosity of environment variables and flags, you’ll feel a little spark of joy. Now go forth and alias everything.

