2 unstable releases
new 0.2.0 | Mar 2, 2025 |
---|---|
0.1.0 | Feb 2, 2025 |
#852 in Operating systems
123 downloads per month
23KB
536 lines
UserKit
UserKit is a comprehensive command-line interface (CLI) tool built in Rust for simplifying user management across different operating systems. It provides a consistent interface for common user management tasks that are typically scattered across various commands with different syntaxes.
Features
- User account management (add, remove, modify, list, info)
- Interactive shell sessions
- Multiple output formats (Table, JSON, CSV)
- Cross-platform compatibility (in development)
Installation
Using Cargo
If you have Rust and Cargo installed, you can install UserKit directly from crates.io:
cargo install userkit
From Source
- Ensure you have Rust and Cargo installed
- Clone the repository:
git clone https://github.com/pavi2410/userkit.git cd userkit
- Build and install:
cargo install --path .
Usage
UserKit follows a consistent command structure:
userkit <domain> <action> [options]
Examples
-
List all users in table format:
userkit user list --format table
-
Add a new user:
userkit user add username --home-dir /home/username
-
Get detailed information about a user:
userkit user info username
-
Start a shell session:
userkit user shell --username username
-
Execute a command as another user:
userkit user shell --username username "command"
Development
Prerequisites
- Rust (latest stable)
- Cargo
Setup
- Clone the repository
- Install dependencies:
cargo build
- Run tests:
cargo test
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
References
Dependencies
~5MB
~95K SLoC