Distribution Options for EchOS
This document explores different ways to distribute EchOS for easy installation, comparing the npm global install approach (like openclaw) with alternatives.1. The OpenClaw Approach (npm global install)
How it works
OpenClaw distributes as an npm package with a CLI entry point:What would be needed for EchOS
To adopt this approach, EchOS would need:-
Add a
binfield to rootpackage.json: - Build the package for distribution (compile TypeScript to JS)
-
Handle environment configuration - currently EchOS requires
.envfile. Options:- Interactive setup wizard (like openclaw’s
onboard) - Default configuration with required env vars
- First-run configuration prompt
- Interactive setup wizard (like openclaw’s
-
Handle data directory - currently uses
./datarelative to CWD
Challenges for EchOS
| Challenge | Severity | Solution |
|---|---|---|
Native dependencies (better-sqlite3, lancedb) | High | Use prebuild binaries, or switch to pure JS alternatives |
| Environment configuration | Medium | Interactive CLI wizard or defaults |
| Multiple interfaces (Telegram, Web, CLI) | Medium | Allow selecting interfaces via flags |
| Redis dependency for scheduler | Low | Make optional, graceful degradation |
| pnpm workspace structure | High | Restructure as single package or use workspaces properly |
2. Alternative Distribution Methods
Option A: Standalone Script (Quickest)
Create a shell script that handles installation:Option B: Homebrew Tap (macOS)
Option C: Docker (Already Implemented ✅)
EchOS already has Docker support:Option D: Systemd Service + Deb/RPM Package
For Linux servers:Option E: NPX (No Install)
Option F: Hybrid - CLI Tool + Optional Daemon
This is similar to what you’re asking about:3. Recommended Path for EchOS
Given the current architecture, here’s what I’d recommend:Phase 1: Minimal Changes (Quick Win)
Add a simple install script that works with existing structure:- Check Node.js/pnpm versions
- Clone the repo (or extract tarball)
- Run
pnpm install && pnpm build - Guide user through
.envsetup
Phase 2: Add CLI Entry Point
Add to rootpackage.json:
Phase 3: Build & Publish to npm
4. Comparison Matrix
| Method | Ease of Use | Dev Effort | User Experience | Works for EchOS? |
|---|---|---|---|---|
| npm global | ⭐⭐⭐⭐⭐ | Medium | ⭐⭐⭐⭐⭐ | ⚠️ Needs native deps handling |
| Docker | ⭐⭐⭐ | Low | ⭐⭐⭐ | ✅ Done |
| Homebrew | ⭐⭐⭐⭐ | Medium | ⭐⭐⭐⭐ | ⚠️ macOS only |
| Script | ⭐⭐⭐ | Low | ⭐⭐⭐ | ✅ Simple |
| Deb/RPM | ⭐⭐⭐⭐ | High | ⭐⭐⭐⭐ | Linux servers |
5. OpenClaw Deep Dive
Looking at openclaw’s approach more closely:Key elements that make it work:
- Pre-built binaries: Their
openclaw.mjsis bundled (using tsdown) - Self-contained: No external build step needed for users
- Extensions system: Separate from core, can be added later
- Platform detection: Handles macOS, Linux, Windows differently
What they’d need to change for full npm distribution:
- Bundle all TypeScript to JS
- Handle
better-sqlite3/lancedbnative rebuilds - Add interactive onboarding
- Set up proper npm org/package
6. Next Steps
If you want to pursue the npm approach:- Test the build: Ensure
pnpm buildproduces working JS - Add bin entry: Modify root
package.json - Create onboarding: Interactive CLI for
.envsetup - Handle native deps: Test on clean machines
- Publish: Set up npm account and publish