CXDIR - Shortcuts Manager

Project Overview: Have you ever found yourself typing long cd commands to navigate through deeply nested directories? If so, CXDIR is here to save you time and hassle. Inspired by tools like Zoxide, CXDIR is a lightweight shortcut manager written in shell script. It’s designed to streamline your workflow by allowing you to create, manage, and use directory shortcuts effortlessly.

Installation

Getting started with CXDIR is quick and easy. Follow these steps:

  1. Clone the Repository:
git clone https://github.com/bricekams/cxdir

or using Github CLI

gh repo clone bricekams/cxdir
  1. Run the installtion script
. install

That’s it! You’re ready to start using CXDIR.

Features

1. Create Shortcuts

Creating shortcuts with CXDIR is straightforward:

  • Current Directory Shortcut:
cx create

Note: If you don’t specify the <alias>, the shortcut will be created with the current directory name as alias by default.

  • Another directory:
cx create <alias> -p <path_to_directory>

Here, the -p or --path flag is used to determine the path of the shortcut.

2. Change directory using cxdir

cx <alias>

Yes, Just like that!

3. Update shortcut

If you want to change the path of a shortcut, you can do it using the update command. Here is how:

cx update

You will have the following prompt, enter the shortcut alias to proceed

You want to update the path of a shortcut
Enter the shortcut name:

After that you will get asked for the new path. Enter it to proceed

The current path is: /old/path
Enter the new path: 

Here you can pass relative path or value such as ~

4. Rename shortcuts

If you want to change a shortcut alias. It is very simple:

cx rename <current_alias> <new_alias>

5. Delete shortcuts

Deleting a shortcuts it’s as simple as creating it:

## be careful, this can't be reversed
cx delete <alias>

or if you want to delete every shortcuts: (be careful)

## be careful, this can't be reversed
cx delete -all # or -a

6. Listing all shortcuts

cx list

This command will print out an array of shortcuts with their alias and path, and the total amount of shortcuts existing.

cxdir - linux shortcuts manager - Brice Kamhoua

7. Help

If you need help about how to use cxdir or a specific command, you just has to ask for it by doing so:

  • General Help:
cx --help
  • Help for a specific command:
cx <command> --help

7. Uninstalling

If you want to uninstall this tool from your system:

cx uninstall

Platform

This tool has been created on Ubuntu 20.04 and will basically work on every Debian based OS. It is not yet available for other operating system. Feel free to contribute (see below)

License

This tool is available under the MIT License

Future Plans

CXDIR is currently a small evening project written in Shell, but I’m planning to rewrite it in Golang to improve performance and add more features. Stay tuned for updates!

Contribute

If you find CXDIR useful and want to contribute, feel free to clone the project and submit a pull request.

Thanks for reading, and happy shortcutting!