Crash, reset, or accidentally delete your project.
Back up AI-generated code before you lose it.
AICodeBackup is an AI code backup CLI that protects local projects by creating private GitHub recovery points before a crash, reset, or long AI coding session leaves important work unprotected.
npm install -g aicodebackup@alpha
- Private by default
- Works on Windows and macOS
AI code is fragile.Losing it is easy.
AI tools do not save your code for you.
Scattered files and versions create confusion.
Public repos or cloud syncs leak sensitive code.
Four simple steps.
Create or connect GitHub once. Back up from the terminal after that.
AICodeBackup checks Git and GitHub CLI, then installs missing tools when possible so the first backup does not depend on manual setup notes.
New users can create a GitHub account. Existing users can sign in. GitHub authorization is handled in the default browser and stays under the user's own account.
Your project is backed up to a private GitHub repository by default, giving each useful milestone a remote recovery point.
Use watch mode to detect risky AI coding sessions, large file changes, or stale backup age before work is left unprotected.
Commands that protect the full loop.
Setup, backup, restore, health checks, and risk monitoring for AI-built projects.
aicodebackup setup
Initial setup. Installs requirements, connects GitHub, and creates your private repository with the right remote origin.
aicodebackup backup
Save your current project. Commits, pushes changes to GitHub, and leaves a clear recovery point outside the local folder.
aicodebackup doctor
Check backup health, repo status, authentication, remote configuration, and whether the latest local work is protected.
aicodebackup watch
Monitor changed files, diff size, and backup age. Use --auto to back up when risk thresholds are reached.
aicodebackup restore
List recent remote backups or restore into a new folder outside the current project without overwriting local work.
Built for Windows and macOS.
A smooth setup on the platforms you use every day.
Setup attempts Git and GitHub CLI installation through winget when tools are missing.
View Windows guideSetup uses Homebrew when available and starts a secure browser login to GitHub.
View macOS guideBackup guides for AI coding tools.
Start with the pages that match your editor or coding workflow.
Add private GitHub recovery points to Cursor projects and AI-generated changes.
Read guide Back up Claude Code projectsProtect broad Claude Code edits with private GitHub backups and health checks.
Read guide Back up Codex projectsCreate recovery points before a productive Codex session disappears.
Read guide GitHub backup without GitUse GitHub as a private safety layer without learning Git commands first.
Read guide Back up AI-generated codeProtect projects created with AI coding tools before local work disappears.
Read guide Restore AI-generated codeRecover a private GitHub checkpoint into a new folder before copying files back.
Read guide GitHub backup for vibe codersUse private GitHub backups without turning a fast AI build into Git homework.
Read guideFrequently asked questions.
Do I need to know Git?
No. AICodeBackup wraps Git setup, commits, and pushes behind simple commands.
Do I need a GitHub account?
Yes. If you do not have one, setup opens GitHub signup. After sign-in, GitHub asks you to authorize the local GitHub CLI before AICodeBackup can create your private repository.
Is my code really private?
Yes. The setup flow creates GitHub repositories as private by default.
Where is my code stored?
Your code is stored in your own private GitHub repository, not on an AICodeBackup-hosted code storage service.
When should I run a backup?
Run a backup after a working feature, before risky cross-file AI edits, and before ending a long coding session.
What happens if I uninstall?
Your GitHub repository and backups stay in your GitHub account.
Is AICodeBackup free?
The alpha CLI is free and open source under the MIT License.