Contents (10)

Why moha?

moha is the niche pick when you specifically want a single-binary Claude client with no runtime dependency, or you need to run on an air-gapped host through an SSH tunnel.

If you want a multi-model agent across providers, aider is excellent. If you want Anthropic’s first-party experience with their support behind it, Claude Code is the answer.

What moha does differently

  1. One binary: ~9 MB statically linked binary. No Node.js, no Python, no package manager. Download, chmod +x, run.
  2. Sandbox by default: bash executes inside bwrap (Linux) / sandbox-exec (macOS). Even an approved bash call can’t exfiltrate your SSH keys.
  3. Air-gapped SSH: moha airgap user@host sets up SOCKS5 over SSH. TLS stays end-to-end with Anthropic.
  4. Input queuing: Type while Claude is streaming. Your message queues and sends when the stream finishes. No waiting, no interrupted thoughts.

Comparison

mohaClaude Codeaider
Language / runtimeC++26 — static binaryTypeScript / NodePython
Footprint~9 MBnpm + Node runtimepip + Python runtime
Air-gapped modeYes (SOCKS5 over SSH)NoNo
AuthOAuth + API keyOAuth + API keyper-provider env vars
ModelsClaude (Anthropic)Claude (Anthropic)many (OpenAI / Anthropic / local)
Sandboxbwrap / sandbox-execNoNo

General FAQ

Is moha open source?

Yes, MIT licensed. github.com/1ay1/moha

How much does it cost?

moha is free. You pay only for Claude API usage, or you can use your existing Claude Pro or Max subscription via OAuth.

Does moha work with local LLMs?

No. moha is a Claude-specific client.

Is my API key safe?

Yes. Stored locally with restricted permissions (0600). You can also use ANTHROPIC_API_KEY as an environment variable if you prefer not to store credentials on disk.

Can I branch conversations?

Yes. Use Ctrl+J to open the thread list. You can fork a conversation at any point to explore alternatives.


Troubleshooting

Connection & Auth Issues

“Invalid API key” error

Your API key is malformed or expired. Delete your credentials and re-authenticate:

rm ~/.config/moha/credentials.json
moha

SSH air-gapped mode connection timeout

If moha connects via SSH but API calls hang, the remote firewall might be blocking the tunnel (port 1080 on localhost).

sudo ufw allow from 127.0.0.1  # Allow localhost connections

If you’re behind a corporate proxy that terminates TLS, cert verification will fail. You must install the proxy’s CA into the remote system’s trust store. See Air-Gapped Mode.

Performance

Claude is responding slowly

  1. Anthropic’s API is overloaded — check status.anthropic.com.
  2. You’re using a slower model — switch to claude-haiku-4-5 with Ctrl+/.
  3. Your conversation context is large — check the Context Gauge in the bottom right corner (e.g., CTX 185k/200k). When it gets high, press Ctrl+N to start a new thread.

File Operations

“Permission denied” when reading a file

moha sandboxes Claude to the directory where you launched it. It refuses to read or write paths that resolve outside that workspace (e.g., ../, /etc/, ~/.ssh/). Change your working directory before launching moha.

“Operation not allowed” on write

Even approved bash commands execute inside bwrap (Linux) / sandbox-exec (macOS). System directories like /etc and ~/.ssh are mounted read-only. This is intentional.

Terminal UI

Colors are wrong or missing

moha relies on ANSI named colors. Try forcing true color support:

export TERM=xterm-256color
moha

Getting Help