Skip to main content

Git Checkpoints

🔄 Zero-config, language-agnostic Git snapshots via tags.

Tests PR Check License Version


🚀 Installation

Option 1: NPM Package

npm install -g git-checkpoints

Option 2: Python Package

pip install git-checkpoints

Option 3: Bash Script (One-Line Install)

curl -LsSf https://raw.githubusercontent.com/moussa-m/git-checkpoints/main/install.sh | bash

Both methods:

  • Install git-checkpoints into your PATH
  • Add git checkpoint / git checkpoints aliases in this repo
  • Schedule auto-snapshot every 5 minutes when changes exist (configurable)

❌ One-Line Uninstall

git-checkpoints uninstall

Removes the global CLI and all cron entries.


💻 Usage

Git aliases (in your repo)

git checkpoint [name]      # create a checkpoint
git checkpoints list       # list all checkpoints
git checkpoints delete *   # delete one or all
git checkpoints load <name># restore a checkpoint

Direct CLI

git-checkpoints create [name]
git-checkpoints list
git-checkpoints delete <name|*>
git-checkpoints load <name>
git-checkpoints auto
git-checkpoints pause              # pause auto-checkpointing
git-checkpoints resume             # resume auto-checkpointing
git-checkpoints config <get|set>   # manage configuration
git-checkpoints local-uninstall
git-checkpoints uninstall

⚙️ Configuration

Control auto-checkpointing behavior with the config command:

git-checkpoints config get                    # show all settings
git-checkpoints config get interval           # show current interval
git-checkpoints config get status             # show current status
git-checkpoints config set interval 10        # set interval to 10 minutes

Available options:

  • interval - Auto-checkpoint interval in minutes (default: 5)
  • status - Current status: paused or running

Examples:

# Set checkpoints every 15 minutes
git-checkpoints config set interval 15
git-checkpoints resume  # apply new interval

# Check current configuration
git-checkpoints config get
# Output:
# ℹ️ Current configuration:
#   interval: 15 minutes
#   status: running

🧪 Testing & Development

This project includes a comprehensive test suite that runs automatically on GitHub Actions.

Running Tests Locally

# Run all tests
cd tests
./run_all_tests.sh

# Run specific test categories
./unit_tests.sh                                    # Unit tests
./integration_test.sh                              # GitHub integration tests
./test_scenarios/basic_workflow_test.sh            # Workflow tests
./test_scenarios/cron_auto_checkpoint_test.sh      # Cron job tests
./test_scenarios/cron_seconds_test.sh              # 10-second interval tests

# Clean up test artifacts
./cleanup_all_tests.sh

Test Coverage

  • Unit Tests: Individual function testing
  • Integration Tests: Real GitHub repository creation and management
  • Workflow Tests: Typical development scenarios
  • Cron Tests: Automatic checkpoint functionality with various intervals
  • Installation Tests: Complete installation process verification

GitHub Actions

The project uses GitHub Actions for continuous integration:

  • Full Test Suite: Runs on push to main branch
  • PR Quick Check: Fast tests for pull requests
  • Seconds Interval Test: Extended testing with 10-second intervals (triggered by test-seconds label)

Prerequisites for Local Testing

  • Git
  • GitHub CLI (gh) with authentication
  • Bash 4.0+
  • crontab (optional, for cron tests)

🛠 Troubleshooting

  • git-checkpoints not found? Ensure your install dir (e.g. ~/.local/bin) is in $PATH.

  • No snapshots?

    • Check uncommitted changes: git status
    • Trigger one manually: git checkpoint
  • Cron not running?

    • Verify service: systemctl status cron
    • Check crontab: crontab -l | grep git-checkpoints

Enjoy effortless, zero-config backups of your work-in-progress!

Metadata

Release files for git-checkpoints 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-checkpoints 2.0.3
File Size Uploaded Provenance Actions
git_checkpoints-2.0.3.tar.gz 13.4 kB Without provenance Details for git_checkpoints-2.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-checkpoints 2.0.3
File Interpreter ABI Platform Actions
git_checkpoints-2.0.3-py3-none-any.whl Python 3 none any Details for git_checkpoints-2.0.3-py3-none-any.whl

Total release size: 25.8 kB

Release files / git_checkpoints-2.0.3.tar.gz

Download URL git_checkpoints-2.0.3.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dc524ca172f82a98ba8091eb402d955320ee32da0e6b58aa7b38c32d50c89034
BLAKE2b-256 checksum
How to use checksums
e5c0eeb23e6e0299c85392c6be8ac4cf0be7a679a984dcf661676c16b8e66cb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.9

Release files / git_checkpoints-2.0.3-py3-none-any.whl

Download URL git_checkpoints-2.0.3-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
930e4db9a012cf2125f6fa059b808f9f42cfed6415ee21f4a519ff8099efb3e7
BLAKE2b-256 checksum
How to use checksums
63749d6d895c662aef80833c607cfb56df50293869f3fc9b7d3d2dd978af4f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.9

Security for git-checkpoints 2.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page