Install (Fabric)
Fabric v0.10.0 installation and setup.
Prerequisites
- Bun runtime (v1.3.11+) — the project uses Bun for development and production
- Node.js 20+ (alternative if Bun unavailable)
- Linux/macOS (Windows via WSL2)
Quick install
Global (recommended)
bash
npm install -g fabricLocal development
bash
git clone https://github.com/your-org/fabric.git
cd fabric
bun install
bun run buildSetup
Initialize config
bash
fabric initThis creates:
~/.optimalos/config.json- Main configuration~/.optimalos/sessions.json- Session persistence
Edit config
bash
nano ~/.optimalos/config.jsonConfig options:
json
{
"port": 3000,
"authPassphrase": null,
"agents": []
}Environment variables
| Variable | Purpose |
|---|---|
PORT | Server port (default: 3000) |
AUTH_PASSPHRASE | Require login passphrase |
OPTIMALOS_DATA_DIR | Data directory (default: ~/.optimalos) |
OPTIMALOS_CONFIG_DIR | Device identity dir (default: ~/.config/optimalos) |
Agent daemon (Linux only)
Install service
bash
bash scripts/install-agent.sh installThis:
- Creates
~/.config/optimalos/agent.env - Installs
optimalos-agent.serviceto user systemd - Enables and starts the service
Service management
bash
# Status
systemctl --user status optimalos-agent
# Logs
journalctl --user -u optimalos-agent -f
# Stop
systemctl --user stop optimalos-agent
# Uninstall
bash scripts/install-agent.sh uninstallPersistence across logout
bash
sudo loginctl enable-linger $USERCommands
bash
fabric # Start the server (default)
fabric init # Create default config
fabric start # Start the server
fabric start -p N # Start on port N
fabric pair <token> # Pair this device with cloud
fabric hooks ... # Manage Claude Code hooks
fabric --help # Show help
fabric --version # Show versionVerification
bash
# Check version
fabric --version
# Start server in background
fabric start &
# Test health endpoint
curl -s http://localhost:3000/healthz
# Should return 200Uninstall
bash
# Remove global package
npm uninstall -g fabric
# Remove config
rm -rf ~/.optimalos
# Remove device identity
rm -rf ~/.config/optimalos
# Remove agent service (if installed)
bash scripts/install-agent.sh uninstallTroubleshooting
Bun not found
bash
curl -fsSL https://bun.sh/install | bashPermission issues with agent service
bash
systemctl --user daemon-reload
systemctl --user restart optimalos-agentPort already in use
bash
fabric start -p 3001