Documentation
CLICommands

ox sync

Manually synchronize your Ledger and Team Context repositories with the server. The ox daemon handles this automatically in most cases, you rarely need this command.

Usage

terminal
$

Flags

FlagDescription
--team <id>Sync a specific Team Context by ID
--all-teamsSync all configured Team Contexts
--remove-team <id>Remove a Team Context from local sync

What gets synced

The sync command pulls the latest changes from two git repositories:

RepositoryContainsLocation
LedgerCommit history, code observations, project decisions.sageox/ledger/
Team ContextConventions, distilled discussions, team knowledge.sageox/teams/<team>/

Both repositories use git pull --rebase to incorporate server changes while preserving any local commits (like uncommitted observations).

When you need manual sync

The daemon syncs automatically every 5 minutes. Manual sync is useful when:

  • Network was down: Force a sync after reconnecting
  • Need latest context immediately: Before starting a session that needs recent team decisions
  • Debugging sync issues: Verify that sync works before running ox doctor
  • After changing team membership: Pull new Team Context access

Examples

terminal
# Sync everything (Ledger + all Team Contexts)
$
terminal
# Sync only a specific team
$
terminal
# Sync all Team Contexts (but not Ledger)
$
terminal
# Remove a team you no longer need locally
$

Automatic sync (daemon)

The ox daemon (oxd) runs in the background and syncs automatically. The sync interval is controlled by your team's manifest (default: 5 minutes).

Check daemon status:

terminal
$

If the daemon isn't running, start it:

terminal
$

Most users never need ox sync, the daemon handles everything. If you find yourself running it often, check that your daemon is running with ox daemon status.

Troubleshooting

"Not authenticated": Run ox login first.

"Repository not initialized": Run ox init in your project directory.

"Sync failed: network error": Check your internet connection and try again.

"Merge conflict": This shouldn't happen (files use UUIDv7 names to avoid conflicts). If it does, the command will log an error and flag it for manual resolution.

What's next

  • Team Context: Understand what's in your Team Context
  • ox doctor: Diagnose sync and configuration issues
  • ox init: Initialize a repository with SageOx