githubEdit

Development Guide

This directory contains documentation for developing spuff.

Contents

Quick Start

# Clone
git clone https://github.com/avelino/spuff.git
cd spuff

# Build
cargo build

# Test
cargo test --all

# Run
cargo run -- status

Project Structure

Key Concepts

Two Binaries

Spuff produces two binaries:

  1. spuff - CLI tool that runs on user's machine

  2. spuff-agent - Daemon that runs on cloud VMs

Provider Abstraction

Cloud providers implement the Provider trait. See docs/providers/ for details.

Cloud-Init Templates

VM bootstrapping uses Tera templates. See docs/adr/0001-cloud-init-bootstrap.md.

Local State

Instance tracking uses SQLite. See docs/adr/0003-sqlite-local-state.md.

Useful Commands

Environment Variables

Variable
Description

DIGITALOCEAN_TOKEN

DigitalOcean API token

RUST_LOG

Logging level (debug, trace, etc.)

SPUFF_AGENT_TOKEN

Agent authentication token

TS_AUTHKEY

Tailscale auth key

Last updated

Was this helpful?