Documentation

Learn how to use Oak VCS

Installation

Quick Install (Recommended)

curl -fsSL https://oak.space/install | sh

This downloads the appropriate binary for your platform and installs it to ~/.local/bin.

Build from Source

git clone https://github.com/oakspace/oak
cd oak
make install

Requires Rust 1.70 or later.

Getting Started

Create a New Repository

# Initialize in current directory
oak init

# Initialize in a specific path
oak init myproject

# Initialize local-only (no remote sync)
oak init --local myproject

Make Your First Commit

# Check what's changed
oak status

# See the diff
oak diff

# Commit all changes
oak commit -m "Your commit message"

View History

# Show commit history
oak log

# Limit number of commits
oak log -n 10

Command Reference

oak init [PATH] [--local]

Initialize a new Oak repository.

  • PATH - Directory to initialize (default: current directory)
  • --local - Create local-only repository without remote sync

oak status

Show the working directory status. Lists modified, added, and deleted files.

oak diff

Show differences between the working directory and the last commit.

oak commit -m MESSAGE

Create a new commit with all changes in the working directory.

  • -m MESSAGE - Commit message (required)

oak log [-n LIMIT]

Show commit history.

  • -n LIMIT - Maximum number of commits to show

oak reset [HASH]

Reset the working directory to a specific commit.

  • HASH - Commit hash to reset to (default: HEAD)

oak push

Push local commits to the remote repository.

oak pull

Pull commits from the remote repository and update working directory.

oak serve

Start the Oak HTTP server for remote repository hosting.

oak tui

Open the interactive terminal user interface for browsing repository history.

Working with Remotes

Push/Pull Workflow

# Push local commits to remote
oak push

# Pull remote commits and update working directory
oak pull

Oak automatically creates a remote repository on first push if it doesn't exist.

Repository API

# List all repositories
curl https://oak.space/api/repos

# Get repository info
curl https://oak.space/api/repos/myrepo

Configuration

Environment Variables

OAK_REMOTE_URL

URL of the remote Oak server.

Default: https://oak.space

OAK_AUTHOR

Author name for commits.

Default: System username

OAK_LOG / RUST_LOG

Logging level filter.

Example: OAK_LOG=debug

DATABASE_URL

PostgreSQL connection string (server only).

Default: postgres://oak:oak@localhost:5433/oak