3 unstable releases
new 0.2.0 | Apr 29, 2025 |
---|---|
0.1.1 | Apr 28, 2025 |
0.1.0 | Apr 28, 2025 |
#2254 in Command line utilities
92 downloads per month
43KB
999 lines
smartui - Smart Utility Uses Google's Gemini API
A command-line utility that integrates with Google's Gemini API to provide various AI-powered features.
Features
- Command explanation
- Text summarization
- Translation
- Code explanation
- And more!
Installation
Prerequisites
- Rust toolchain (install from rustup.rs)
- Google Gemini API key (get it from Google AI Studio)
From Source
-
Clone the repository:
git clone https://github.com/monzeromer-lab/smartui.git cd smartui
-
Build the release version:
cargo build --release
-
Install the binary:
-
Linux/macOS:
sudo cp target/release/smartui /usr/local/bin/
-
Windows:
copy target\release\smartui.exe C:\Windows\System32\
-
Using Cargo
cargo install smartui
Linux/macOS
-
Download the latest release from the releases page
-
Extract the archive:
tar -xzf smartui-linux-x86_64.tar.gz # for Linux tar -xzf smartui-macos-x86_64.tar.gz # for macOS
-
Move the binary to your PATH:
sudo mv smartui /usr/local/bin/
Windows
- Download the latest release from the releases page
- Extract the zip file
- Move
smartui.exe
to a directory in your PATH (e.g.,C:\Windows\System32\
)
Configuration
Set your Gemini API key as an environment variable:
# Linux/macOS
export GEMINI_API_KEY=your_api_key_here
# Windows
set GEMINI_API_KEY=your_api_key_here
Or create a .env
file in your home directory:
GEMINI_API_KEY=your_api_key_here
Usage
# Explain a command
smartui explain "ls -la"
# Summarize text from a file
smartui summarize --file document.txt
# Translate text
smartui translate "Hello, world!" --to fr
# For more commands and options
smartui --help
Building from Source
Requirements
- Rust 1.70 or later
- Cargo
- Git
Steps
-
Clone the repository
-
Build in release mode:
cargo build --release
-
The binary will be in
target/release/smartui
Cross-compilation
To build for different platforms:
# Linux
cargo build --release --target x86_64-unknown-linux-gnu
# Windows
cargo build --release --target x86_64-pc-windows-gnu
# macOS
cargo build --release --target x86_64-apple-darwin
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~8–21MB
~292K SLoC