Gemini AI CLI Tool for automation
Project description
Gemini AI Automation Tool
The Swiss Army Knife for Gemini AI Automation - Backups, Cloud Sync, and Account Management.
About
geminiai-cli is a powerful, "batteries-included" command-line interface designed to supercharge your Gemini AI experience. Whether you need to manage multiple accounts, ensure your configuration is safely backed up to the cloud, or track your free tier usage to avoid rate limits, this tool has you covered. It wraps complex operations into simple, memorable commands.
🚀 Quick Start
Prerequisites
- Python: 3.8 or higher
- Dependencies:
b2sdk,rich(installed automatically)
One-Command Installation
pip install geminiai-cli
# Or from source
pip install .
Usage Example
Get up and running immediately. You can use geminiai, geminiai-cli, or the shorthand ga.
# Run a local backup
geminiai backup
# Check your account cooldown status
ga cooldown
# View all available commands
geminiai --help
✨ Key Features
- 🛡️ God Level Backups: Create local or Cloud-based (Backblaze B2) backups of your Gemini configuration and chats.
- ☁️ Cloud Sync: Seamlessly synchronize your backups between your local machine and the cloud.
- ⏱️ Resets Management: Track your Gemini free tier reset schedules to maximize usage without hitting limits.
- ❄️ Cooldown Tracking: Monitor account cooldown status to avoid rate limiting.
- 📈 Visual Usage Stats: Visualize usage patterns over the last 7 days.
- 🩺 Doctor Mode: Run a system diagnostic check to identify and fix issues.
- 🔐 Credential Management: Securely handle Backblaze B2 credentials via CLI, Environment Variables, or Doppler.
- 🧹 Cleanup & Pruning: Automatically prune old backups and clear temporary files to save space.
- 🔄 Automated Updates: Built-in self-update mechanism.
- ⚡ Integrity Checks: Verify your configuration integrity against backups.
⚙️ Configuration & Advanced Usage
Environment Variables
You can configure credentials using .env files, environment variables, or Doppler. The priority order is: CLI Args > Doppler > Env Vars > .env file > Saved Config.
| Variable | Description |
|---|---|
GEMINI_B2_KEY_ID |
Your Backblaze B2 Application Key ID. |
GEMINI_B2_APP_KEY |
Your Backblaze B2 Application Key. |
GEMINI_B2_BUCKET |
The name of your Backblaze B2 Bucket. |
DOPPLER_TOKEN |
Token for fetching secrets from Doppler. |
CLI Commands
| Command | Description | Key Arguments |
|---|---|---|
backup |
Backup configuration and chats. | --src, --archive-dir, --cloud, --bucket, --dry-run |
restore |
Restore configuration from backup. | --from-dir, --from-archive, --cloud, --force, --dry-run |
cloud-sync |
Sync local backups to Cloud (B2). | --backup-dir, --bucket, --b2-id, --b2-key |
local-sync |
Sync Cloud backups to local. | --backup-dir, --bucket, --b2-id, --b2-key |
list-backups |
List available backups. | --cloud, --search-dir, --bucket |
prune |
Delete old backups. | --keep, --backup-dir, --cloud, --cloud-only, --dry-run |
check-integrity |
Verify configuration integrity. | --src, --search-dir |
check-b2 |
Verify B2 credentials. | --bucket, --b2-id, --b2-key |
config |
Manage persistent settings. | set, get, list, unset, --force |
resets |
Manage free tier reset schedules. | --list, --next, --add, --remove |
cooldown |
Show account cooldown status. | --cloud, --remove, --bucket |
cleanup |
Clear temp files and logs. | --force, --dry-run |
doctor |
Run system diagnostics. | (No arguments) |
Global Options
| Option | Description |
|---|---|
--login |
Login to Gemini CLI. |
--logout |
Logout from Gemini CLI. |
--session |
Show current active session. |
--update |
Reinstall/update Gemini CLI. |
--check-update |
Check for updates. |
🏗️ Architecture
The project is structured as a modular Python CLI application using argparse for command handling and rich for the UI.
src/geminiai_cli/
├── cli.py # Main Entry Point & Argument Parsing
├── backup.py # Backup Logic
├── restore.py # Restore Logic
├── sync.py # Cloud/Local Sync Logic
├── b2.py # Backblaze B2 Integration
├── credentials.py # Credential Management
├── doctor.py # System Diagnostics
├── cooldown.py # Cooldown Tracking
└── resets_helpers.py # Reset Schedule Management
🗺️ Roadmap
✅ Completed
- Account Management: Seamless login/logout.
- Cloud Backups: Backblaze B2 integration.
- Resets & Cooldowns: Smart rate limit management.
- Automated Updates: Self-updating mechanism.
- Health Checks: Doctor mode for diagnostics.
🚧 Upcoming
- Multi-Cloud Support: AWS S3, Google Cloud Storage.
- Interactive Config: Wizard-style setup.
- Enhanced TUI: Rich dashboards and real-time progress bars.
- Webhooks: Integration with Slack/Discord for alerts.
- AI-Driven Anomaly Detection: Smart backup analysis.
🤝 Contributing & License
Contributions are welcome! Please submit a pull request or open an issue on the GitHub repository.
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geminiai_cli-8.1.0.tar.gz.
File metadata
- Download URL: geminiai_cli-8.1.0.tar.gz
- Upload date:
- Size: 76.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95edee190902843f1c48bd8e46f185458617cec191af9997747b8c804b04c841
|
|
| MD5 |
8e346ad4b540d570bc10b6724bd17123
|
|
| BLAKE2b-256 |
e6ecce8ab8a36b626f1508a9894bf05428ea8f8e17ff67f11aef669897e32d51
|
Provenance
The following attestation bundles were made for geminiai_cli-8.1.0.tar.gz:
Publisher:
publish.yml on dhruv13x/geminiai-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geminiai_cli-8.1.0.tar.gz -
Subject digest:
95edee190902843f1c48bd8e46f185458617cec191af9997747b8c804b04c841 - Sigstore transparency entry: 732228831
- Sigstore integration time:
-
Permalink:
dhruv13x/geminiai-cli@ec783456e59b536a3c22891799e3ce24b8989db6 -
Branch / Tag:
refs/tags/v8.1.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec783456e59b536a3c22891799e3ce24b8989db6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file geminiai_cli-8.1.0-py3-none-any.whl.
File metadata
- Download URL: geminiai_cli-8.1.0-py3-none-any.whl
- Upload date:
- Size: 56.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a3891a46ddbb235de46984e795dc874ef5c5c6a8423a8e16b333aaf3a58bc4a
|
|
| MD5 |
be3c2b4df1fd44725c4575c0446e3abe
|
|
| BLAKE2b-256 |
4ff60aef9d0b636068b7dbca8aa3c5097804d0fe58ccaa78020cc2eec220e2fa
|
Provenance
The following attestation bundles were made for geminiai_cli-8.1.0-py3-none-any.whl:
Publisher:
publish.yml on dhruv13x/geminiai-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geminiai_cli-8.1.0-py3-none-any.whl -
Subject digest:
4a3891a46ddbb235de46984e795dc874ef5c5c6a8423a8e16b333aaf3a58bc4a - Sigstore transparency entry: 732228833
- Sigstore integration time:
-
Permalink:
dhruv13x/geminiai-cli@ec783456e59b536a3c22891799e3ce24b8989db6 -
Branch / Tag:
refs/tags/v8.1.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec783456e59b536a3c22891799e3ce24b8989db6 -
Trigger Event:
push
-
Statement type: