Purpose: Run Rill locally (rill start) for delivery and financial dashboards. Supports both explores (ad-hoc analysis) and dashboards (saved visualizations).
1. Install Rill
Option A: Install script (recommended for Cursor VM)
Opens http://localhost:9009. The sample_goals CSV loads immediately — you can explore and build dashboards.
3. Connect to Snowflake (Real Data)
3.1 Get credentials from 1Password
op signin # if not already signed inop read "op://Brainforge AI Team/Brainforge Internal Snowflake/username"op read "op://Brainforge AI Team/Brainforge Internal Snowflake/password"op read "op://Brainforge AI Team/Brainforge Internal Snowflake/account"# Also need: warehouse, role, database, schema
Replace USERNAME, PASSWORD, ACCOUNT, DATABASE, SCHEMA with values from 1Password. The same variable is used for Rill Cloud project variables when deploying.
For CI / Cursor Cloud (no interactive login), use a service account and API token.
5.1 Preconditions
Snowflake:SNOWFLAKE_DSN prepared for the reporting service account (service_user_report + role_report) using key-pair auth. DSN points to <TARGET_DATABASE>/BRAINFORGE_RILL and includes warehouse + role. Never commit DSN values to git.
Cursor Cloud: Use a Rill service account token (no rill login); see one-time setup and credentials table below.
5.2 One-time setup: service account (on a machine where you can run rill login)
Cursor Cloud cannot complete rill login (device flow). Use a service account and API token so deploy runs non-interactively.
You need the issued service token for deploy/query in CI/Cloud. For new projects, give the service an org role so it can create projects on first deploy.
Service name: Pick one (e.g. brainforge-ci). Cursor Cloud does not need the service name for deploy/query commands—only the token.
Log in to Rill Cloud (once): rill login
Create a service account with org role:
rill service create brainforge-ci --org brainforge --org-role admin
If projects already exist, use:
rill service set-role <service-name> --org brainforge --project delivery-analytics --role adminrill service set-role <service-name> --org brainforge --project finance-analytics --role admin
Issue a token: rill service token issue --service brainforge-ci --org brainforge — copy it; shown only once.
Store the token (and any other secrets) in 1Password and/or Cursor Cloud (see 5.3).
5.3 Credentials to add to Cursor Cloud
Secret / env var
Purpose
RILL_SERVICE_TOKEN
Auth for rill project deploy and rill query in CI/Cursor Cloud. Required.
RILL_USER_TOKEN
User API token for rill env set / rill env push (service tokens cannot update project variables). Required when setting SNOWFLAKE_DSN from CLI.
SNOWFLAKE_DSN
Full Snowflake DSN for both projects (must use service_user_report + role_report in production). Build from 1Password key-pair material; see rill-production-service-user-report.md.
5.4 Auto-deploy on push to main (GitHub Actions)
A workflow in .github/workflows/rill-deploy.yml runs on push to main when files under rill/ change. It installs the Rill CLI and runs rill project deploy for both delivery-analytics and finance-analytics.
Required: Add the service token as a GitHub repo secret:
Secret name:RILL_SERVICE_TOKEN
Value: The token from rill service token issue --service brainforge-ci --org brainforge (see 5.2). Store in 1Password and paste into GitHub → Settings → Secrets and variables → Actions.
If the secret is missing, the workflow will fail at the deploy step; add it once to enable auto-deploy.
5.5 Deploy from repo root (manual / Cursor Cloud or CI)
Some orgs still require a user token for deploy/list operations (only users can list projects by fingerprint). If service-token deploy fails, run deploy from a trusted machine with RILL_USER_TOKEN.
5.6 Configure connector variable in cloud
After deploy, set the Snowflake DSN in Rill Cloud for both projects:
for project in delivery-analytics finance-analytics; do rill env set "$project" SNOWFLAKE_DSN "$SNOWFLAKE_DSN" \ --org brainforge \ --interactive=false \ --api-token "$RILL_USER_TOKEN"done
If RILL_USER_TOKEN is not available in Cursor Cloud, set the variable once using a user token on a trusted machine, then continue CI deploys with RILL_SERVICE_TOKEN.
5.7 Validate deployment with sample query
rill query \ --org brainforge \ --project delivery-analytics \ --sql "select date, person, project, hours from delivery_time_effort_mart order by date desc limit 10" \ --interactive=false \ --api-token "$RILL_SERVICE_TOKEN"rill query \ --org brainforge \ --project finance-analytics \ --sql "select month_start, total_revenue, total_costs, operating_profit from finance_monthly_summary order by month_start desc limit 6" \ --interactive=false \ --api-token "$RILL_SERVICE_TOKEN"
Expected: delivery query returns rows for time/effort fields and finance query
returns recent months with populated revenue/cost/margin values.
5.8 If deploy fails: “repository does not exist”
If rill project deploy ... --project finance-analytics fails with failed to fetch from remote: failed to open git repository: repository does not exist, the Rill Cloud project’s Git connection is wrong or broken. Fix it in the UI:
Open Rill Cloud → org brainforge → project finance-analytics.
Go to Project settings (or Source / Git).
Set the repository URL to the correct GitHub repo (e.g. this repo) and ensure the token/credential has access to it.
Save and trigger a refresh/redeploy, or run rill project deploy again from the repo.
6. Rill Cloud RBAC (DP-197)
This section documents project-level access for the split analytics projects:
Use --group finance-viewers for finance access changes.
6.5 Verify RBAC configuration
export PATH="$HOME/.rill:$PATH"# List project-level group rolesrill usergroup list --org brainforge --project finance-analytics \ --interactive=false --api-token "$RILL_SERVICE_TOKEN"# List members in each grouprill user list --org brainforge --group delivery-viewers \ --interactive=false --api-token "$RILL_SERVICE_TOKEN"rill user list --org brainforge --group finance-viewers \ --interactive=false --api-token "$RILL_SERVICE_TOKEN"
7. Production Snowflake credentials for Rill Cloud (DP-198)
For the production runbook covering:
service_user_report verification/creation in Snowflake,
finance-analyticsrill project status shows Canvas + MetricsView
resources in Idle.
delivery-analytics was not present in rill project list.
Deploy attempt with RILL_SERVICE_TOKEN failed with
only users can list projects by fingerprint (PermissionDenied).
Local validation succeeded for both repo projects (/workspace/rill and
/workspace/rill/finance) using Snowflake connector queries.
8.8 2026-03-04 DP-195 update
From Cursor Cloud on 2026-03-04:
Added dedicated delivery project at rill/delivery/ and validated resource
hydration locally.
Local sample query succeeded:
rill query --local \ --path /workspace/rill/delivery \ --sql "select date, person, project, hours from delivery_time_effort_mart order by date desc limit 10"
Cloud deploy attempt for delivery-analytics from rill/delivery/ using
RILL_SERVICE_TOKEN still failed with:
only users can list projects by fingerprint (PermissionDenied).
Direct cloud query confirms the project is still absent:
Next step remains: run deploy + rill env set once using RILL_USER_TOKEN
on a trusted machine, then continue non-interactive deploy/query with
RILL_SERVICE_TOKEN.
9. Executive summary canvas panel phases (DP-225)
rill/delivery/dashboards/executive_summary_canvas.yaml is a dedicated
CEO/board single-pane view. During Phase 1 it should run with delivery metrics
and explicit placeholders for finance mart dependencies.