CLI Reference
Complete command reference for grove-gemini.
grove-gemini
Usage: grove-gemini [command]
Available Commands: cache Manage the local cache of Gemini contexts completion Generate the autocompletion script for the specified shell config Manage grove-gemini configuration count-tokens Count tokens for a given text using Gemini API help Help about any command query Query Gemini API usage, metrics, and billing data from Google Cloud request Make a request to Gemini API with grove-context support version Print the version information for this binary
Flags: -c, —config string Path to grove.yml config file -h, —help help for grove-gemini —json Output in JSON format -v, —verbose Enable verbose logging
Use “grove-gemini [command] —help” for more information about a command.
grove-gemini request
This command works similarly to grove-flow’s oneshot executor:
- Uses .grove/rules to generate context if available
- Manages cold context caching automatically
- Includes hot context as dynamic files
- Supports custom cache TTL and directives from rules file
Examples:
Simple prompt
grove-gemini request -p “Explain the main function”
From file
grove-gemini request -f prompt.md
With specific model and output file
grove-gemini request -m gemini-2.0-flash -f prompt.md -o response.md
Regenerate context before request
grove-gemini request —regenerate -p “Review the codebase architecture”
Force recreation of cache
grove-gemini request —recache -p “Review the codebase architecture”
Use a specific cache
grove-gemini request —use-cache 53f364cda78e82a8 -p “Review using old context”
With custom working directory
grove-gemini request -w /path/to/project -p “Analyze this project”
Usage: grove-gemini request [flags]
Flags: —cache-ttl string Cache TTL (e.g., 1h, 30m, 24h) (default “5m”) —context strings Additional context files to include -f, —file string Read prompt from file -h, —help help for request —max-output-tokens int32 Maximum tokens in response (-1 to use default) (default -1) -m, —model string Gemini model to use (default “gemini-2.0-flash”) —no-cache Disable context caching -o, —output string Write response to file instead of stdout -p, —prompt string Prompt text —recache Force recreation of the Gemini cache —regenerate Regenerate context before request —temperature float32 Temperature for randomness (0.0-2.0, -1 to use default) (default -1) —top-k int32 Top-k sampling (-1 to use default) (default -1) —top-p float32 Top-p nucleus sampling (0.0-1.0, -1 to use default) (default -1) —use-cache string Specify a cache name (short hash) to use for this request, bypassing automatic selection -w, —workdir string Working directory (defaults to current) -y, —yes Skip cache creation confirmation prompt
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini cache
Usage: grove-gemini cache [command]
Available Commands: clear Clear caches from Google’s servers (default: remote-only) inspect Show detailed information about a specific cache list List all caches with both local and API status prune Mark expired caches as cleared and optionally clean up tui Launch the interactive cache management TUI
Flags: -h, —help help for cache
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
Use “grove-gemini cache [command] —help” for more information about a command.
grove-gemini cache clear
Usage: grove-gemini cache clear [cache-name…] | —all [flags]
Flags: —all Clear all caches in the current project -h, —help help for clear —preserve-local Don’t update local cache files at all —with-local Also remove local cache files (default: mark as cleared)
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini cache inspect
Usage: grove-gemini cache inspect [cache-name] [flags]
Flags: -h, —help help for inspect
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini cache list
Usage: grove-gemini cache list [flags]
Flags: —api-only Show only caches from Google’s API servers -h, —help help for list —local-only Show only local cache information
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini cache prune
Usage: grove-gemini cache prune [flags]
Flags: -h, —help help for prune —remove-local Remove local cache files instead of marking them
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini cache tui
Usage: grove-gemini cache tui [flags]
Flags: -h, —help help for tui
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query
Usage: grove-gemini query [command]
Available Commands: billing Query Gemini API billing data from BigQuery dashboard Interactive dashboard for GCP billing data visualization explore Explore available logs for Gemini API local Query local Gemini API logs metrics Query Gemini API metrics from Cloud Monitoring requests Query individual Gemini API requests from local logs tokens Query detailed token usage from Cloud Logging tui Launch an interactive TUI to visualize local query logs
Flags: -h, —help help for query
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
Use “grove-gemini query [command] —help” for more information about a command.
grove-gemini query billing
This command requires a BigQuery billing export table containing detailed usage cost data to be enabled for your billing account.
To set up billing export:
- Go to the Google Cloud Console Billing section
- Select your billing account
- Click “Billing export”
- Enable “Detailed usage cost” export to BigQuery
- Note the dataset and table IDs created
Usage: grove-gemini query billing [flags]
Flags: -d, —dataset-id string BigQuery dataset ID containing billing export —days int Number of days to look back (default 7) -h, —help help for billing -p, —project-id string GCP project ID -t, —table-id string BigQuery table ID for billing export
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query dashboard
Features:
- Real-time cost visualization
- Daily/weekly/monthly views
- SKU breakdown table
- Interactive navigation
Usage: grove-gemini query dashboard [flags]
Flags: -d, —dataset-id string BigQuery dataset ID containing billing export —days int Number of days to display (default 30) -h, —help help for dashboard -p, —project-id string GCP project ID -t, —table-id string BigQuery table ID for billing export
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query explore
Usage: grove-gemini query explore [flags]
Flags: -h, —help help for explore -H, —hours int Number of hours to look back (default 1) -l, —limit int Maximum number of entries to examine (default 10) -p, —project-id string GCP project ID
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query local
Usage: grove-gemini query local [flags]
Flags: —errors Show only failed requests -h, —help help for local -H, —hours int Number of hours to look back (default 24) -l, —limit int Maximum number of requests to display (default 100) -m, —model string Filter by model name
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query metrics
Usage: grove-gemini query metrics [flags]
Flags: —debug Enable debug output -h, —help help for metrics -H, —hours int Number of hours to look back (default 24) -p, —project-id string GCP project ID
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query requests
This command reads from local logs since Google doesn’t publish individual Gemini API requests to Cloud Logging.
Usage: grove-gemini query requests [flags]
Flags: —errors Show only failed requests -h, —help help for requests -H, —hours int Number of hours to look back (default 1) -l, —limit int Maximum number of requests to display (default 100) -m, —model string Filter by model name
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query tokens
Usage: grove-gemini query tokens [flags]
Flags: —debug Enable debug output -h, —help help for tokens -H, —hours int Number of hours to look back (default 24) -p, —project-id string GCP project ID
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini query tui
Usage: grove-gemini query tui [flags]
Flags: -h, —help help for tui
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
grove-gemini config
Usage: grove-gemini config [command]
Available Commands: get Get configuration values set Set configuration values
Flags: -h, —help help for config
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
Use “grove-gemini config [command] —help” for more information about a command.
grove-gemini config get
Usage: grove-gemini config get [command]
Available Commands: billing Get the default BigQuery billing configuration project Get the default GCP project
Flags: -h, —help help for get
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
Use “grove-gemini config get [command] —help” for more information about a command.
grove-gemini config get billing
grove-gemini config get project
grove-gemini config set
Usage: grove-gemini config set [command]
Available Commands: billing Set the default BigQuery billing dataset and table project Set the default GCP project
Flags: -h, —help help for set
Global Flags: -c, —config string Path to grove.yml config file —json Output in JSON format -v, —verbose Enable verbose logging
Use “grove-gemini config set [command] —help” for more information about a command.
grove-gemini config set billing
grove-gemini config set project
grove-gemini version
Usage: grove-gemini version [flags]
Flags: -h, —help help for version —json Output version information in JSON format
Global Flags: -c, —config string Path to grove.yml config file -v, —verbose Enable verbose logging