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.1.tar.gz (48.6 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.1-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geminiai_cli-4.0.1.tar.gz
  • Upload date:
  • Size: 48.6 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.1.tar.gz
Algorithm Hash digest
SHA256 b6710e41d8f76fa5c8ffe7670a1f8844560947cf504556ffc91c5cdd773cb86b
MD5 d4d4f469207020e02dacf5ef0890760f
BLAKE2b-256 3d2e3ca16b95aab89b92cbf4950db361730d8530ceaf5599fbbca01aa5d064d1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: geminiai_cli-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 526d0021a7833fa1e285ef4cd3e133709528c7eff7e14e7376c0995c3a595ecd
MD5 fed32086782682d860fade0fc49c5e44
BLAKE2b-256 a872fcb0f87fba8e45d56e3ea8d2f7c16b873312b460113ac303c2e80602b1d4

See more details on using hashes here.

Provenance

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