Skip to main content

endjoy

Ctrl-Z for the filesystem

What is endjoy?

Endjoy is a command line program that allows you to restore all the files in a directory to the state they were in some time ago. Therefore, it allows you to revert modifications, deletions and creations of the files in the watched directory.
With this you can just try out any changes without fear, as you can always revert them with a single command.

Install

sudo pip install endjoy

Usage

ej start # Start recursively monitoring the working directory

# Modify/create/delete some files or directories...

ej revert 5m # Revert changes done in the last five minutes
ej revert 1h # Revert changes done in the last hour

ej checkpoint NAME # Checkpoint the current state of the directory
ej checkpoint # List all the stored checkpoints

# Modify some more files

ej revert NAME # Revert the directory to how it was when the checkpoint NAME was created

ej suicide # Stop monitoring the directory and delete all temporary files created

What makes endjoy different from git?

tl;dr: endjoy is git stash on steroids

The most important difference between git and endjoy is that the latter runs in the background whereas git doesn't, this means that:

  • Doesn't require setting explicit checkpoints as with git commit
  • Runs asynchronously, so you don't have to wait for git to finish
  • Doesn't require any action till you need to use it to restore a previous state

If you need complex functionality, like merging different commits/checkpoints or moving forward and backwards between them, git is a better choice, as endjoy is much simpler and doesn't implement that

Why is it called endjoy?

See https://battleangel.fandom.com/wiki/Endjoy

Development

Install from source (requires poetry):

# Optional
virtualenv --python=python3 venv
. venv/bin/activate
# Required
poetry install
# Run
ej
# Run tests
pytest

How does it work?

On start it spawns a process, that will act as the server, with two threads:

  • One thread subscribes to be notified of changes on all the directories especified via inotify and stores all the changes along with a timestamp in shared memory
  • Another thread creates a named pipe and listens on it, when endjoy is called again with another command this thread performs whatever command was issued using the data that has been gathered by the first thread (inotify one)

Authors

@luis136 and @corollari

License

The Unlicense

Release files for endjoy 1.0.0

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

Source distribution (sdist)

Source distribution for endjoy 1.0.0
File Size Uploaded
endjoy-1.0.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for endjoy 1.0.0
File Interpreter ABI Platform
endjoy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / endjoy-1.0.0.tar.gz

Download URL endjoy-1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
61811fc1e12fc74788861b79737b88a8e11913aaad39573dc88976817102bbae
BLAKE2b-256 checksum
How to use checksums
f12f9b3f89c0d7bb52d6c91ad79f5a68ade1b643d01329eb54e21fc40fdf68a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.16 CPython/3.7.1 Linux/4.15.0-1028-gcp

Release files / endjoy-1.0.0-py3-none-any.whl

Download URL endjoy-1.0.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0b33f139638f950c99170f0888f080eab25c5f446c3783a2cdd429d342c13a0
BLAKE2b-256 checksum
How to use checksums
6ff01bd1f1b3424abf5cd1f8e9b10e669d4686cf48b588a6f15b211f617feda1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.16 CPython/3.7.1 Linux/4.15.0-1028-gcp

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.9.0

2 release files

0.1.0

2 release files

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