Skip to content
/ prof Public

A tool for organizing your bash profile into multiple files that can be imported and exported.

License

Notifications You must be signed in to change notification settings

blbynum/prof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prof - Bash Profile Manager

prof is a command-line tool for managing bash profiles. It allows you to organize and manage custom .bash_profile contents by creating and editing profiles, setting load order, exporting and importing profiles, and more.

Table of Contents

Installation

To install prof, you can follow these steps:

  1. Download the latest release of prof from the command line or from the GitHub release page.

    wget https://github.com/blbynum/prof/releases/download/v1.1.4/prof
    
  2. Make the prof file executable:

    chmod +x prof
  3. (Optional) Copy the prof file to a directory in your PATH to make it globally accessible:

    cp prof /usr/local/bin

Now you're ready to use prof!

Usage

To use prof, you can run the following command:

prof <command> [arguments]

For detailed information on available commands and their usage, you can refer to the Commands section below.

Commands

create <profile_name> <load_order>

Creates a new profile with the specified name and load order.

prof create <profile_name> <load_order>

edit <profile_name> [new_load_order]

Opens an existing profile in your preferred text editor for editing. Optionally, you can update the load order of the profile by providing a new load order as the second argument.

prof edit <profile_name> [new_load_order]

delete <profile_name>

Deletes an existing profile. This action is irreversible.

prof delete <profile_name>

list

Lists all available profiles along with their load order.

prof list

export <profile_name> <export_directory>

Exports a profile to the specified export directory.

prof export <profile_name> <export_directory>

import <profile_file> <load_order>

Imports a profile from the specified file with the specified load order.

prof import <profile_file> <load_order>

install [target_file]

Installs prof by adding the code to load profiles to the target file (~/.bash_profile by default).

prof install [target_file]

update (version 1.1.4 and later)

Updates prof to the latest version.

prof update

help

Displays the help message with information on available commands.

prof help

Examples

Here are some examples of how you can use prof:

  1. Create a new profile named "work" with a load order of 10:

    prof create work 10
  2. Edit an existing profile named "personal":

    prof edit personal
  3. Delete a profile named "old" (with confirmation prompt):

    prof delete old
  4. List all available profiles:

    prof list
  5. Export a profile named "dev" to the "~/exports" directory:

    prof export dev ~/exports
  6. Import a profile from a file named "myprofile" with a load order of 5:

    prof import myprofile 5
  7. Install prof by adding the code to load profiles to a custom target file:

    prof install ~/.bashrc
  8. Update prof to the latest version:

    prof update

For more details on each command and its usage, refer to the Usage section above.


Upgrading from v1.0.0

Upgrade Instructions:

  1. Download the latest release from the GitHub repository.
  2. Replace your existing prof file with the new version.
  3. Update your existing profiles to include the new loading message by running the following script:
    • Download the migration script from this link.
    • Open a terminal and navigate to the directory where you downloaded the script.
    • Make the script executable with the command: chmod +x profiles_migration_1.1.0.sh.
    • Run the script with the command: ./profiles_migration_1.1.0.sh.
    • The script will add the loading message to each existing profile that does not already contain it.

About

A tool for organizing your bash profile into multiple files that can be imported and exported.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages