Status: concept only. The CLI is not implemented yet.
Undo any coding-agent run.
Coding agents can change dozens of files before you know whether their approach is good. Codesync gives each run a reliable repository restore point:
codesync run -- codexReview everything the agent changed:
codesync diff lastIf the run went wrong, restore the exact state from before it started:
codesync undo lastA careful developer can create a stash or WIP commit before every agent run. Codesync makes that boundary automatic.
It records the repository before and after the agent process, including:
- staged changes;
- unstaged changes;
- non-ignored untracked files;
- the split between staged and unstaged work;
- the agent command, version, duration, and exit status.
The workflow is one transaction:
run → review → keep or undo
Codesync is local-only. It does not move the current branch, push source code, require an account, run a background service, or depend on an editor extension.
# Run any CLI agent with an automatic restore point
codesync run -- codex
codesync run -- opencode
codesync run -- pi
# Inspect recorded runs
codesync runs
codesync diff <run>
# Restore the state from before a run
codesync undo <run>
# Create a manual restore point
codesync checkpoint [name]Codesync will use:
- Go for the CLI and process lifecycle;
- the user's installed
gitexecutable for repository operations; - Git objects and private references for checkpoint data;
- small JSON manifests for run metadata;
- the Go standard library unless a tested platform boundary requires a dependency.
Codesync will not embed libgit2 or another Git implementation. Using the system Git keeps checkpoint and restore behavior consistent with the repository's existing attributes, filters, Git LFS configuration, worktrees, and ignore rules.
The first release will be a local Go binary that requires Git. It will not need a database, background daemon, server, or account.
Codesync protects Git repository state. It is not a security sandbox.
It does not reverse commands that affect databases, remote services, credentials, ignored files, or paths outside the repository.