magebox

March 29, 2026 · View on GitHub

Oh-My-Zsh plugin for magebox — a modern development environment for Magento 2 and MageOS.

Provides aliases, a cache-flush helper, prompt status indicator, and cached tab completion for the magebox CLI.

Installation

Oh-My-Zsh

  1. Clone into your custom plugins directory:

    git clone https://github.com/jcombee/ohmyzsh-magebox.git \
      ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/magebox
    
  2. Add magebox to your plugin list in ~/.zshrc:

    plugins=(... magebox)
    
  3. Restart your shell or run source ~/.zshrc.

Note: magebox must be installed for the plugin to activate.

Aliases

Core

AliasCommand
mbmagebox
mbsmagebox start
mbstmagebox stop
mbrsmagebox restart
mbssmagebox status
mbshmagebox shell
mbomagebox open
mblmagebox list
mbckmagebox check
mbnmagebox new
mbsumagebox self-update

Database

AliasCommand
mbdmagebox db
mbdimagebox db import
mbdemagebox db export
mbdsmagebox db shell
mbdrmagebox db reset
mbdsnmagebox db snapshot
mbdtmagebox db top

Logs

AliasCommand
mblogmagebox logs
mblogfmagebox logs -f
mblogpmagebox logs php
mblognmagebox logs nginx
mblogmmagebox logs mysql

Testing

AliasCommand
mbtmagebox test
mbtumagebox test unit
mbtimagebox test integration
mbtcsmagebox test phpcs
mbtstmagebox test phpstan
mbtamagebox test all

PHP

AliasCommand
mbphpmagebox php
mbeimagebox ext install
mbelmagebox ext list

Xdebug

AliasCommand
mbxonmagebox xdebug on
mbxoffmagebox xdebug off
mbxsmagebox xdebug status

Varnish

AliasCommand
mbvmagebox varnish
mbvemagebox varnish enable
mbvdmagebox varnish disable
mbvfmagebox varnish flush
mbvsmagebox varnish status

Redis

AliasCommand
mbrfmagebox redis flush
mbrimagebox redis info
mbrshmagebox redis shell

SSL / Domain

AliasCommand
mbsslmagebox ssl generate
mbdamagebox domain add
mbdlmagebox domain list

Config

AliasCommand
mbcfmagebox config show
mbcfsmagebox config set

Sync

AliasCommand
mbsyncmagebox sync
mbfetchmagebox fetch

Functions

FunctionDescription
mbflushFlush all caches — Redis, Varnish (if enabled), and Magento cache:flush
magebox_prompt_infoPrompt segment showing running/stopped status

Prompt Status

The plugin exposes a magebox_prompt_info function that shows the current magebox project status in your prompt. When you cd into a magebox project (or any subdirectory up to 5 levels deep), it displays:

  • Greenmb:(▶)
  • Redmb:(■)
  • Hidden — not inside a magebox project

Setup

Add $(magebox_prompt_info) to your PROMPT or RPROMPT. For example, with the default robbyrussell theme, add to your ~/.zshrc after oh-my-zsh is sourced:

PROMPT+=' $(magebox_prompt_info)'

Or use it in RPROMPT to keep it on the right side:

RPROMPT='$(magebox_prompt_info)'

The detection is file-based (checks for .magebox.yaml and PHP-FPM sockets) so it adds no noticeable latency to your prompt.

Tab Completion

The plugin automatically caches the output of magebox completion zsh and refreshes it in the background on each shell startup. No manual setup needed.

Requirements

License

MIT