The global a command provides quick access to AEA protocol from any directory, making it easy to check for messages, install AEA, and manage agent communication across multiple repositories.
# From the AEA repository
bash aea.sh setup-global
# Or with auto mode (no prompts)
bash aea.sh setup-global --autoThis will:
- Detect available shells (bash, zsh, fish)
- Add the
acommand to your shell configuration - Support multiple shells simultaneously
# For bash
source ~/.bashrc
# For zsh
source ~/.zshrc
# For fish
# Already active, just restart your terminal# Show AEA status in current directory
a
a status
# Install AEA in current directory
a install
# Check for messages (if AEA installed)
a check
# Process messages interactively
a process
# Control background monitor
a monitor start
a monitor stop
a monitor status
# Run tests
a test
# Show AEA version
a version
# Update AEA from source
a update
# Show help
a helpcd ~/my-project
# Check if AEA is installed
a status
# Output: ⚠ AEA not installed in this directory
# Install AEA
a install
# Prompts: Continue? (y/n): y
# Creates .aea/ directory structure
# Check for messages
a check
# Output: ✅ No new AEA messages# In repository A
cd ~/project-a
a check
# Found 2 unprocessed messages
a process
# Process messages interactively
# Move to repository B
cd ~/project-b
a check
# No messages
# Create handoff message for repository A
# (after doing work in repo B)cd ~/my-repo
a monitor start
# Output: ✓ Monitor started (PID: 12345)
# Work continues...
# Monitor checks every 5 minutes automatically
a monitor status
# Output: ✓ Monitor running (PID: 12345)
# When done
a monitor stop
# Output: ✓ Monitor stoppedConfiguration file: ~/.bashrc
# Setup adds shell function to ~/.bashrc
bash aea.sh setup-global
source ~/.bashrcConfiguration file: ~/.zshrc
# Setup adds shell function to ~/.zshrc
bash aea.sh setup-global
source ~/.zshrcConfiguration file: ~/.config/fish/functions/a.fish
# Setup creates dedicated function file
bash aea.sh setup-global
# Reload fish configuration or restart terminalThe a command automatically detects whether AEA is installed in the current directory:
- AEA installed: Delegates to local
.aea/aea.sh - AEA not installed: Offers to install or shows status
a version- Show AEA protocol versiona update- Update AEA from source repositorya help- Show comprehensive help
a check- Check for messagesa process- Process messagesa monitor- Control monitora test- Run tests
The AEA repository path is stored in your shell configuration:
# Bash/Zsh
local AEA_REPO="/home/user/path/to/aea"
# Fish
set -l AEA_REPO "/home/user/path/to/aea"To change the path, edit your shell configuration file or re-run setup.
# Re-run setup
bash /path/to/aea/aea.sh setup-global
# Reload shell configuration
source ~/.bashrc # or ~/.zshrc# Edit your shell config file
nano ~/.bashrc # or ~/.zshrc
# Find and update the AEA_REPO path
local AEA_REPO="/correct/path/to/aea"
# Reload
source ~/.bashrc# Re-run setup and choose "Configure all shells"
bash aea.sh setup-global
# When prompted: "Configure all shells? (y/n): y"If you prefer a different command name, you can modify the shell function:
# In ~/.bashrc or ~/.zshrc
# Change function name from 'a' to 'aea'
aea() {
# ... rest of function
}Add to your shell config to automatically check for AEA messages when entering a directory:
cd() {
builtin cd "$@" && [ -f ".aea/aea.sh" ] && a check || true
}chpwd() {
[ -f ".aea/aea.sh" ] && a check || true
}function cd --description 'Change directory and check for AEA'
builtin cd $argv
and test -f ".aea/aea.sh"
and a check
endThe global a command:
- Only reads/writes files in the current directory's
.aea/folder - Requires explicit confirmation before installing AEA
- Never modifies files outside
.aea/without user approval - Respects all AEA safety policies from
agent-config.yaml
| Feature | Global (a) |
Local (bash .aea/aea.sh) |
|---|---|---|
| Ease of use | Quick, from any dir | Requires full path |
| Setup | One-time shell integration | No setup needed |
| Cross-repo | Seamless | Need to track paths |
| Auto-install | Offers to install | Manual installation |
| Update from source | a update |
Manual git pull |
To remove the global a command:
# Edit your shell config
nano ~/.bashrc # or ~/.zshrc
# Delete the section starting with:
# # AEA Global Command - Quick access to AEA protocol from any directory
# ... (delete entire function)
# Reload
source ~/.bashrc# Remove the function file
rm ~/.config/fish/functions/a.fish
# Restart fish# Morning: Check all projects
cd ~/project-1 && a check
cd ~/project-2 && a check
cd ~/project-3 && a check
# Work on project-1
cd ~/project-1
a process # Process incoming messages
# Create integration work for project-2
# ... do work ...
# Send handoff message to project-2
# (message file created manually or via script)
cd ~/project-2
a check # Verify message received# Agent A (in repo-a)
cd ~/repo-a
a install
a monitor start
# Agent B (in repo-b)
cd ~/repo-b
a install
a check
# Found question from Agent A
a process
# Answer sent back to repo-a
# Agent A receives response
cd ~/repo-a
a check
# Response receivedThe a command is designed for Claude Code agents to:
- Check on every interaction:
a checkin CLAUDE.md workflows - Process autonomously:
a processbased on response policies - Monitor continuously:
a monitor startfor background checking - Quick installation:
a installwhen working in new repos
Add to your CLAUDE.md:
## Daily Workflow
1. Check for AEA messages: `a check`
2. If messages found: `a process`
3. Continue with user's requestVersion: 0.1.0 Last Updated: 2025-10-16 Status: Production-Ready