Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Prerequisites

  • Rust (edition 2024)
  • pnpm (only needed for frontend development)

Build from Source

# Clone and install
git clone https://github.com/johnkozan/clawcounting.git
cd clawcounting
cargo install --path .

# Verify
clawcounting --version

Quick Start

# Initialize the database and start the server
clawcounting init
clawcounting serve

The server starts at http://localhost:3000. On first run, you’ll be guided through setup (creating your first user) via the web UI.

Configuration

ClawCounting works out of the box with sensible defaults – no configuration file needed. You can optionally override settings via environment variables or a .env file:

VariableDefaultDescription
CLAWCOUNTING_DB./clawcounting.dbSQLite database file path
CLAWCOUNTING_PORT3000HTTP server port
CLAWCOUNTING_JWT_SECRETAuto-generatedJWT signing secret. Auto-generated and stored in DB if not set.
CLAWCOUNTING_API_KEYAPI key for CLI write operations. Alternative to --api-key flag.

A .env.example file is included in the repository for reference.

What Gets Created

Running clawcounting init creates:

  • The SQLite database file (default: ./clawcounting.db)
  • All tables, indexes, triggers, and migrations
  • A JWT secret (stored in the settings table)

Running clawcounting serve starts:

  • REST API at /api/v1/*
  • Web UI at /
  • Swagger API docs at /swagger-ui/
  • Health check at /health