Connect a Repository
Connecting a repository to SageOx enables AI context injection, team knowledge sharing, and Ledger tracking for that codebase.
Quick Start
From your repository root:
# Install CLI (if not already installed)
curl -sSL https://raw.githubusercontent.com/sageox/ox/main/scripts/install.sh | bash
# Authenticate
ox login
# Initialize repository
ox initWhat Happens When You Connect
- Configuration Created - A
.sageox/directory is added to your repo - Platform Registration - Your repo is linked to your SageOx account
- Context Enabled - AI agents can now receive team context via
ox prime - Ledger Activated - Work history and transcripts can be stored
Prerequisites
- Git repository with at least one commit
- SageOx account (sign up at sageox.ai)
Team vs Personal
When connecting, you choose the scope:
| Scope | Who Can Access | Use Case |
|---|---|---|
| Team | All team members | Shared projects |
| Personal | Only you | Side projects, experiments |
To connect to a team:
ox init --team my-teamVerification
After connecting, verify everything is working:
ox doctorAll checks should pass:
Authentication
[OK] Logged in
Repository
[OK] Repo registered
Context Injection
[OK] EnabledUsing with AI Agents
Once connected, configure your AI agent to use SageOx context.
Claude Code
Add to your CLAUDE.md:
## SageOx
Run `ox agent prime` at session start, after /clear, and after /compact.Other Agents
Any agent that can run shell commands can use ox prime to receive context.
Disconnecting
To disconnect a repository:
rm -rf .sageoxThis removes local configuration. The repository record remains on SageOx but becomes inactive.
Multiple Repositories
Each repository is connected independently. Run ox init in each repo you want to connect.
Troubleshooting
"Not a git repository" - Initialize git first: git init && git commit --allow-empty -m "init"
"Already initialized" - Use ox init --force to reinitialize
"Authentication required" - Run ox login first
Related
- Quickstart: ox CLI - Full getting started guide
- ox init - Detailed init command reference
- ox doctor - Diagnose configuration issues

