Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Checkpoint CLI

Overview

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.

Installation

To use Checkpoint CLI, save the script and make it executable:

chmod +x checkpoint.py

You can also move it to a directory in your $PATH for easier access:

mv checkpoint.py /usr/local/bin/ck

Now, you can use it with ck.

Usage

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 directory

Commands

  • ck <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.

Examples

Creating a checkpoint

ck -n myproject

This saves the current directory as myproject.

Navigating to a checkpoint

ck myproject

This changes the directory to the saved myproject checkpoint.

Listing all checkpoints

ck -l

Displays all saved checkpoints and their associated directories.

Deleting a checkpoint

ck -d myproject

Removes the myproject checkpoint from the stored list.

Checking the current directory

ck -c

Outputs the full path of the current working directory.

Notes

  • 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.

License

This project is licensed under the MIT License.

About

A cli to navigate between folders by checkpoints

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages