Fabric Quickstart
Get started with Fabric in under 5 minutes.
What is Fabric?
Fabric is an agent session manager and terminal multiplexer. It lets you:
- Start and manage AI coding agent sessions (Claude Code, Codex, etc.)
- Pair devices for distributed session execution
- Install hooks to integrate with IDE tools
Install
bash
npm install -g fabricVerify:
bash
fabric --version
# fabric v0.10.0Quick setup
1. Initialize config
bash
fabric initThis creates ~/.optimalos/config.json.
2. Start the server
bash
fabric startThe server runs on http://localhost:3000.
3. Use the CLI
bash
fabric --helpYou can start agent sessions, pair devices, and manage hooks.
Device pairing (cloud mode)
If using Fabric with a cloud controller:
- On the host: Mint a pairing token from the web interface
- On the device:bash
fabric pair <token> - Verify: Check
~/.config/optimalos/device.jwtexists
Claude Code hooks
Fabric can install hooks for Claude Code:
bash
# Install hooks
fabric hooks install
# Check status
fabric hooks status
# Uninstall
fabric hooks uninstallThis wires Claude Code's lifecycle hooks to the local fabric-agent.
Agent daemon (Linux)
On Linux, you can run fabric-agent as a background service:
bash
# Install as user service
bash scripts/install-agent.sh install
# Check status
systemctl --user status optimalos-agentConfig options
Edit ~/.optimalos/config.json:
json
{
"port": 3000,
"authPassphrase": null,
"agents": [
{
"name": "claude",
"command": "claude",
"enabled": true
}
]
}