opencode-cloud-core 0.1.0

Core library for opencode-cloud - config management, singleton enforcement, and shared utilities
Documentation

opencode-cloud

CI License: MIT

A production-ready toolkit for deploying opencode as a persistent cloud service.

Features

  • Cross-platform CLI (opencode-cloud / occ)
  • Docker container management
  • Service lifecycle commands (start, stop, status, logs)
  • Platform service integration (systemd/launchd)
  • XDG-compliant configuration
  • Singleton enforcement (one instance per host)

Requirements

For npm installation

  • Node.js 20+
  • Rust 1.82+ (for compiling native bindings)
    • Install via rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

For cargo installation

  • Rust 1.82+

Installation

Via npm (compiles from source)

npx opencode-cloud --version

Or install globally:

npm install -g opencode-cloud
occ --version

Via cargo

cargo install opencode-cloud
opencode-cloud --version

From source

git clone https://github.com/pRizz/opencode-cloud.git
cd opencode-cloud
just build
cargo run -p opencode-cloud -- --version

Usage

# Show version
occ --version

# View configuration
occ config show

# More commands coming in future releases:
# occ start    - Start the service
# occ stop     - Stop the service
# occ status   - Check service status
# occ logs     - View service logs

Configuration

Configuration is stored at:

  • Linux/macOS: ~/.config/opencode-cloud/config.json

Data (PID files, etc.) is stored at:

  • Linux/macOS: ~/.local/share/opencode-cloud/

Development

# Install dependencies
pnpm install

# Build everything
just build

# Run tests
just test

# Format and lint
just fmt
just lint

Architecture

This is a monorepo with:

  • packages/core - Rust core library with NAPI-RS bindings
  • packages/cli-rust - Rust CLI binary
  • packages/cli-node - Node.js CLI wrapper (calls into core via NAPI)

The npm package compiles the Rust core on install (no prebuilt binaries).

License

MIT