reinstate

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: Apache-2.0

README

Reinstate session continuity across devices

Reinstate

Continue supported coding-agent sessions on another configured device

Reinstate is an open-source tool that syncs encrypted Claude Code and Codex sessions between configured devices using your own S3-compatible storage. The stable v0.1.0 release preserves same-vendor native resume across macOS and Windows project paths.

The broader direction is a continuity layer for coding-agent work: local search, verified resume, explicit portable handoffs, and universal non-secret agent configuration are planned after Phase 1. They are not current CLI capabilities.

License Go Report Card Release CI Go PRs Welcome Contributor Covenant Security Policy

GitHub stars GitHub forks GitHub watchers GitHub issues GitHub pull requests GitHub contributors GitHub last commit GitHub commit activity GitHub repo size Downloads

Why · Features · Quick start · Agents · How it works · Docs · Roadmap · Contributing

Created & maintained by Harjot Singh Rana · harjot.co


The problem

You grind eight hours on your Windows desktop across Claude Code, Codex, with more agents planned after Phase 1… twenty sessions, four projects, full context.

You open your MacBook on the couch.

Git has the code. The agent does not have the conversation — the rejected approaches, the files already read three times, the style constraints you established mid-thread. Vendor tools save sessions locally. Switching machines is context death.

flowchart LR
  subgraph Desktop["🖥️ Desktop (Windows)"]
    D["20 sessions<br/>full context"]
  end
  subgraph Laptop["💻 Laptop (macOS)"]
    L["empty history<br/>MCP + skills B<br/>start from zero"]
  end
  D -.-x|context dies| L
  style D fill:#1f2937,stroke:#f87171,color:#f9fafb
  style L fill:#1f2937,stroke:#f87171,color:#f9fafb

Reinstate makes state portable:

flowchart LR
  subgraph Desktop["🖥️ Desktop"]
    A["Claude/Codex sessions"]
  end
  subgraph Cloud["☁️ Encrypted cloud"]
    B["your R2 / S3-compatible bucket<br/>ciphertext only"]
  end
  subgraph Laptop["💻 Laptop"]
    C["resume · same IDs"]
  end
  A -->|push · age E2E| B
  B -->|pull · remap paths| C
  style A fill:#064e3b,stroke:#34d399,color:#ecfdf5
  style B fill:#0c4a6e,stroke:#22d3ee,color:#e0f2fe
  style C fill:#312e81,stroke:#818cf8,color:#e0e7ff

Why Reinstate?

What you get
Multi-agent Claude Code and Codex same-vendor session continuity in Phase 1
Offline-capable origin Works when the other machine is off (stored sync, not a live relay)
Path remapping Windows ↔ macOS project paths rewritten so --resume actually finds sessions
Zero-knowledge Client-side encryption; bring-your-own storage
Sessions first Phase 1 deliberately excludes credentials, MCP, skills, and settings; universal configuration is later roadmap work
Open source Apache-2.0 · auditable · patent grant · no vendor lock-in

Native vendor sync typically serves its own ecosystem. Unreviewed Syncthing/Drive copies can preserve source-device absolute paths or include sensitive artifacts. Reinstate instead provides Claude/Codex same-vendor × cross-device × encrypted × path-aware continuity.


Features

  • Cross-device session sync — continue the same agent thread on another machine
  • Multi-agent adapters — Claude Code, Codex, with more agents planned after Phase 1 (phased)
  • End-to-end encryptionage, passphrase-derived keys
  • Bring-your-own storage — Cloudflare R2, AWS S3, and S3-compatible storage
  • OS-aware path remapping — the hard problem treated as the product
  • Safe by default — credential denylist, atomic restore, conflict forks, local backups
  • Simple CLIrein init · push · pull · status · diff · conflicts (rein is the short alias; reinstate is the full command — same binary)

Later, Reinstate will extend continuity beyond sessions: declare MCP servers, skills, hooks/loops, plugins, marketplaces, instruction files, and safe settings once, then preview and apply the correct native configuration across Claude Code, Codex, Grok, OpenCode, Gemini CLI, and multiple devices. This is planned, not part of the current CLI. See Universal agent configuration.


Quick start

Note: the v0.1 CLI surface below is implemented and the native two-device Phase 1 acceptance has passed on real macOS and Windows hardware. The commands below pin the published stable release v0.1.0.

CLI: prefer short alias rein. Full name reinstate works the same.

Install

macOS, Linux, or WSL2:

curl -fsSL https://reinstate.dev/install.sh | sh

Native Windows PowerShell:

irm https://reinstate.dev/install.ps1 | iex

Both bootstraps pin and verify v0.1.0, install without elevation, and print the next command:

rein version --json
rein init

Reinstate waits at most 30 seconds for replacement approval; set REINSTATE_CONFIRM_TIMEOUT_SECONDS=1..300 to choose a shorter or longer bound. Shells without timed-read support refuse immediately and preserve the installed binary. For deliberate automation, review the version change first and set REINSTATE_CONFIRM_REPLACE=1.

Device A
rein init --project github.com/acme/app=/absolute/path/to/app
rein list --agent AGENT
rein push --agent AGENT --session SESSION_ID --dry-run
rein push --agent AGENT --session SESSION_ID

Use the S3/R2 service endpoint as the endpoint and enter the bucket separately. Reinstate refuses to overwrite an initialized home by default. The explicit --force path backs up prior config and state together before replacement.

Device B
rein init --profile-id <DEVICE_A_PROFILE_ID> \
  --project github.com/acme/app=/different/local/path
rein status
rein pull --agent AGENT --session SESSION_ID --dry-run
rein pull --agent AGENT --session SESSION_ID
# Then use the same vendor's native resume UI or command.

Reinstate verifies the encrypted remote manifest during additional-device init before saving local configuration. Require status to show the expected sessions after setup.

Full walkthrough: docs/getting-started.md


Supported agents

Agent Sessions Universal config target Status
Claude Code 📋 Sessions: Phase 1
OpenAI Codex CLI 📋 Sessions: Phase 1
Gemini CLI 📋 📋 Later phase
OpenCode 📋 📋 Later phase
Grok Build 📋 📋 Later phase

Details: docs/adapters.md


How it works

flowchart TB
  subgraph Agents["Coding agents on disk"]
    CC[Claude Code]
    CX[Codex]
    GM[Gemini CLI]
    OC[OpenCode]
  end
  subgraph Pipeline["Reinstate"]
    AD[Adapters]
    NM[Normalize paths]
    EN[Encrypt · age]
    SY[Sync engine · manifest]
  end
  BK[(Your bucket<br/>R2 / S3-compatible)]
  Agents --> AD --> NM --> EN --> SY
  SY <-->|ciphertext only| BK
  SY -->|pull · decrypt · remap · atomic restore| Agents
  1. Adapters read each tool’s local session layout
  2. Pathmap rewrites absolute paths to portable tokens and back
  3. Crypto encrypts before any upload
  4. Sync uses a local manifest; restores are atomic with backups

Deep dive: docs/architecture.md · research diagram:

Reinstate architecture


Security

Guarantee Detail
E2E encryption Ciphertext only on remote storage
Credential denylist auth.json and tokens never synced by default
No vendor API keys required Local files only
Fail-safe restore Backups + conflict forks

Report vulnerabilities privately: SECURITY.md · model: docs/security-model.md


Documentation

Doc Description
Website reinstate.dev — product, documentation, compatibility, and security
Getting started Install, init, dual-device setup
Architecture Pipeline, packages, design principles
Adapters Per-agent layouts & support matrix
Universal configuration Planned MCP/skills/loops/plugins/settings portability
Security model Threat model & defaults
Comparison vs native sync, claude-sync, DIY
FAQ Common questions
Troubleshooting Path remap, conflicts, large histories
Roadmap Phases & non-goals
Contributing Dev setup & PR process
Releasing Maintainer release checklist
Support How to get help
Governance Decision making
Changelog Release history

Project activity

Star history

Star History Chart

↗ Open interactive star history · Stargazers

Contributors

Contributors

Category context

Category traction context

Insights
Metric Link
Pulse pulse
Traffic graphs/traffic
Commits graphs/commit-activity
Code frequency graphs/code-frequency
Network network
Stars stargazers · star-history

Roadmap

Phase Focus Status
0 Contracts, diagnostics, installers, fixtures, release trust 🚧
1 Claude + Codex encrypted same-vendor session sync 🚧
2–4 Local index, verified resume, portable handoffs 📋
5–7 Universal config + automatic sync, thin Console/ACP client, teams 📋 / 💭

Full detail: ROADMAP.md


Stable releases

Channel Tag Notes
Latest Release Stable builds, once published
Pre-release Pre-release Early adopters
SemVer pre-1.0 Breaking changes possible in minors — see CHANGELOG

Install from GitHub Releases. Every published release must include checksums, SBOMs, a source archive, and an artifact attestation.


Maintainers

Lead Harjot Singh Rana (@HarjjotSinghh)
Site harjot.co
X @HarjjotSinghh

See MAINTAINERS.md · AUTHORS · CODEOWNERS


Contributing

Contributions are welcome — code, adapters, docs, and bug reports.

  1. Read CONTRIBUTING.md and the Code of Conduct
  2. Open an issue for larger changes
  3. Fork → branch → PR
make deps && make test && make build

Good first issues: good first issue


Community & support


Citation

If you use Reinstate in research or publications:

@software{rana_reinstate_2026,
  author = {Rana, Harjot Singh},
  title  = {Reinstate: Encrypted multi-agent session sync for AI coding tools},
  year   = {2026},
  url    = {https://github.com/HarjjotSinghh/reinstate},
  license = {Apache-2.0}
}

Also see CITATION.cff.


License

Licensed under the Apache License, Version 2.0 © 2026 Harjot Singh Rana.

Copyright 2026 Harjot Singh Rana

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

See NOTICE for third-party acknowledgements. Product names of third-party agents are trademarks of their respective owners; Reinstate is an independent project and is not affiliated with or endorsed by those vendors.


Work on desktop. Resume on laptop. Keep the context.

Star this repo

Built with ☕ in New Delhi · Open source forever

Directories

Path Synopsis
cmd
reinstate command
Command reinstate is the CLI entrypoint for Reinstate — encrypted multi-agent session sync for AI coding tools.
Command reinstate is the CLI entrypoint for Reinstate — encrypted multi-agent session sync for AI coding tools.
internal
adapter
Package adapter defines the interface every agent adapter implements.
Package adapter defines the interface every agent adapter implements.
adapter/claude
Package claude implements the Claude Code session adapter.
Package claude implements the Claude Code session adapter.
adapter/codex
Package codex implements the OpenAI Codex CLI session adapter.
Package codex implements the OpenAI Codex CLI session adapter.
backend
Package backend defines remote object storage for Reinstate.
Package backend defines remote object storage for Reinstate.
backend/memory
Package memory is an in-process Backend for tests.
Package memory is an in-process Backend for tests.
backend/s3
Package s3 implements Backend using AWS SDK v2 against S3-compatible APIs (R2).
Package s3 implements Backend using AWS SDK v2 against S3-compatible APIs (R2).
cli
Package cli implements the Reinstate command-line interface.
Package cli implements the Reinstate command-line interface.
config
Package config loads and saves Reinstate local configuration (backend credentials paths, scopes, path_map, excludes).
Package config loads and saves Reinstate local configuration (backend credentials paths, scopes, path_map, excludes).
credentials
Package credentials stores remote access secrets outside config files.
Package credentials stores remote access secrets outside config files.
crypto
Package crypto implements client-side encryption for Reinstate (age + scrypt).
Package crypto implements client-side encryption for Reinstate (age + scrypt).
device
Package device detects OS, architecture, and WSL environment.
Package device detects OS, architecture, and WSL environment.
doctor
Package doctor produces redacted diagnostics and synthetic self-tests.
Package doctor produces redacted diagnostics and synthetic self-tests.
exitcode
Package exitcode defines stable Reinstate process exit codes.
Package exitcode defines stable Reinstate process exit codes.
fixture
Package fixture validates synthetic adapter fixtures for secret leakage.
Package fixture validates synthetic adapter fixtures for secret leakage.
fsx
Package fsx provides filesystem helpers (atomic write, permissions, backup).
Package fsx provides filesystem helpers (atomic write, permissions, backup).
lock
Package lock provides local mutation locking for push/pull.
Package lock provides local mutation locking for push/pull.
pathmap
Package pathmap rewrites absolute paths to portable tokens and back.
Package pathmap rewrites absolute paths to portable tokens and back.
processcheck
Package processcheck detects supported coding-agent processes before restore.
Package processcheck detects supported coding-agent processes before restore.
project
Package project derives canonical project identity.
Package project derives canonical project identity.
schema
Package schema defines versioned Reinstate data contracts.
Package schema defines versioned Reinstate data contracts.
sync
Package sync implements the push/pull engine, local manifest, and conflicts.
Package sync implements the push/pull engine, local manifest, and conflicts.
version
Package version holds build-time version metadata.
Package version holds build-time version metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL