Skip to main content

Gemini AI CLI Tool for automation

Project description

Gemini CLI Helper

A command-line interface (CLI) tool that acts as a wrapper around the official Gemini CLI, adding useful features for managing accounts, backups, and rate limits.

Features

  • Account Management: Log in and out of your Gemini account.
  • Backup and Restore: Create local or cloud-based backups of your Gemini configuration and restore them when needed.
  • Rate Limit Tracking: Keep track of API rate limits to avoid interruptions.
  • Automated Updates: Check for and install updates to the underlying Gemini CLI.

Installation

This tool is not yet published to PyPI. To install it, you would typically use pip:

pip install .

Commands

General Commands

  • geminiai --login: Log in to your Gemini account.
  • geminiai --logout: Log out of your Gemini account.
  • geminiai --update: Check for and install updates to the underlying Gemini CLI.

Rate Limit Management

  • geminiai --add "<time> [email]": Manually add a rate limit reset time. The email is optional.
    • Example: geminiai --add "1:00 PM"
    • Example: geminiai --add "13:00 myemail@example.com"
  • geminiai --list: List all saved rate limit reset times.
  • geminiai --next [email|id]: Show the next upcoming reset time for a specific account or all accounts.
  • geminiai --remove <id|email>: Remove a saved rate limit entry.

Backup and Restore

Local Backups

  • geminiai backup: Create a local backup of your Gemini configuration (~/.gemini). Backups are stored as timestamped .tar.gz files in a local directory (default: ~/geminiai_backups).
  • geminiai restore: Restore your Gemini configuration from a local backup. By default, it restores from the oldest available backup archive.
    • geminiai restore --from-archive <path/to/archive.tar.gz>: Restore from a specific archive file.
    • geminiai restore --from-dir <path/to/directory>: Restore from a specific uncompressed backup directory.
  • geminiai list-backups: List all available local backups.
  • geminiai check-integrity: Check the integrity of your current configuration against the latest backup.

Cloud Backups (Backblaze B2)

This tool integrates with Backblaze B2 for cloud-based backups and restores.

Configuration:

You need to provide your Backblaze B2 credentials. You can do this in two ways:

  1. Environment Variables (Recommended):

    export B2_APPLICATION_KEY_ID='YOUR_KEY_ID'
    export B2_APPLICATION_KEY='YOUR_APP_KEY'
    export B2_BUCKET_NAME='your-b2-bucket-name'
    
  2. Command-Line Arguments: You can also provide your credentials directly in the command line:

    • --b2-id <YOUR_KEY_ID>
    • --b2-key <YOUR_APP_KEY>
    • --bucket <YOUR_BUCKET_NAME>

Usage:

  • geminiai check-b2: Verify Backblaze B2 credentials and bucket access.
  • geminiai backup --cloud: Create a local backup and upload it to your B2 bucket.
  • geminiai restore --cloud: Restore your configuration from the oldest backup archive stored in your B2 bucket.
  • geminiai list-backups --cloud: List available backups in your B2 bucket.

Cloud Synchronization

This feature ensures consistency between your local backup repository and your Backblaze B2 bucket by only adding missing files, without overwriting existing data.

  • geminiai cloud-sync: Uploads any local .tar.gz backup archives that are missing from your configured Backblaze B2 bucket.
  • geminiai local-sync: Downloads any .tar.gz backup archives from your Backblaze B2 bucket that are missing from your local backup directory.

Usage Examples

1. Create a local backup:

geminiai backup

2. Restore from the oldest local backup:

geminiai restore

3. Create a cloud backup to Backblaze B2:

(Assuming environment variables are set)

geminiai backup --cloud

4. Restore from a cloud backup on Backblaze B2:

(Assuming environment variables are set)

geminiai restore --cloud

5. List available local backups:

geminiai list-backups

6. Verify Backblaze B2 credentials:

(Assuming environment variables are set)

geminiai check-b2

7. List available cloud backups:

(Assuming environment variables are set)

geminiai list-backups --cloud

8. Synchronize local backups to the cloud:

(Assuming environment variables are set)

geminiai cloud-sync

9. Synchronize cloud backups to local storage:

(Assuming environment variables are set)

geminiai local-sync

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-4.0.0.tar.gz (48.5 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-4.0.0-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for geminiai_cli-4.0.0.tar.gz
Algorithm Hash digest
SHA256 bc95d2f8c4cb07951e4358f23015d96e532b83230443099426ea3c5a2c9557e0
MD5 14f9cf995ae9eaee657c334bcc35f017
BLAKE2b-256 a6572f023454ee5f054eaf0c9b865640fda48ec4e8a2aa5893a671e38ded91b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for geminiai_cli-4.0.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-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: geminiai_cli-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.2 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-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7914d9a617fd2e9fa7822093ef276e770101ee7c6057d7fc86daaacacfc696f
MD5 a4056578bde4ea50d7e388dbdfb9db2e
BLAKE2b-256 94953dd3b4c7faa9863f6a428785d07e171c4b67ce42c2979176a08375cedf4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for geminiai_cli-4.0.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