# Git Checkpoints
๐ **Zero-config, language-agnostic Git snapshots via tags.**
[](https://github.com/Moussa-M/git-checkpoints-public/actions/workflows/test.yml)
[](https://github.com/Moussa-M/git-checkpoints-public/actions/workflows/pr-check.yml)
[](LICENSE)
[](https://github.com/Moussa-M/git-checkpoints-public/releases)
---
## ๐ Installation
### Option 1: NPM Package
```bash
npm install -g git-checkpoints
```
### Option 2: Python Package
```bash
pip install git-checkpoints
```
### Option 3: Bash Script (One-Line Install)
```bash
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
```bash
git-checkpoints uninstall
```
Removes the global CLI **and** all cron entries.
---
## ๐ป Usage
### Git aliases (in your repo)
```bash
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
```bash
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:
```bash
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:**
```bash
# 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
```bash
# 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!
Raw data
{
"_id": null,
"home_page": "https://github.com/moussa-m/git-checkpoints",
"name": "git-checkpoints",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "git version-control checkpoints snapshots tags backup",
"author": "Moussa Mokhtari",
"author_email": "me@moussamokhtari.com",
"download_url": "https://files.pythonhosted.org/packages/e5/c0/eeb23e6e0299c85392c6be8ac4cf0be7a679a984dcf661676c16b8e66cb8/git_checkpoints-2.0.3.tar.gz",
"platform": null,
"description": "\n# Git Checkpoints\n\n\ud83d\udd04 **Zero-config, language-agnostic Git snapshots via tags.**\n\n[](https://github.com/Moussa-M/git-checkpoints-public/actions/workflows/test.yml)\n[](https://github.com/Moussa-M/git-checkpoints-public/actions/workflows/pr-check.yml)\n[](LICENSE)\n[](https://github.com/Moussa-M/git-checkpoints-public/releases)\n\n---\n\n## \ud83d\ude80 Installation\n\n### Option 1: NPM Package\n\n```bash\nnpm install -g git-checkpoints\n```\n\n### Option 2: Python Package\n\n```bash\npip install git-checkpoints\n```\n\n### Option 3: Bash Script (One-Line Install)\n\n```bash\ncurl -LsSf https://raw.githubusercontent.com/moussa-m/git-checkpoints/main/install.sh | bash\n```\n\nBoth methods:\n* Install `git-checkpoints` into your `PATH`\n* Add `git checkpoint` / `git checkpoints` aliases in **this** repo\n* Schedule auto-snapshot every 5 minutes when changes exist (configurable)\n\n---\n\n## \u274c One-Line Uninstall\n\n```bash\ngit-checkpoints uninstall\n```\n\nRemoves the global CLI **and** all cron entries.\n\n---\n\n## \ud83d\udcbb Usage\n\n### Git aliases (in your repo)\n\n```bash\ngit checkpoint [name] # create a checkpoint\ngit checkpoints list # list all checkpoints\ngit checkpoints delete * # delete one or all\ngit checkpoints load <name># restore a checkpoint\n```\n\n### Direct CLI\n\n```bash\ngit-checkpoints create [name]\ngit-checkpoints list\ngit-checkpoints delete <name|*>\ngit-checkpoints load <name>\ngit-checkpoints auto\ngit-checkpoints pause # pause auto-checkpointing\ngit-checkpoints resume # resume auto-checkpointing\ngit-checkpoints config <get|set> # manage configuration\ngit-checkpoints local-uninstall\ngit-checkpoints uninstall\n```\n\n---\n\n## \u2699\ufe0f Configuration\n\nControl auto-checkpointing behavior with the config command:\n\n```bash\ngit-checkpoints config get # show all settings\ngit-checkpoints config get interval # show current interval\ngit-checkpoints config get status # show current status\ngit-checkpoints config set interval 10 # set interval to 10 minutes\n```\n\n**Available options:**\n- `interval` - Auto-checkpoint interval in minutes (default: 5)\n- `status` - Current status: `paused` or `running`\n\n**Examples:**\n```bash\n# Set checkpoints every 15 minutes\ngit-checkpoints config set interval 15\ngit-checkpoints resume # apply new interval\n\n# Check current configuration\ngit-checkpoints config get\n# Output:\n# \u2139\ufe0f Current configuration:\n# interval: 15 minutes\n# status: running\n```\n\n---\n\n## \ud83e\uddea Testing & Development\n\nThis project includes a comprehensive test suite that runs automatically on GitHub Actions.\n\n### Running Tests Locally\n\n```bash\n# Run all tests\ncd tests\n./run_all_tests.sh\n\n# Run specific test categories\n./unit_tests.sh # Unit tests\n./integration_test.sh # GitHub integration tests\n./test_scenarios/basic_workflow_test.sh # Workflow tests\n./test_scenarios/cron_auto_checkpoint_test.sh # Cron job tests\n./test_scenarios/cron_seconds_test.sh # 10-second interval tests\n\n# Clean up test artifacts\n./cleanup_all_tests.sh\n```\n\n### Test Coverage\n\n- **Unit Tests**: Individual function testing\n- **Integration Tests**: Real GitHub repository creation and management\n- **Workflow Tests**: Typical development scenarios\n- **Cron Tests**: Automatic checkpoint functionality with various intervals\n- **Installation Tests**: Complete installation process verification\n\n### GitHub Actions\n\nThe project uses GitHub Actions for continuous integration:\n\n- **Full Test Suite**: Runs on push to main branch\n- **PR Quick Check**: Fast tests for pull requests\n- **Seconds Interval Test**: Extended testing with 10-second intervals (triggered by `test-seconds` label)\n\n### Prerequisites for Local Testing\n\n- Git\n- GitHub CLI (`gh`) with authentication\n- Bash 4.0+\n- crontab (optional, for cron tests)\n\n---\n\n## \ud83d\udee0 Troubleshooting\n\n* **`git-checkpoints` not found?**\n Ensure your install dir (e.g. `~/.local/bin`) is in `$PATH`.\n* **No snapshots?**\n\n * Check uncommitted changes: `git status`\n * Trigger one manually: `git checkpoint`\n* **Cron not running?**\n\n * Verify service: `systemctl status cron`\n * Check crontab: `crontab -l | grep git-checkpoints`\n\nEnjoy effortless, zero-config backups of your work-in-progress!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Zero-config, language-agnostic Git snapshots via tags",
"version": "2.0.3",
"project_urls": {
"Bug Reports": "https://github.com/moussa-m/git-checkpoints/issues",
"Homepage": "https://github.com/moussa-m/git-checkpoints",
"Source": "https://github.com/moussa-m/git-checkpoints"
},
"split_keywords": [
"git",
"version-control",
"checkpoints",
"snapshots",
"tags",
"backup"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "63749d6d895c662aef80833c607cfb56df50293869f3fc9b7d3d2dd978af4f45",
"md5": "0808f1611db90c47a2106cb1390f8a4f",
"sha256": "930e4db9a012cf2125f6fa059b808f9f42cfed6415ee21f4a519ff8099efb3e7"
},
"downloads": -1,
"filename": "git_checkpoints-2.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0808f1611db90c47a2106cb1390f8a4f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 12335,
"upload_time": "2025-07-10T02:16:54",
"upload_time_iso_8601": "2025-07-10T02:16:54.795047Z",
"url": "https://files.pythonhosted.org/packages/63/74/9d6d895c662aef80833c607cfb56df50293869f3fc9b7d3d2dd978af4f45/git_checkpoints-2.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e5c0eeb23e6e0299c85392c6be8ac4cf0be7a679a984dcf661676c16b8e66cb8",
"md5": "42bbad159bd3ff3e197cfe87bc7a4605",
"sha256": "dc524ca172f82a98ba8091eb402d955320ee32da0e6b58aa7b38c32d50c89034"
},
"downloads": -1,
"filename": "git_checkpoints-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "42bbad159bd3ff3e197cfe87bc7a4605",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 13422,
"upload_time": "2025-07-10T02:16:56",
"upload_time_iso_8601": "2025-07-10T02:16:56.313642Z",
"url": "https://files.pythonhosted.org/packages/e5/c0/eeb23e6e0299c85392c6be8ac4cf0be7a679a984dcf661676c16b8e66cb8/git_checkpoints-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 02:16:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "moussa-m",
"github_project": "git-checkpoints",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "git-checkpoints"
}