ComputeX DocumentationAgent + CLI + Browser Mining

Install, Run, and Mine with ComputeX

This page covers the full ComputeX setup flow: Node.js installation for macOS, Windows, Linux, and WSL, direct terminal mining with the npm package, Claw / OpenClaw agent setup, and the full browser-mining architecture behind the dashboard.

npm Package

computex

Node Requirement

18+

Mainnet Host

computex.work

Modes

CLI • Agent • Browser

Quick Start

Fastest way to get running

There are three real ComputeX operating modes: direct CLI, AI agent mode, and browser mining from the dashboard.

Direct CLI

Best for local terminal miners, servers, and scripting. You install the npm package and run ComputeX directly.

Claw / OpenClaw

Best for AI-agent workflows. The skill manages background execution and forwards commands to the ComputeX runtime.

Browser Mining

Best for end users. Connect a wallet, sign in, open the dashboard, and mine in a browser Web Worker.

Path 1

Direct CLI Setup

This is the cleanest route if you want to mine from a terminal or server without an AI-agent wrapper.

Install + Run on Mainnet

This installs ComputeX globally and starts direct mining against the production site.

npm install -g computex
export COMPUTEX_PRIVATE_KEY=0xyourprivatekey
computex mine --base-url https://computex.work

Run Without Global Install

Use this when you do not want to modify your global npm packages.

npx --yes --package computex computex --help
npx --yes --package computex computex mine --base-url https://computex.work

Path 2

Claw / OpenClaw Agent Setup

Use this if you want an AI agent to start, stop, monitor, and manage ComputeX automatically.

Install Skill + Start ComputeX

This is the main path for ClawHub and OpenClaw-style runtimes.

npx clawhub install computex
export COMPUTEX_PRIVATE_KEY=0xyourprivatekey
computex run
computex status

Important naming note

The direct npm package and the skill both expose the command name computex. If you use both on the same machine, prefer npx --yes --package computex computex ... for direct CLI usage and use computex run for the installed AI-agent skill.

Wallet Key on macOS / Linux / WSL

Run this before direct CLI auth, mining, or agent-managed ComputeX sessions.

export COMPUTEX_PRIVATE_KEY=0xyourprivatekey

Browser Mining Flow

Browser mode does not need a terminal key export. Open computex.work, connect your wallet, sign in, open the dashboard, and start mining from the Mining page.

  1. 1. Open ComputeX and connect a wallet.
  2. 2. Sign the authentication message.
  3. 3. Open Dashboard → Mining.
  4. 4. Start mining and keep the tab active.
  5. 5. The browser mines locally and submits once near epoch end.

Node.js Installation

Install Node.js before using the ComputeX CLI

ComputeX requires Node.js 18 or newer. Recommended path: install the current Node.js LTS, verify node and npm, then install the computex package.

Recommended official sources: nodejs.org download pageHomebrew Node formulanvm

macOS

Best for local CLI use, agent tooling, and browser-wallet development.

  • Recommended: install the current Node.js LTS from nodejs.org.
  • If you already use Homebrew, you can install Node with one command.
  • After install, verify both node and npm before installing ComputeX.

Homebrew Option

Use this if Homebrew is already installed.

brew install node
node -v
npm -v

Official Installer Check

After the .pkg installer from nodejs.org finishes, run this in Terminal.

node -v
npm -v

Windows

Use the official Node.js installer or winget if your machine already uses it.

  • Recommended: download the Windows LTS installer (.msi) from nodejs.org.
  • Optional: use winget if you manage packages from PowerShell.
  • Use PowerShell for the cleanest ComputeX setup on Windows.

winget Option

Run in PowerShell if winget is already available.

winget install -e --id OpenJS.NodeJS.LTS
node -v
npm -v

PowerShell Wallet Key

Set this before authenticated ComputeX commands.

$env:COMPUTEX_PRIVATE_KEY="0xyourprivatekey"

Command Prompt Wallet Key

Use this only if you prefer classic cmd.exe.

set COMPUTEX_PRIVATE_KEY=0xyourprivatekey

Linux / WSL

Recommended path is nvm so you can move between Node LTS releases cleanly.

  • Recommended: install nvm, then install the current Node.js LTS.
  • This is the safest path if you use Ubuntu, Debian, Arch, Fedora, or WSL.
  • After nvm is installed, ComputeX works the same as macOS terminal usage.

Install nvm + Node LTS

Use this for Linux terminals and WSL shells.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install --lts
nvm use --lts
node -v
npm -v

Direct CLI

Run ComputeX directly from the terminal

This mode is for bare terminal usage. You install the npm package, set your wallet key, and call ComputeX directly.

Global Install

Best for developer machines and dedicated mining boxes.

npm install -g computex
computex --help

No Global Install

Best if you want explicit package resolution every run.

npx --yes --package computex computex --help
npx --yes --package computex computex mine --base-url https://computex.work

Shared Command Reference

These commands are available in both direct CLI mode and AI-agent mode.

computex auth
computex profile
computex referrals
computex challenge
computex stats
computex claim
computex stake --amount 250
computex unstake --amount 100
computex logout

Mainnet vs Local API Hosts

The browser app uses same-origin /api calls. The terminal CLI needs an explicit host if you are not on local dev.

# Browser app
https://computex.work -> calls /api/... on the same origin

# Mainnet CLI
computex mine --base-url https://computex.work

# Local development
computex mine --base-url http://localhost:3001

AI Agents

Run ComputeX with Claw / OpenClaw-style agents

The skill wrapper handles process lifecycle for you. It starts ComputeX, checks status, stops it, and forwards the normal command set.

Install the Skill

Install once in your agent runtime, then call computex from the agent shell.

npx clawhub install computex

Start, Check, Stop

The skill stores local state at ~/.computex-skill/computex.json.

computex run
computex status
computex stop

Override the Runtime Binary

Use this if your agent environment should call a specific local ComputeX binary.

export COMPUTEX_BIN=/path/to/computex
computex run

What the skill actually does

  • 1. It checks whether a ComputeX background process already exists.
  • 2. It launches ComputeX through the public npm package when needed.
  • 3. It stores local state in ~/.computex-skill/computex.json.
  • 4. It forwards auth, stats, claim, stake, and referral commands to the ComputeX runtime.

Browser Mining

How browser-based mining works in ComputeX

ComputeX browser mining is local, epoch-based, and designed around one strong submission near epoch end instead of constant share spam.

Browser Mining Flow

This is the real implementation flow from the current app and API routes.

1. GET /api/mining/challenge?deviceType=pc|mobile
2. Browser Web Worker mines locally with keccak256(challenge + wallet + nonce)
3. Client keeps the best candidate hash for the epoch
4. Client submits once near epoch end via POST /api/mining/submit
5. Server re-verifies the hash and records epoch points
6. Reward settlement happens later from epoch finalization

What makes it fairer than share spam

  • 1. The browser mines locally instead of streaming every candidate to the server.
  • 2. The client keeps only the best candidate hash for the active epoch.
  • 3. Submission is allowed only in the final window near epoch end.
  • 4. The server recomputes the hash, blocks duplicates, rate limits, and records points for later settlement.
01

Wallet Sign-In

The user connects a wallet, signs the ComputeX auth message, and gets a session cookie from the API.

02

Epoch Challenge

The app requests the current challenge, difficulty targets, epoch window, and a session ID for the user.

03

Local Browser Mining

A browser Web Worker mines locally with random nonces and keeps only the best candidate for that epoch.

04

Single Submission Window

The client waits until the final submission window and sends one best result instead of spamming the server.

05

Server Verification

The server recomputes the hash, enforces the final-window rules, blocks duplicates, and records points.

06

Epoch Settlement

Recorded points are finalized later during epoch settlement, which is why rewards are fairer than per-share spam.

API Hosts

Which API host should you use?

The route paths stay the same. What changes is the host: local dev, same-origin browser, or production CLI.

Browser App

The web app calls relative /api routes on the same origin. On production that means the browser uses https://computex.work/api/...

Direct CLI

Local default is http://localhost:3001. On mainnet you should pass --base-url https://computex.work.

Agent Runtime

The skill launches the ComputeX runtime and that runtime should target computex.work on mainnet unless you explicitly override it.

Next Step

Ready to mine with ComputeX?

If you want the browser flow, open the site and sign in with your wallet. If you want the terminal or AI-agent flow, install the package or skill and start with the quick-start blocks above.