Documentation
Complete documentation for klaas CLI. Learn how to install, configure, and use klaas for remote access to your AI coding agent sessions.
Introduction to klaas
What is klaas?
klaas is a command-line tool that wraps AI coding agents like Claude Code, Gemini CLI, and Codex CLI, adding remote access capabilities. Start a coding session on your desktop, then monitor progress and send instructions from your phone while grabbing coffee.
Key Features
Real-time Streaming
See terminal output character by character, from any device, as it happens.
Multi-device Access
Start on desktop, check progress from your phone while grabbing coffee.
End-to-End Encrypted
Your terminal sessions are encrypted client-side. Not even the klaas team can read your data.
Multi-Agent Support
Works with Claude Code, Gemini CLI, Codex CLI, GitHub Copilot, Aider, and more.
Permission Notifications
Get notified when your agent needs approval (for supported agents).
Remote Input
Send prompts and approve tool calls from anywhere.
How It Works
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ klaas │────▶│ Agent │────▶│ Terminal │
│ CLI │◀────│ CLI │◀────│ Output │
└─────────────┘ └─────────────┘ └─────────────┘
│ │
│ ┌─────────────┐ │
└────────▶│ klaas │◀──────────────┘
(E2EE) │ Cloud │
└─────────────┘
│
┌─────────────┐
│ Web │
│ Dashboard │
└─────────────┘- klaas detects installed agents and spawns your choice in a PTY
- All input/output is captured and encrypted client-side
- Encrypted output is streamed to the klaas cloud in real-time
- Access your session from the web dashboard
- For agents with hooks support, permission requests trigger notifications
Installation
Install klaas on macOS, Linux, or Windows in seconds. Choose your preferred installation method below.
macOS, Linux, WSL:
curl -fsSL https://klaas.sh/install.sh | bashWindows PowerShell:
irm https://klaas.sh/install.ps1 | iexWindows CMD:
curl -fsSL https://klaas.sh/install.cmd -o install.cmd && install.cmdVerifying Installation
After installation, verify klaas is working:
klaas --versionQuickstart
Get up and running with klaas in under a minute.
Prerequisites
Before using klaas, ensure you have at least one supported AI coding agent installed:
| Agent | Installation |
|---|---|
| Claude Code | code.claude.com |
| Gemini CLI | ai.google.dev/gemini-cli |
| Codex CLI | openai.com/codex |
| GitHub Copilot | github.com/features/copilot |
| Mistral Vibe | mistral.ai |
| Aider | aider.chat |
| Goose | github.com/block/goose |
| Open Interpreter | openinterpreter.com |
Step 1: Start klaas
Simply run:
klaasIf you have multiple agents installed, klaas displays an interactive selector. Use arrow keys or the shortcut key (shown in brackets) to select your agent.
Step 2: Authenticate
On first run, klaas prompts you to authenticate. A browser window opens automatically. Log in with your klaas account, and the CLI receives your credentials securely via OAuth Device Flow.
Your credentials are stored in your system keychain (macOS Keychain, Windows Credential Manager, or Linux Secret Service).
Step 3: View Your Session
Open klaas.sh in any browser, log in, and navigate to Sessions. You'll see your active session streaming in real-time.
From the web dashboard, you can:
- Watch terminal output as it happens
- Send text input to your agent
- Approve permission requests (for supported agents)
CLI Commands
Complete reference for all klaas command-line commands.
klaas
The main command to start a new agent session with remote access enabled.
klaas [options] [-- agent-args...]Examples
# Start with auto-detected agent
klaas
# Start with a specific agent
klaas --agent claude
klaas -a gemini
# Resume the previous session
klaas --resume
# Pass arguments through to the agent
klaas -- --model sonnet --allowedTools "Bash(git*)"
klaas -a claude -- -p "Help me refactor this code"Options
| Short | Long | Description |
|---|---|---|
-a | --agent <AGENT> | Select which agent to run (e.g., claude, gemini, codex). |
-r | --resume | Resume the previous session instead of starting a new one. |
-v | --version | Print version information. |
-h | --help | Show help message. |
Arguments after -- are passed directly to the agent. This lets you use any flags your agent supports.
klaas agents
List all installed AI coding agents that klaas can use.
klaas agentsExample Output
Installed agents:
claude - Anthropic Claude Code
gemini - Google Gemini CLI
aider - AiderAgents without any installed binaries are not shown.
klaas upgrade
Upgrade klaas to the latest version.
klaas upgradeAlias: klaas update
This command:
- Checks for the latest version on GitHub releases
- Downloads the appropriate binary for your platform
- Replaces the current installation
klaas automatically checks for new versions and upgrades itself when a new version is available .
klaas uninstall
Remove klaas from your system.
klaas uninstall [--purge]Options
| Flag | Description |
|---|---|
--purge | Also remove user data (credentials and config) without prompting. |
This command removes:
- The klaas binary
- Cache directory (
~/Library/Caches/klaas/on macOS,~/.cache/klaas/on Linux) - Optionally: user data directory (
~/.klaas/)
Supported Agents
klaas supports multiple AI coding agents out of the box:
| Agent | ID | Shortcut | Hooks Support |
|---|---|---|---|
| Anthropic Claude Code | claude | [A] | Full |
| Google Gemini CLI | gemini | [G] | Full |
| OpenAI Codex CLI | codex | [O] | Partial |
| GitHub Copilot | copilot | [C] | None |
| Mistral Vibe | vibe | [M] | None |
| Aider | aider | - | None |
| Goose | goose | - | None |
| Open Interpreter | interpreter | - | None |
Hooks Support indicates whether klaas can receive notifications when the agent requests permissions: Full = permission requests trigger notifications, Partial = some events supported, None = output streaming only.
Global Flags
Flags that work with any klaas command.
| Short | Long | Description |
|---|---|---|
-h | --help | Show help for the command |
-v | --version | Show klaas version |
Configuration File
Customize klaas behavior with a TOML configuration file.
klaas reads configuration from TOML files in two locations:
- Project-level:
./.klaas/config.toml(in your project directory) - User-level:
~/.klaas/config.toml(in your home directory)
Project-level configuration takes precedence over user-level.
Basic Configuration
# Default agent when multiple are available
default_agent = "claude"
# Only show these agents (even if others are installed)
only = ["claude", "gemini"]
# Or add agents to the built-in list
also = ["my-custom-agent"]
# Disable anonymous analytics (tracks install/upgrade/uninstall
# events with version and platform only, no personal data)
analytics = falseonly and also are mutually exclusive. Use only to restrict to a specific set of agents, or also to add custom agents alongside the built-in ones.
Custom Agent Definitions
Define your own agents with full configuration:
[agents.my-agent]
# Required: command to execute
command = "/path/to/my-agent"
# Required: human-readable name
name = "My Custom Agent"
# Optional: alternative binary names for detection
detect = ["my-agent", "myagent"]
# Optional: default arguments
args = ["--verbose"]
# Optional: hooks type ("claude", "gemini", "codex", or "none")
hooks_type = "claude"
# Optional: single-letter shortcut for interactive selection
shortcut = "X"
# Optional: run through shell (for complex commands)
shell = falseFull Example
# ~/.klaas/config.toml
# Use Claude by default when multiple agents are installed
default_agent = "claude"
# Only show Claude and my custom agent
only = ["claude", "my-local-llm"]
# Define a custom agent
[agents.my-local-llm]
command = "ollama run codellama"
name = "Local CodeLlama"
shell = true
shortcut = "L"Session Management
Understanding how klaas manages terminal sessions.
Session Lifecycle
When you run klaas, it:
- Authenticates (if needed) using OAuth Device Flow
- Detects agents and presents a selection if multiple are installed
- Creates a session on the klaas cloud
- Spawns the agent in a pseudo-terminal (PTY)
- Streams output encrypted to the cloud in real-time
- Handles input from both local terminal and remote dashboard
Resuming Sessions
Use --resume to continue your previous session:
klaas --resumeThis reconnects to the most recent session rather than starting fresh.
Session Storage
Sessions are stored encrypted on klaas servers. Only you can decrypt them using your account credentials. Session metadata (timestamps, status) is stored in plaintext for functionality.
Remote Access
Access your terminal sessions from anywhere.
Viewing Sessions
- Go to klaas.sh
- Log in with your account
- Navigate to Sessions
- Click on an active session to view it
The terminal view shows real-time output as it happens on your local machine.
Sending Input
From the web dashboard, you can:
- Type text: Click the input area and type. Press Enter to send.
- Approve permissions: When your agent requests permission, a notification appears. Click to approve or deny.
Multi-Device Access
You can view the same session from multiple devices simultaneously. All viewers see the same real-time output, and any viewer can send input.
Security
How klaas protects your terminal data.
End-to-End Encryption
klaas implements end-to-end encryption (E2EE) ensuring that only you can read your terminal sessions—not even the klaas team can decrypt your data.
┌─────────────┐ encrypted with ┌─────────────┐
│ Your │ ───────────────────────▶│ Stored on │
│ Master Key │ your password │ Server │
└─────────────┘ └─────────────┘
│
│ decrypted locally on each device
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ CLI │ │ Web Browser │ │ Mobile App │
└─────────────┘ └─────────────┘ └─────────────┘Key Principles
- Zero-Knowledge Architecture: The server stores only encrypted data and your password-protected master key. Without your password, the data is unreadable.
- Client-Side Encryption: All encryption and decryption happens on your devices. The server never sees plaintext content.
- Multi-Device Access: All authenticated devices share the same master key, encrypted with your password.
- Password-Protected Keys: Your master encryption key is encrypted with your password. If you forget your password, your data cannot be recovered (by design).
What's Protected
| Data | Protection |
|---|---|
| Terminal output | AES-256-GCM encrypted |
| Terminal input | AES-256-GCM encrypted |
| Session metadata | Plaintext (for functionality) |
| Authentication tokens | Separate (OAuth/JWT) |
Credential Storage
klaas stores authentication credentials securely using your operating system's native credential storage:
- macOS: Keychain
- Windows: Credential Manager
- Linux: Secret Service (libsecret)
No sensitive data is written to disk in plain text.