Repository navigation
Cloud Sync
PiCode Cloud keeps your editor settings and your Pi profile in step across machines. It is the paid half of the plan; the program itself stays free and complete without it. Everything below is what the code actually does.
Sync is bidirectional and per resource: the engine pulls what changed on another machine, pushes what changed here, and merges when both sides moved.
| Resource | What it carries | Where it lives locally |
|---|---|---|
settings |
editor settings | data/user-data/User/settings.json |
keybindings |
keyboard shortcuts | data/user-data/User/keybindings.json |
snippets |
code snippets | data/user-data/User/snippets/ |
tasks |
build tasks | data/user-data/User/tasks.json |
prompts |
prompt templates | data/user-data/User/prompts/ |
mcp |
MCP servers | the MCP configuration |
extensions |
installed extensions | the editor's extension inventory |
globalState |
UI state (theme, last-used modelβ¦) | data/user-data/User/globalStorage |
profiles |
editor profiles | data/user-data/User/profiles/ |
piProfile |
Pi's own profile | data/pi-agent |
piProfile is the resource that makes PiCode different from plain settings sync:
it carries the agent harness β agents/, subagents/, skills/, memory/,
chains/, gentle-ai/ and specpi/, plus settings.json, models.json,
subagents.json, trust.json and mcp-adapter.json β as a bundle of files.
Merging is last-writer-wins per file; a file changed on both sides becomes one
whole-file conflict.
βββββββββββββββββ PiCode, on your machine (data/) βββββββββββββββββ
β settings Β· keybindings Β· snippets Β· tasks Β· prompts Β· mcp β
β extensions Β· UI state Β· editor profiles β data/user-data/β¦ β
β Pi profile (agents, skills, memory, modelsβ¦) β data/pi-agent β
β β
β βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β βΌ
β The native sync engine (VS Code's, in the background)
β Β· reads each resource
β Β· compares local vs remote vs the last synced base
β Β· uploads what changed, pulls and merges what changed away
ββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β HTTPS + your account token
βΌ
https://www.getpicode.app/api/v1/β¦
β
ββββββββββββββ΄ββββββββββββββ
βΌ βΌ
Firebase Auth π PiCode API (Vercel)
βwho are you?β Β· encrypts the content
Β· stores and serves it
Β· enforces the quota
β
βΌ
ποΈ Firestore (encrypted)
When it runs: on start-up, every five minutes, and whenever something changes β with a short debounce so a burst of edits becomes one sync.
-
Manifest β
users/{uid}/sync/manifest: the latest version of each resource and a running count of the bytes used. -
Content β
users/{uid}/sync/resources/{resource}/{version}: the content, already encrypted. -
Encryption β AES-256-GCM over the compressed content, server-side. The
client only ever exchanges plaintext; the API encrypts on write and decrypts on
read. The stored envelope is
picode-enc:v2:β¦. - Retention β the newest 20 revisions per resource.
- Quota β Free β 1 MB Β· Pro β 50 MB.
- Authentication β Firebase Auth through the PiCode Account provider; the engine's requests carry the account's bearer token.
- π
auth.jsonand its backups β credentials are machine-bound and are not part of the Pi profile bundle. - π«
sessions/,npm/,node_modules/,bin/,extensions/,tmp/,git/and caches inside the profile.
Conversation transcripts are backed up, not continuously synced, over their own resource:
~/.pi/agent/sessions/<project>/*.jsonl
β each file becomes its own opaque ref on the piSessionsBackup resource
β incremental by SHA-1: only files whose hash changed are uploaded
βΌ
cloud Β· a 7-day rolling window Β· a 45 MB soft ceiling
Β· deleting a transcript locally never deletes the cloud copy
It is driven by two commands: picode.backupSessions and
picode.restoreSessions (the latter asks for confirmation before writing back).
Everything above is designed around one idea: data/ is a portable profile.
Copying it moves a whole PiCode; deleting it yields a clean one. Cloud sync is
that same folder travelling between machines, with credentials left out and
everything else encrypted before it crosses the wire.
Related: Pi Inside Β· Distribution and Licensing Β· Architecture Β· Roadmap and Known State