Metadata-Version: 2.4
Name: snapshot-cli
Version: 1.0.0
Summary: A lightweight project snapshot & versioning tool for developers.
Project-URL: Homepage, https://github.com/Sparkleeop/snapshot
Project-URL: Repository, https://github.com/Sparkleeop/snapshot
Project-URL: Issues, https://github.com/Sparkleeop/snapshot/issues
Author: Sparkleeop
License-Expression: MIT
License-File: LICENSE
Keywords: backup,cli,developer-tools,snapshot,versioning
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Version Control
Classifier: Topic :: System :: Archiving :: Backup
Requires-Python: >=3.10
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# Snapshot

Snapshot is a lightweight code snapshotting tool that allows you to save and restore your entire project at any point in time.

Think of it as a simpler alternative to Git when you just want quick save points without branches, commits, remotes, or repositories.

## Features

* Save snapshots of your entire project
* Restore previous snapshots at any time
* Ignore files and directories using `.snapignore`
* View snapshot history
* View detailed snapshot information
* Clean restore mode for exact project restoration
* Rich terminal interface

## Installation

### From PyPI

```bash
pip install snapshot-cli
```

### From source (development)

```bash
git clone https://github.com/Sparkleeop/snapshot.git
cd snapshot
pip install -e .
```

This installs the `snap` command globally in your environment.

## Usage

Initialize Snapshot in your project root:

```bash
snap init
```

Create a snapshot:

```bash
snap save "before authentication rewrite"
```

List all snapshots, you can also find <snap id> here:

```bash
snap list
```

View information about a snapshot:

```bash
snap info <snap id>
```

Restore a snapshot:

```bash
snap restore <snap id>
```

Perform a clean restore (removes existing project files before restoring):

```bash
snap restore <snap id> --clean
```

Perform a restore to the latest snap:

```bash
snap restorelatest <--clean>
```

Delete a snapshot:

```bash
snap del <snap id>
```

Get the overall project statistics:

```bash
snap stats
```

## .snapignore

Use a `.snapignore` file in your project root to exclude files and directories from snapshots.

Example:

```text
.env
venv
__pycache__
node_modules
```

## Publishing to PyPI

Build and publish:

```bash
pip install build twine
python -m build
twine upload dist/*
```

## Roadmap

* [ ] Compare snapshots (`snap diff <id1> <id2>`)
* [ ] Snapshot export/import
* [ ] Automatic snapshots
* [ ] Head snapshot