ox init
Initialize a repository with SageOx, connecting it to the platform and setting up local configuration.
Usage
Run this command from the root of your Git repository after authenticating with ox login.
What Happens During Init
When you run ox init, the CLI:
- Creates the
.sageox/directory - Config, a README, and a.gitignore - Adds
ox agent primetoAGENTS.md/CLAUDE.md- So coding sessions load Team Context - Installs hooks for your coding tools - Claude Code by default, plus any named with
--agents - Stages the created files in git - Review and commit them yourself
- Associates the repository with a team - Prompts you to pick one unless you pass
--team - Registers the repository with SageOx
Flags
| Flag | Description |
|---|---|
--team <team> | Team to associate the repository with, by name, slug, or ID. Required when there is no terminal to prompt in |
--agents <list> | Comma-separated coding tools to configure, for example claude-code,codex. Unknown names are ignored |
--force | Initialize even if .sageox/ already exists on the remote |
--endpoint <url> | SageOx endpoint to use when you are signed in to more than one |
-q, --quiet | Suppress non-essential output |
--no-input | Never prompt: a step that needs a choice fails and names the flag to pass instead. Global flag, for scripts and coding tools |
The .sageox/ directory
ox init creates .sageox/ with the repository config (config.json), a README, a .gitignore, and a .repo_<uuid> marker file. It stages them in git for you to commit.
Prerequisites
- Git repository with at least one commit
- Authenticated with
ox login - Write access to the repository root
Troubleshooting
"Not a git repository" - Run from within an initialized Git repository.
"Not authenticated" - Run ox login first.
"Repository already initialized" - Use --force to reinitialize.
Related Commands
ox status
Show your sign-in status, project setup, Ledger and Team Context sync, daemon health and AI teammate activity, plus a tree of SageOx directories.
ox login
Sign the ox CLI in to SageOx with device flow authorization. Covers how login works, where credentials are stored, flags and troubleshooting.

