-
Notifications
You must be signed in to change notification settings - Fork 187
Create Google Gemini cli extension #8177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
780c2ec
79d0366
39ed6e2
9719397
be569bd
6bec3bc
0ee2ee1
319985e
f77346c
6a023c2
9822704
de2e5ef
4c4098a
7f4a49f
52a788d
ca354fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ web-common/tests/projects | |
| web-local/tests/data | ||
|
|
||
| .env | ||
| .example.env | ||
| *.sql | ||
| *.bin | ||
| *.csv | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Rill Integration | ||
|
|
||
| ## Google Gemini Integration | ||
|
|
||
| Enhance your Rill Data experience with the Gemini integration, enabling advanced data analysis. Explore the [Gemini README](gemini/README.md) for detailed information on installation, configuration, and usage. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Rill Configuration | ||
| RILL_ORG="demo" | ||
| RILL_PROJECT="demo-project" | ||
| RILL_ACCESS_TOKEN="rill_usr_1234567890abcdef" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of this language seems to be addressed to the end user (e.g. "By connecting to your Rill projects, the Gemini agent can..."), not the Gemini agent. I'd expect that the document would be exclusively addressed to the Gemini agent. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| ## Rill Gemini Integration | ||
|
|
||
| The Rill Gemini Integration enables advanced data analysis and visualization using Rill's AI-powered agent capabilities. By connecting to your Rill projects, the Gemini agent can autonomously explore metrics views, generate insights, and create text-based visualizations to help you understand your data better. | ||
|
|
||
| ## Chart Generation | ||
|
|
||
| If a user asks for data visualization, either from tool use or using your own analysis capabilities, do not build web pages or React apps. For visualizing data, you can use text-based techniques for data visualization: | ||
|
|
||
| Bar Charts using block characters: | ||
|
|
||
| Q1 ████████░░ 411 | ||
|
|
||
| Q2 ██████████ 514 | ||
|
|
||
| Q3 ██████░░░░ 300 | ||
|
|
||
| Q4 ████████░░ 400 | ||
|
|
||
| Horizontal progress bars: Project Progress: | ||
|
|
||
| Frontend ▓▓▓▓▓▓▓▓░░ 80% | ||
|
|
||
| Backend ▓▓▓▓▓▓░░░░ 60% | ||
|
|
||
| Testing ▓▓░░░░░░░░ 20% | ||
|
|
||
| Using different block densities: Trends: | ||
|
|
||
| Jan ▁▂▃▄▅▆▇█ High | ||
|
|
||
| Feb ▁▂▃▄▅░░░ Medium | ||
|
|
||
| Mar ▁▂░░░░░░ Low | ||
|
|
||
| Sparklines with Unicode Basic sparklines: | ||
|
|
||
| Stock prices: ▁▂▃▅▂▇▆▃▅▇ | ||
|
|
||
| Website traffic: ▁▁▂▃▅▄▆▇▆▅▄▂▁ | ||
|
|
||
| CPU usage: ▂▄▆█▇▅▃▂▄▆█▇▄▂ | ||
|
|
||
| Trend indicators: | ||
|
|
||
| AAPL ▲ +2.3% | ||
|
|
||
| GOOG ▼ -1.2% | ||
|
|
||
| MSFT ► +0.5% | ||
|
|
||
| TSLA ▼ -3.1% | ||
|
|
||
| Simple trend arrows: Sales ↗️ (+15%) Costs ↘️ (-8%) Profit ⤴️ (+28%) | ||
|
|
||
| Pivot tables using text formatting: | ||
|
|
||
| | Region | Q1 Sales | Q2 Sales | Q3 Sales | Q4 Sales | | ||
| | ------ | -------- | -------- | -------- | -------- | | ||
| | North | $120,000 | $130,000 | $125,000 | $140,000 | | ||
| | South | $100,000 | $110,000 | $115,000 | $120,000 | | ||
| | East | $90,000 | $95,000 | $100,000 | $105,000 | | ||
| | West | $110,000 | $115,000 | $120,000 | $130,000 | | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Common Issues | ||
|
|
||
| - **Access denied**: Ensure your Rill access token has AI feature permissions | ||
| - **No data found**: Verify your project contains metrics views with available data | ||
| - **Analysis incomplete**: The agent may need more specific context about what metrics to focus on | ||
|
|
||
| ### Best Practices | ||
|
|
||
| - **Be specific**: Provide clear context about what you want to analyze | ||
| - **Trust the process**: The agent will autonomously execute comprehensive analysis | ||
| - **Review results**: The agent provides citations for all quantitative claims | ||
| - **Ask follow-ups**: Request deeper analysis on specific findings |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Gemini CLI Extension for Rill Data | ||
|
|
||
| Professional data analysis and report generation using Rill's metrics layer. | ||
|
|
||
| ## Overview | ||
|
|
||
| Check out [Rill's Docs](https://docs.rilldata.com) for more information about Rill. | ||
|
|
||
| ## Installation | ||
|
|
||
| Install the extension via GitHub: | ||
|
|
||
| ```bash | ||
| gemini extensions install https://github.com/rilldata/gemini | ||
|
grahamplata marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| Install Rill CLI if you haven't already: | ||
|
|
||
| ```bash | ||
| curl https://rill.sh | sh | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| Generate a Rill authentication token: | ||
|
|
||
| ```bash | ||
| rill token issue --display-name "Gemini Extension" | ||
| ``` | ||
|
|
||
| Update the extension with your Rill credentials by providing the following information when prompted: | ||
|
|
||
| - `Organization`: Your Rill organization name | ||
| - `Project`: Your Rill project name | ||
| - `Access Token`: Your Rill access token | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do they provide these values? |
||
|
|
||
| ## Development | ||
|
|
||
| ### Local Development | ||
|
|
||
| To test changes locally: | ||
|
|
||
| 1. Make your changes to the extension files | ||
| 2. Install the extension from your local development branch: | ||
| ```bash | ||
| gemini extensions install https://github.com/rilldata/rill --ref=your-branch-name | ||
|
grahamplata marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| ### Releasing | ||
|
|
||
| Extension updates are automatically available when changes are merged to the main branch. Users will be prompted to update when new versions are available. | ||
|
|
||
| The extension version is managed through the `gemini-extension.json` file, and users can install specific versions using git refs if needed. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "name": "rill", | ||
| "description": "Professional data analysis using Rill's metrics layer", | ||
| "version": "0.1.0", | ||
| "displayName": "Rill Analytics", | ||
| "contextFileName": "GEMINI.md", | ||
| "mcpServers": { | ||
| "rill": { | ||
| "httpUrl": "https://api.rilldata.com/v1/orgs/${RILL_ORG}/projects/${RILL_PROJECT}/runtime/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer ${RILL_ACCESS_TOKEN}", | ||
| "X-Rill-Agent": "gemini", | ||
| "Content-Type": "application/json" | ||
| }, | ||
| "env": { | ||
| "RILL_ORG": "${RILL_ORG}", | ||
| "RILL_PROJECT": "${RILL_PROJECT}", | ||
| "RILL_ACCESS_TOKEN": "${RILL_ACCESS_TOKEN}" | ||
| } | ||
| } | ||
| }, | ||
| "settings": [ | ||
| { | ||
| "name": "Organization", | ||
| "description": "Your Rill organization name", | ||
| "envVar": "RILL_ORG" | ||
| }, | ||
| { | ||
| "name": "Project", | ||
| "description": "Your Rill project name", | ||
| "envVar": "RILL_PROJECT" | ||
| }, | ||
| { | ||
| "name": "Access Token", | ||
| "description": "Your Rill access token", | ||
| "envVar": "RILL_ACCESS_TOKEN", | ||
| "sensitive": true | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "name": "rill", | ||
| "version": "0.1.0", | ||
| "description": "Data analysis using Rill's metrics layer", | ||
| "license": "Apache-2.0", | ||
| "type": "module", | ||
| "author": { | ||
| "name": "Rill Data", | ||
| "email": "support@rilldata.com", | ||
| "url": "https://rilldata.com" | ||
| }, | ||
| "scripts": { | ||
| "build": "echo 'No build required'", | ||
| "link": "gemini extensions link .", | ||
| "unlink": "gemini extensions uninstall rill", | ||
| "format": "prettier --write \"**/*.{ts,js,json,md}\"" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/rilldata/rill", | ||
| "directory": "integrations/gemini" | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where precisely will users provide these values? I'm seeing placeholders both here and in
integrations/gemini/gemini-extension.json. Ideally there's just one place, and ideally it's a single snippet they can copy/paste from their AI tab.