Thanks to visit codestin.com
Credit goes to lib.rs

#git #profile

app git-profiles-cli

A CLI tool to switch between private and work user profiles

3 stable releases

Uses new Rust 2024

1.0.2 Feb 25, 2026
1.0.1 Oct 13, 2025
1.0.0 Sep 16, 2025

#1033 in Command line utilities

MIT license

12KB
224 lines

git-profiles-cli

A CLI tool to switch between private and work user profiles or other git profiles

Crates.io Version

Technologies used

  • Rust
  • Cargo
  • Git

Installation Methods

1. Installing from Crates.io

cargo install git-profiles-cli

2. Installing from a Git repository

cargo install --git https://github.com/MikAoJk/git-profiles-cli git-profiles-cli

Using the cli

Add a profile

git-profiles-cli add <name> --user <user.name> --email <user.email>
# Example:
git-profiles-cli add work --user "Work Name" --email work@example.com

List all profiles

git-profiles-cli list

Switch to a profile

git-profiles-cli switch <name>
# Example:
git-profiles-cli switch work

View current user

git-profiles-cli current

Remove a profile

git-profiles-cli remove <name>

Where are profiles stored?

Profiles are stored in a config file at this location:

  • Linux/macOS: ~/.config/git-profiles-cli/config.toml

Local development Prerequisites

Rust

Make sure you have the correct rust installed, see: Installing Rust The version of rust used in this project could be found here: Cargo.toml To verify the version of rust installed, run the following command:

rustc --version

Cargo

Make sure you have cargo installed using this command:

Note: installing Rust using rustup will also install cargo

cargo --version

Git

Make sure you have git installed using this command:

git --version

Build code

Build the code without running it

cargo build

Run the cli

Run the cli

cargo run

Dependencies

~1.4–4MB
~73K SLoC