Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.oxen.ai/llms.txt

Use this file to discover all available pages before exploring further.

Most Oxen workflows begin in one of three ways: initializing a fresh local repository, cloning an existing one from a remote, or pulling down specific files without setting up a full repo.

Initialize a Local Repository

Create a new Oxen repository in the current directory with oxen init.
oxen init
This creates a .oxen/ directory in your working directory containing the repository metadata. As you add and commit files, each commit’s Merkle Tree is stored under .oxen/.

Clone a Remote Repository

There are a few ways to clone an Oxen repository, depending on how much data you want to transfer. The default oxen clone with no flags downloads the latest commit from the main branch.
oxen clone https://hub.oxen.ai/ox/CatDogBBox
This creates a new directory CatDogBBox containing the files from the latest commit, plus a .oxen/ folder with the Merkle Tree for the branch’s history.

Clone a Specific Branch

Use the -b flag to clone from a branch other than main.
oxen clone https://hub.oxen.ai/ox/CatDogBBox -b my-pets

Clone All Branches

To clone the commit history for every branch (useful when migrating a repo to a new remote), use --all.
oxen clone https://hub.oxen.ai/ox/CatDogBBox --all

Clone a Subtree

If you only need a subset of the repository, use --filter and --depth to limit the clone. --filter selects which directories to clone, while --depth limits how many levels of subdirectories are recursed into.
oxen clone https://hub.oxen.ai/ox/CatDogBBox --filter annotations --depth 1
This clones only the subtree starting at the annotations directory, without recursing into any new subdirectories.

Remote Mode

If the repository is larger than you can store locally, you can clone it in remote mode to download the commit Merkle trees without the file contents.
oxen clone --remote https://hub.oxen.ai/ox/CatDogBBox
In a remote-mode repository, you can download individual files or directories on demand with oxen restore.
oxen restore path/to/file
This is useful for inspecting the state of a repository without waiting for all its files to download.

Configure a Remote

If you initialized a repository locally, you can point it at a remote with oxen config --set-remote. This is what enables oxen push, oxen pull, and oxen fetch.
oxen config --set-remote origin https://hub.oxen.ai/ox/CatDogBBox
Specify a remote name (commonly origin) and the URL of the remote repository. Cloned repositories already have origin set automatically. A repo can have multiple remotes β€” most commands default to origin if no remote is specified.

Create a Remote from the CLI

If the remote repository doesn’t exist yet, you can create it from the CLI with oxen create-remote.
oxen create-remote --host hub.oxen.ai --scheme https --name ox/SampleRepo
You can also create remotes through the Oxen.ai web UI.

Download Specific Files

If you only need specific files or directories β€” without cloning the whole repository β€” use oxen download.
oxen download ox/CatDogBBox test.csv
To download from a specific branch or commit, pass --revision.
oxen download ox/CatDogBBox path/to/folder --revision commit_or_branch_name