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"
- Example:
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.gzfiles 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:
-
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'
-
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.
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
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-2.0.0.tar.gz.
File metadata
- Download URL: geminiai_cli-2.0.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acead9c8008970671fb87f40481a73e73b3cd5ddcead35f42a0b193e380a6807
|
|
| MD5 |
ec946677971830b7012d82497e6428c4
|
|
| BLAKE2b-256 |
eedeefa35dcd59aa17e59aac13b01406cf83bb6d496da9d97c320cd1e26906bd
|
Provenance
The following attestation bundles were made for geminiai_cli-2.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-2.0.0.tar.gz -
Subject digest:
acead9c8008970671fb87f40481a73e73b3cd5ddcead35f42a0b193e380a6807 - Sigstore transparency entry: 713211310
- Sigstore integration time:
-
Permalink:
dhruv13x/geminiai-cli@a9ba18989c2ff8a31336c6bed7cc01e1268fc4a8 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9ba18989c2ff8a31336c6bed7cc01e1268fc4a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file geminiai_cli-2.0.0-py3-none-any.whl.
File metadata
- Download URL: geminiai_cli-2.0.0-py3-none-any.whl
- Upload date:
- Size: 27.3 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 |
3edd5abef54e250b699636fb7b1da82ea4041456f709e5fc71041729ce72eab8
|
|
| MD5 |
4c96445eae1d0397a5447fdfe7c700d1
|
|
| BLAKE2b-256 |
9079fd7cdf978424e07204fbf42006154386378511458b144fa3d207fc5e7b04
|
Provenance
The following attestation bundles were made for geminiai_cli-2.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-2.0.0-py3-none-any.whl -
Subject digest:
3edd5abef54e250b699636fb7b1da82ea4041456f709e5fc71041729ce72eab8 - Sigstore transparency entry: 713211324
- Sigstore integration time:
-
Permalink:
dhruv13x/geminiai-cli@a9ba18989c2ff8a31336c6bed7cc01e1268fc4a8 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9ba18989c2ff8a31336c6bed7cc01e1268fc4a8 -
Trigger Event:
push
-
Statement type: