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 (S3 or B2), 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,boto3,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
# Sync your backups to the cloud (Push to S3 or B2)
geminiai sync push
# Get the next best account recommendation
ga recommend
# Check your account cooldown status
ga cooldown
# Use a specific profile (e.g., work)
ga --profile work backup
# View all available commands
geminiai --help
โจ Key Features
- ๐ก๏ธ God Level Backups: Create local or Cloud-based backups (AWS S3 & Backblaze B2) of your Gemini configuration and chats.
- โ๏ธ Multi-Cloud Support: Native support for AWS S3 and Backblaze B2 for redundant cloud storage.
- ๐ Unified Cloud Sync: Seamlessly
pushandpullbackups between your local machine and the cloud. - ๐ค Configuration Profiles: Manage multiple environments (e.g., personal, work) with the
--profileflag andprofilecommand. - ๐ฌ Chat Management: Backup, restore, resume, and cleanup chat sessions and logs.
- ๐ง Smart Recommendation: Automatically switch to the best available account based on cooldowns and usage history.
- โฑ๏ธ 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 credentials via CLI, Environment Variables, or Doppler.
- โก Integrity Checks: Verify your configuration integrity against backups.
- ๐ Automated Updates: Built-in self-update mechanism.
- ๐ง Interactive Wizard: Guided setup process for easy configuration (
config --init).
โ๏ธ 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_AWS_ACCESS_KEY_ID |
Your AWS Access Key ID (for S3). |
GEMINI_AWS_SECRET_ACCESS_KEY |
Your AWS Secret Access Key (for S3). |
GEMINI_S3_BUCKET |
The name of your AWS S3 Bucket. |
GEMINI_S3_REGION |
The AWS Region (default: us-east-1). |
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, --dest-dir-parent, --cloud, --bucket, --dry-run |
restore |
Restore configuration from backup. | --from-dir, --from-archive, --search-dir, --cloud, --force, --auto |
sync |
Sync backups with Cloud (S3/B2). | push, pull, --backup-dir, --bucket, --b2-id, --b2-key |
chat |
Manage chat history. | backup, restore, cleanup (w/ --dry-run, --force), resume |
list-backups |
List available backups. | --cloud, --search-dir, --bucket |
prune |
Delete old backups. | --keep, --cloud, --cloud-only, --dry-run, --bucket |
check-integrity |
Verify configuration integrity. | --src |
check-b2 |
Verify B2 credentials. | --bucket, --b2-id, --b2-key |
config |
Manage persistent settings. | set, get, list, unset, --init, --force |
resets |
Manage free tier reset schedules. | --list, --next (w/ email/id), --add, --remove |
cooldown |
Show account cooldown status. | --cloud, --remove, --bucket |
recommend |
Suggest next best account. | (No arguments) (Alias: next) |
stats |
Show usage statistics. | (No arguments) (Alias: usage) |
profile |
Manage configuration profiles. | export, import (w/ --force) |
doctor |
Run system diagnostics. | (No arguments) |
Global Options
| Option | Description |
|---|---|
--profile <name> |
Specify a configuration profile to use (e.g., work). |
--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
โโโ cloud_factory.py # Cloud Provider Factory (S3/B2)
โโโ cloud_s3.py # AWS S3 Integration
โโโ b2.py # Backblaze B2 Integration
โโโ backup.py # Backup Logic
โโโ restore.py # Restore Logic
โโโ chat.py # Chat History Management
โโโ sync.py # Cloud/Local Sync Logic (Push/Pull)
โโโ recommend.py # Smart Account Recommendation
โโโ profile.py # Profile Import/Export Logic
โโโ stats.py # Visual Usage Statistics
โโโ integrity.py # Integrity Check Logic
โโโ prune.py # Backup Pruning Logic
โโโ doctor.py # System Diagnostics
โโโ cooldown.py # Cooldown Tracking
โโโ reset_helpers.py # Reset Schedule Management
๐บ๏ธ Roadmap
โ Completed
- Account Management: Seamless login/logout.
- Multi-Cloud Support: AWS S3 & Backblaze B2 integration.
- Unified Sync: Push and Pull backups seamlessly.
- Profiles: Support for multiple configuration profiles.
- Resets & Cooldowns: Smart rate limit management.
- Automated Updates: Self-updating mechanism.
- Health Checks: Doctor mode for diagnostics.
- Chat Management: Backup, restore, and cleanup capabilities.
- Smart Recommendations: Intelligent account switching.
- Interactive Config: Wizard-style setup.
๐ง Upcoming
- Google Cloud Storage Support: Native GCS integration.
- 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-13.0.0.tar.gz.
File metadata
- Download URL: geminiai_cli-13.0.0.tar.gz
- Upload date:
- Size: 97.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22228d0602504029fae7c8e7c51f6431a73d5a79b80d88bf0f7642afef2cb735
|
|
| MD5 |
d48c5d9bc194ff494de55a56577948f3
|
|
| BLAKE2b-256 |
c004f4dd7a22ff2f321e1a67f01f57c88bcb92e58f90ac8290202be8f0b56b19
|
Provenance
The following attestation bundles were made for geminiai_cli-13.0.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-13.0.0.tar.gz -
Subject digest:
22228d0602504029fae7c8e7c51f6431a73d5a79b80d88bf0f7642afef2cb735 - Sigstore transparency entry: 747686396
- Sigstore integration time:
-
Permalink:
dhruv13x/geminiai-cli@c1eca2f67a558baa00e8ba0a7c29a06c14ce664f -
Branch / Tag:
refs/tags/v13.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1eca2f67a558baa00e8ba0a7c29a06c14ce664f -
Trigger Event:
push
-
Statement type:
File details
Details for the file geminiai_cli-13.0.0-py3-none-any.whl.
File metadata
- Download URL: geminiai_cli-13.0.0-py3-none-any.whl
- Upload date:
- Size: 67.2 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 |
5829e9ccbd6dcbef16f4254de15fb4a127d0fca4034bfba64811730abfc90e6b
|
|
| MD5 |
ffb8add9894edfc21adf2d12c76336af
|
|
| BLAKE2b-256 |
eb234dcf393fa5a629cc66f73cae329bc46f9debc1f602f761096b0f6a84de17
|
Provenance
The following attestation bundles were made for geminiai_cli-13.0.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-13.0.0-py3-none-any.whl -
Subject digest:
5829e9ccbd6dcbef16f4254de15fb4a127d0fca4034bfba64811730abfc90e6b - Sigstore transparency entry: 747686397
- Sigstore integration time:
-
Permalink:
dhruv13x/geminiai-cli@c1eca2f67a558baa00e8ba0a7c29a06c14ce664f -
Branch / Tag:
refs/tags/v13.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1eca2f67a558baa00e8ba0a7c29a06c14ce664f -
Trigger Event:
push
-
Statement type: