Skip to main content

Gemini AI CLI Tool for automation

Project description

geminiai-cli logo

PyPI version Python Wheel Release

Build status Codecov Test Coverage Code style: black Ruff Security

Downloads PyPI Downloads OS Python Versions

License: MIT

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 .

Usage Example

Get up and running immediately by backing up your current configuration:

# Run a local backup
geminiai backup

# 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.
  • 🩺 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: Easily clear temporary chat history and logs.
  • 🔄 Automated Updates: Check for and install updates to the underlying tools.

⚙️ 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. --cloud, --bucket, --b2-id, --b2-key
restore Restore configuration from backup. --from-dir, --cloud, --force
cloud-sync Sync local backups to Cloud (B2). --bucket, --b2-id, --b2-key
local-sync Sync Cloud backups to local. --bucket, --b2-id, --b2-key
list-backups List available backups. --cloud, --search-dir
prune Delete old backups. --keep, --cloud, --cloud-only
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
resets Manage free tier reset schedules. --list, --next, --add, --remove
cooldown Show account cooldown status. --cloud
cleanup Clear temp files and logs. --force, --dry-run
doctor Run system diagnostics.

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
├── credentials.py     # Credential Resolution (Env, Doppler, Config)
├── backup.py          # Backup Logic
├── restore.py         # Restore Logic
├── sync.py            # Cloud/Local Sync Logic
├── resets_helpers.py  # Reset Schedule Management
├── doctor.py          # Diagnostic Tools
└── ...

🗺️ Roadmap

  • Account Management: Seamless login/logout.
  • Cloud Backups: Backblaze B2 integration.
  • Resets & Cooldowns: Smart rate limit management.
  • Multi-Cloud Support: AWS S3, Google Cloud Storage.
  • Interactive Config: Wizard-style setup.
  • GUI: A graphical interface for common tasks.

🤝 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geminiai_cli-6.1.0.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geminiai_cli-6.1.0-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file geminiai_cli-6.1.0.tar.gz.

File metadata

  • Download URL: geminiai_cli-6.1.0.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geminiai_cli-6.1.0.tar.gz
Algorithm Hash digest
SHA256 606547601555acaef62950dc3ebde7d628e0d441bb2e6ebb1ba6f6cf9ac231bd
MD5 558f0e115fe5c5f11b7b4e3332db3188
BLAKE2b-256 c1c02ff3df169cacbf3183a2ce2000d3853a7cd4c497f3ef5f0fdb70de09d08d

See more details on using hashes here.

Provenance

The following attestation bundles were made for geminiai_cli-6.1.0.tar.gz:

Publisher: publish.yml on dhruv13x/geminiai-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geminiai_cli-6.1.0-py3-none-any.whl.

File metadata

  • Download URL: geminiai_cli-6.1.0-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geminiai_cli-6.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd2ed1127648929ef6678571950d5b8d6a432004518c2a807c41113271512ff0
MD5 79a4f5fbf934dfc2215a78821b1bfaa4
BLAKE2b-256 edfc99725cf1a57291075cd6cda7cd8007befba826cf27d7ea1ad93e29a110f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for geminiai_cli-6.1.0-py3-none-any.whl:

Publisher: publish.yml on dhruv13x/geminiai-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page