Checkpoint CLI is a simple command-line tool that allows users to navigate directories efficiently using predefined checkpoints. It enables creating, listing, deleting, and navigating to checkpoints, making directory navigation seamless.
To use Checkpoint CLI, save the script and make it executable:
chmod +x checkpoint.pyYou can also move it to a directory in your $PATH for easier access:
mv checkpoint.py /usr/local/bin/ckNow, you can use it with ck.
ck [checkpoint_name] # Navigate to a checkpoint
ck -n <name> # Create a new checkpoint
ck -d <name> # Delete a checkpoint
ck -l # List all checkpoints
ck -c # Show current directoryck <name>: Navigate to a previously saved checkpoint.ck -n <name>: Save the current directory as a checkpoint with the given name.ck -d <name>: Delete the specified checkpoint.ck -l: List all stored checkpoints.ck -c: Show the current working directory.
ck -n myprojectThis saves the current directory as myproject.
ck myprojectThis changes the directory to the saved myproject checkpoint.
ck -lDisplays all saved checkpoints and their associated directories.
ck -d myprojectRemoves the myproject checkpoint from the stored list.
ck -cOutputs the full path of the current working directory.
- Checkpoints are stored in
~/.checkpoints.json. - If the file is corrupted, it will reset to an empty dictionary.
- The script automatically launches a new shell when navigating to a checkpoint.
This project is licensed under the MIT License.