git-profiles-cli

Crates.iogit-profiles-cli
lib.rsgit-profiles-cli
version1.0.1
created_at2025-09-16 15:01:33.706327+00
updated_at2025-10-13 15:16:12.251318+00
descriptionA CLI tool to switch between private and work user profiles
homepage
repositoryhttps://github.com/MikAoJk/git-profiles-cli
max_upload_size
id1841895
size26,281
Joakim Taule Kartveit (MikAoJk)

documentation

README

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
Commit count: 36

cargo fmt