Documentation

Complete reference guide for all a12z commands and features

Installation

Homebrew (Recommended)

brew tap muhammadarslan/a12z
brew install a12z

After installation, verify it works by running:

a12z --help

Commands

a12z or a12z shell

Start the interactive shell. This is the default command if no arguments are provided.

$ a12z
Welcome to a12z! Type 'help' for available commands.
$ _

a12z run <command>

Execute a single command without entering the interactive shell.

$ a12z run 'ls -la'
$ a12z run 'git status'
$ a12z run 'echo $HOME'

a12z alias

Manage command aliases. Aliases are saved persistently and available in all shell sessions.

Add an alias

$ a12z alias add ll 'ls -l'
✓ Alias 'll' added.

Remove an alias

$ a12z alias remove ll
✓ Alias 'll' removed.

List all aliases

$ a12z alias list
Defined aliases:
ll => ls -l
gs => git status

a12z login

Authenticate with the a12z service to sync your settings across devices.

$ a12z login
Logged in successfully.

a12z register

Register a new a12z account.

$ a12z register

a12z help

Display help information and available commands.

Interactive Shell

The a12z interactive shell provides a rich command-line experience with enhanced features.

Enhanced Prompt

The prompt displays useful information including:

  • Current directory (with ~ for home directory)
  • Git branch and status (✓ for clean, ● for modified, ± for staged, + for untracked)
  • Kubernetes context (if kubectl is available)
  • Command execution time
  • Exit status indicator
~/projects/a12z main [0.023s]

The prompt shows: directory path, git branch and status, command timing (if > 1s), and the prompt symbol (❯).

Autocomplete

a12z provides intelligent autocomplete that learns from your command history. Press Tab to see suggestions.

Command History

Use and to navigate through your command history. History is persisted across sessions.

Command Chaining

Support for command chaining operators:

  • && - Run next command only if previous succeeds
  • || - Run next command only if previous fails
  • | - Pipe output to next command
$ git pull && npm install
$ test -f file.txt || echo "File not found"
$ ls -la | grep ".txt"

Background Jobs

Run commands in the background by appending &:

$ npm start &
[1] Running: npm start

Alias Management

Aliases allow you to create shortcuts for frequently used commands. They are saved in ~/.a12z/aliases.json and persist across sessions.

Built-in Aliases

a12z comes with several built-in aliases:

  • llls -l
  • lals -a
  • lls -CF
  • ..cd ..
  • ...cd ../..
  • ....cd ../../..

Creating Custom Aliases

Create aliases for complex commands or frequently used workflows:

$ a12z alias add gs 'git status'
$ a12z alias add gco 'git checkout'
$ a12z alias add dev 'cd ~/projects && npm run dev'

Authentication

Authenticate with a12z to sync your aliases, settings, and preferences across all your devices.

Registering

$ a12z register

Logging In

$ a12z login
Logged in successfully.

Features

Environment Variables

Full support for $VAR and${VAR} syntax.

Path Expansion

Automatic expansion of ~ to home directory.

Git Integration

Real-time git status and branch information in the prompt.

Kubernetes Support

Display current kubectl context in the prompt when available.

Command Timing

See how long each command takes to execute.

Syntax Highlighting

Color-coded command input for better readability.

Configuration

a12z stores its configuration and data in ~/.a12z/:

  • aliases.json - Your custom aliases
  • config.json - Application configuration
  • history.txt - Command history