Skip to content
C3Control / Continuity
Sync documentation
C3Sync

C3Sync / Reference

Updated 2026-07-24 · c3sync command definitions

CLI reference

Two binaries ship together: c3sync (the CLI) and c3syncd (the daemon, normally run as a service). Run c3sync <command> --help for full flag detail on your installed release.

Setup and enrollment

CommandPurpose
c3sync setupGuided wizard: host a hub or join one. Flags (--role, --handle, --hub-url, --tls-pin, --creds, --passphrase, --yes) pre-answer prompts
c3sync joinShorthand for setup --role join
c3sync init --handle <h> --tls-pin <pin>Manually initialize the first device (managed mode requires the pin)
c3sync login --handle <h> --hub-url <url> --tls-pin <pin> --creds <file>Enroll another device via PAKE; an enrolled responder must be online. Reads the passphrase from stdin when piped
c3sync daemon install | uninstall | statusManage c3syncd as a native background service (captures keystore env into a 0600 env file; enables user lingering)

Projects and synchronization

CommandPurpose
c3sync enable [path]Start syncing a project (agents auto-detected; non-git folders sync transcripts only)
c3sync disable [path]Stop syncing; synced state and clocks are kept
c3sync statusEnrollment, per-project backlog, conflicts, git position, and deletion holds
c3sync sync [path] [--confirm-deletions]Flush immediately; --confirm-deletions approves a held bulk deletion for this flush
c3sync materialize [path]Force a full native write-back pass (idempotent)
c3sync reconcile [path]Fetch + fast-forward this repo to pushed upstream history — see git integration

Conflicts and recovery

CommandPurpose
c3sync conflicts list [path]Unresolved file conflicts and co-edited sessions
c3sync conflicts resolve <file> [path]Clear a conflict and remove its .conflict sidecar
c3sync checkout --list [path]List restorable turns, newest first
c3sync checkout <turn> [--force] [--yes]Rewind the working tree to a turn; prints an undo turn

Devices and keys

CommandPurpose
c3sync devicesThis device plus every device admitted here (friendly hostnames; USER PUB feeds revoke)
c3sync devices remove <user-pub>Drop a registry row (ghost entries) — cosmetic, does not revoke
c3sync rekey [--passphrase-new]Rotate the tenant secret and enrollment passphrase; bumps the key epoch
c3sync revoke <user-pub>Full lost-device ceremony: cut transport creds, rekey content, re-enroll survivors

Hub administration

The hub serves the whole C3 suite — C3Sync devices on port 4222 and C3 Mobile phones on the 8443 WebSocket listener — in isolated accounts.

CommandPurpose
c3sync hub init --handle <h> --host <host>Create the trust chain, TLS CA + cert, and NATS config (--listen, --ws-listen, --dir to customize)
c3sync hub runRun the embedded NATS + JetStream hub in the foreground
c3sync hub install | uninstall | statusRun the hub as a boot-time background service
c3sync hub mint-enroll [--out enroll.creds]Mint reusable enrollment credentials for new devices
c3sync hub revoke --device <user-pub>Cut one device's NATS credentials at the hub
c3sync hub backup [--out <file>]Seal the hub trust chain under the master passphrase (offline recovery)
c3sync hub restore [--in <file>]Promote this device to hub admin from a sealed backup
c3sync hub export | import <archive>Pack / unpack the portable serving bundle (config, public JWT, TLS files — never secrets or message data)
c3sync hub control …Enroll and manage C3 Mobile phones and C3 Bridge hosts — see the mobile hub reference
c3sync hub tls renew-leafRotate the serving certificate under the same CA (pin unchanged)
c3sync hub tls rotate-ca --confirm-re-enroll-allReplace the CA entirely; every phone/bridge re-enrolls

Configuration

~/.c3sync/config.json (0600):

KeyMeaning
handleYour identity; names the enrollment rendezvous
modemanaged (embedded hub) or external (bring-your-own NATS)
nats_urlWhere the daemon dials the hub
tls_pinSHA-256 pin of the hub certificate
epochCurrent tenant-secret generation (bumped by rekey/revoke)
keystoreauto (OS keyring) or file (encrypted file backend)
git_ssh_keyOptional pinned SSH identity for auto-pull fetches
node_idHLC tiebreak identity — generated once; never hand-edit

Environment variables

VariableEffect
C3SYNC_HOMEOverride the config root (default ~/.c3sync)
C3SYNC_KEYSTORE_FILEForce the encrypted-file keystore backend
C3SYNC_KEYRING_PASSWORDPassword for the file keystore (required with it; no default)
C3SYNC_DEBUGVerbose daemon logging
C3SYNC_POLL_INTERVAL, C3SYNC_DISCOVERY_INTERVALDaemon timer tuning

c3sync daemon install snapshots these into the service's private env file, so headless keystore settings survive reboots.