git-accounts
v1.0.2
Published
CLI para administrar múltiples cuentas de GitHub en Windows usando keytar. Permite agregar, listar, eliminar y seleccionar cuentas cambiando automáticamente la configuración global de Git.
Maintainers
Readme
Git Accounts CLI
Git Accounts CLI is a command-line tool to manage multiple GitHub accounts using keytar.
It allows you to add, list, select, edit, export, and delete GitHub accounts easily, and automatically configures Git for commits and pushes.
✨ Features
- ➕ Add GitHub accounts with username, email, commit name/email, and personal access token (PAT)
- 📋 List all saved accounts with details in a clean format
- ✏️ Edit accounts field by field, with save/cancel options
- 💾 Export accounts to JSON
- 🔄 Use an account to configure
git config --global user.nameanduser.email - 🗑️ Delete accounts interactively with confirmation
- 📘 Tutorial built-in, with Continue option
- ❌ Always possible to go back to the Main Menu or cancel safely
- 🔒 Safe handling of secrets using keytar
- 🌍 Works on Windows, macOS, and Linux
📦 Installation
Install globally using npm:
npm install -g git-accounts🚀 Usage
You can use the CLI in two ways:
1. Interactive menu
git-accountsYou'll see a menu:
📌 Select an action:
- ➕ Add Account
- 📋 List Accounts
- 🔄 Use Account
- 🗑️ Delete Account
- 📘 Tutorial
- ❌ Exit2. Oneline commands
# Add a new account
git-accounts add <githubUser> <githubEmail> <commitName> <commitEmail> <token>
# List saved accounts
git-accounts list
# Use/select an account
git-accounts use
# Delete an account
git-accounts delete <githubUser>👉 If you omit some arguments in add, the CLI will prompt you interactively.
🖥️ Example
git-accounts add FT-Key [email protected] "Franco Toledo" [email protected] ghp_yourPAT
git-accounts list
git-accounts use
git-accounts delete FT-Key💡 Tips
- For commit configuration (
user.nameanduser.email), press Enter to reuse your GitHub credentials. - You can always select ⬅️ Back to Main Menu or Cancel.
- Press Ctrl+C anytime to safely exit interactive prompts.
🤝 Contributing
Contributions are welcome! Feel free to:
- Report issues
- Suggest improvements
- Submit pull requests
👤 Author
Franco Nicolas Toledo
- GitHub: https://github.com/FT-Key
- LinkedIn: https://www.linkedin.com/in/ftkey
- Email: [email protected]
📄 License
MIT License © Franco Nicolas Toledo
