Skip to main content

ZIP snapshots and smart diffing.

Project description

NoGit

PyPI version Python versions License

ZIP snapshots + smart diff.

NoGit watches your working directory and creates ZIP snapshots automatically or manually. No commits, no branches, no rebases. Just timestamped ZIPs and a readable diff.


Installation

pip install nogit

Or with pipx:

pipx install nogit

Commands

nogit or nogit backups

Lists snapshots for the current directory. Offers to launch a diff or restore.

nogit snapshot

Creates a full ZIP snapshot of the current directory (manual mode only).

Before creating the ZIP, nogit scans the directory and displays a summary. If the directory is detected as dangerous (system root, too many files, too high in the tree), a confirmation is required.

In non-interactive mode (pipe, AI agent), dangerous snapshots are automatically blocked. To confirm explicitly:

nogit snapshot --yes

Some directories are unconditionally forbidden (/tmp, /home, %USERPROFILE%, C:\Windows, etc.) — --yes does not bypass them.

nogit automatic

Enables the watcher — monitors the directory and creates an incremental snapshot on every detected change. Launches a dedicated terminal with live logs. A full snapshot is created on startup.

The watcher uses st_mtime + SHA-256 to detect real changes and avoid false positives (auto-save, restore, etc.).

nogit manual

Disables the watcher and switches back to manual snapshot mode.

nogit backups --global

Lists all NoGit projects registered on the machine. Automatically cleans up projects whose directory has been deleted.

nogit backups --external

Configures an external backup folder (second drive, NAS...). Snapshots are automatically copied there after each creation.

nogit diff <snap1> <snap2>

Compares two ZIP snapshots. If either snapshot is incremental, automatically reconstructs the full state from the chain before comparing.

The oldest snapshot is always used as the reference (A), the most recent as the target (B). So added means "appeared over time", deleted means "disappeared over time".

Generates a folder in .nogit/diff/:

.nogit/diff/
  2026-05-23T01_vs_2026-05-23T02/
    diff.txt              — human-readable global report
    summary.json          — index of changed files (for AI)
    my_file.diff.json     — detailed hunks per modified file

nogit restore <number>

Restores the project from a snapshot (the number matches the order shown in nogit backups). If the snapshot is incremental, automatically walks the chain back to the last full snapshot. Verifies MD5 hashes of binary files and reports divergences.

Restore can also be launched directly from nogit backups by choosing r.


Directory Structure

project/
  .nogit/
    snapshots/                          — timestamped ZIPs (full or incremental)
    diff/
      snap_a_vs_snap_b/                 — one folder per diff run
        diff.txt                        — human-readable report
        summary.json                    — index of changed files
        my_file.py.diff.json            — hunks per modified file
  .nogitignore                          — files/folders excluded from snapshots

The .nogit folder follows the project — it can be shared or copied as-is.


Snapshots

Full — contains all project files (created by nogit snapshot or at nogit automatic startup).

Incremental — contains only files modified since the last snapshot (created by the watcher in automatic mode).

Each ZIP contains a nogit.meta.json indicating its type (full or incremental).

Binary files and files > 10 MB are not included in the ZIP — a .meta.json with their size and MD5 is stored instead.


Global Registry

NoGit maintains a global registry of projects at %USERPROFILE%\.nogit\registry.json (or ~/.nogit/registry.json on Linux/macOS). This file is automatically synced to the external backup if configured.


External Backup

When an external folder is configured via nogit backups --external, the following structure is created:

external_folder/
  .nogitbackups/
    configs/
      registry.json       — copy of the global registry
    ProjectName_abc123/
      snapshots/          — copies of the ZIPs

License

Copyright (c) 2026 Mehdi.A — distributed under the GNU AGPL v3 license.


Credits

MIME types dataset based on micnic/mime.json by Nicu Micleușanu, modified to include missing programming language extensions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nogit-0.3.1.tar.gz (49.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nogit-0.3.1-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file nogit-0.3.1.tar.gz.

File metadata

  • Download URL: nogit-0.3.1.tar.gz
  • Upload date:
  • Size: 49.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for nogit-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2c7458a89f87e43bec673af9b16c1959b234aa4bc2662445b05ceb1262e46ce1
MD5 b37f0aefde265ba116decc9fb6238981
BLAKE2b-256 0374cd8bc38626d0727818ae63641c7e5558eeaa0bd7eae2304ecc2e47ab1344

See more details on using hashes here.

File details

Details for the file nogit-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: nogit-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for nogit-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4642fee3ecd8638aec79169f473606d4eb173a11c6f7866d29df322073f7b72a
MD5 aa5243123eb8fdf28da901a5f216048e
BLAKE2b-256 cb0fbb92970411bb9b433896f08c6c69b47622ed1e3fbaa4c688eaad0aa48d55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page