Skip to content

developerfred/ElixirClaw

Repository files navigation

ElixirClaw 🦞⚡

stars license elixir

High-performance OpenClaw Node implemented in pure Elixir. Connect your device to OpenClaw Gateway and expose AI capabilities.

Built on the BEAM - the same technology that powers WhatsApp, Ericsson, and Nintendo Online

Why ElixirClaw?

Feature Benefit
OTP Reliability 99.9999999% uptime - it just runs forever
Hot Reload Update your AI node without restarting
Built-in Telemetry See your agent thinking in real-time
Security First Input sanitization, TLS, command allowlisting
BEAM Distribution Scale to 1000 nodes with built-in clustering

Quick Start

# Clone and build
git clone https://github.com/developerfred/ElixirClaw.git
cd elixir-claw
mix deps.get
mix escript.build

# Register your node
./elixir_claw node-register --display-name "My Elixir Node"

# Start as node
./elixir_claw node-start

Watch the Demo

asciicast

Or run locally:

# Record your own demo
asciinema rec demo.cast
# Play it back
asciinema play demo.cast

With Docker

docker-compose up -d

Features

  • WebSocket client with TLS support
  • Camera capture (macOS, Linux)
  • Screen capture & recording
  • System notifications
  • Location services
  • Command execution with allowlist
  • Device identity & authentication

Commands

./elixir_claw status              # Show node status
./elixir_claw node-register       # Register with gateway
./elixir_claw node-start         # Start node mode
./elixir_claw node-stop          # Stop node
./elixir_claw approvals          # List pending approvals
./elixir_claw -i                # Interactive mode

Configuration

{
  "gateway_host": "127.0.0.1",
  "gateway_port": 18789,
  "display_name": "My Node",
  "caps": ["camera.snap", "screen.snap", "system.notify"]
}

Environment variables:

  • ELIXIR_CLAW_HOST - Gateway host
  • ELIXIR_CLAW_PORT - Gateway port
  • ELIXIR_CLAW_NODE_ID - Node ID
  • ELIXIR_CLAW_TOKEN - Auth token

Comparison

See COMPARISON.md for detailed comparison with ZiggyStarClaw, Clawgo, ZeroClaw, and IronClaw.

Roadmap

  • Real Ed25519 authentication
  • Unified configuration (Config.Provider)
  • Structured logging with telemetry
  • Progress event streaming
  • Phoenix LiveView Dashboard
  • LLM integration (Claude/GPT-4)
  • Livebook integration
  • Nx/Bumblebee for local AI
  • More platform support

Phase 3 Features

Real-time Event Streaming

Track capability execution progress in real-time:

# Subscribe to events
ElixirClaw.Events.subscribe("my_node")

# Execute with progress tracking
ElixirClaw.Node.execute("screen.record", %{duration: 10}, %{
  node_id: "my_node",
  request_id: "req_123"
})

Phoenix LiveView Dashboard

Monitor your nodes in real-time with a web dashboard:

# Start with dashboard enabled
ELIXIR_CLAW_START_DASHBOARD=true ./elixir_claw node-start

# Open http://localhost:4000

Features:

  • Real-time node status
  • Telemetry visualization
  • Command approval interface
  • Event streaming

LLM Integration

Control ElixirClaw with natural language through multiple LLM providers:

# Unified interface - auto-selects provider
{:ok, response} = ElixirClaw.LLM.chat("Take a screenshot")

# Specific provider selection
{:ok, response} = ElixirClaw.LLM.chat("Take a screenshot", provider: :nvidia)
{:ok, response} = ElixirClaw.LLM.chat("Take a screenshot", provider: :openrouter)
{:ok, response} = ElixirClaw.LLM.chat("Take a screenshot", provider: :opencode)

# Provider-specific functions
{:ok, response} = ElixirClaw.LLM.chat_with_claude("Take a screenshot")
{:ok, response} = ElixirClaw.LLM.chat_with_gpt4("Take a screenshot")
{:ok, response} = ElixirClaw.LLM.chat_with_nvidia("Take a screenshot")
{:ok, response} = ElixirClaw.LLM.chat_with_openrouter("Take a screenshot")
{:ok, response} = ElixirClaw.LLM.chat_with_opencode("Take a screenshot")

# Local pattern matching (no API needed)
{:ok, response} = ElixirClaw.LLM.process_command("screenshot my screen")

Supported Providers

Provider Environment Variable Default Model
Claude (Anthropic) ANTHROPIC_API_KEY claude-3-sonnet-20240229
OpenAI OPENAI_API_KEY gpt-4-turbo-preview
NVIDIA NIM NVIDIA_API_KEY meta/llama-3.1-8b-instruct
OpenRouter OPENROUTER_API_KEY anthropic/claude-3.5-sonnet
OpenCode OPENCODE_API_KEY opencode-default

Configuration

Set your preferred provider:

# Set default provider
export ELIXIR_CLAW_LLM_PROVIDER=nvidia

# Set API keys
export ANTHROPIC_API_KEY=your_key
export OPENAI_API_KEY=your_key
export NVIDIA_API_KEY=your_key
export OPENROUTER_API_KEY=your_key
export OPENCODE_API_KEY=your_key

Stress Testing

Verify 72-hour uptime:

./stress_test.sh

Outputs:

  • Memory usage statistics
  • Error rates
  • Connection stability
  • Performance metrics

Contributing

  1. Fork the repo
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a PR

Support

If this project helps you, consider supporting:

  • Ethereum: 0xd1a8Dd23e356B9fAE27dF5DeF9ea025A602EC81e
  • Polkadot: 5DJV8DsPT3KH1rzvqTGqJ7WsCNnFt5tBn6R9yfe8SGi7YmYD
  • Solana: EyFovdqgnLAicTrDzJzjawRciLHTtq5W7ZkUV5Q3azmb

License

MIT License - see LICENSE

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors