databasedmcp

← Articles

How to build an OKR tracker with Gemini CLI

Write the quarter's objectives and key results once, check in on them from the terminal each week, and see what's on track without a status meeting.

6 min read

databasedmcp gives your AI assistant databases it keeps between conversations, so everything in this article works from the day you connect it. Free to start, no card.

Get started free

Why build it yourself

For a small team, OKRs are a handful of objectives, three or four numbers under each, and a weekly check-in on how those numbers moved. Lattice Goals and Weekdone wrap that in reviews, alignment trees and reminders, which a team of five rarely needs.

Gemini CLI runs in the terminal where the work happens. Give it the quarter's goals once, and each week tell it where the numbers are and how confident you feel. Progress becomes a query, and anyone on your account can open the same rows on the website.

Connect Gemini CLI to databasedmcp

databasedmcp is a remote MCP server that gives AI assistants private SQLite databases, with nothing to install.

terminal
gemini mcp add --transport http databased https://databasedmcp.com/mcp

Then run /mcp auth databased in Gemini CLI. Your browser opens a databasedmcp page: sign in and select Allow.

Any other MCP client works the same way; the docs have the details.

Copy this prompt to build it

Paste this into Gemini CLI to set up the database, its tables and its guide in one go. The rest of this article walks through what it makes and how you use it.

prompt
Set up an OKR tracker for me in databasedmcp, in one go.

1. Create a database called okrs, described as "OKR tracker: objectives, key results and weekly check-ins, kept by Gemini CLI."
2. Create three tables:
   - objectives: id, quarter (required, like "2026-Q4"), title (required), owner, status (active, done or dropped, defaults to active).
   - key_results: id, objective_id (references objectives, required), title (required), unit, start_value (required), target_value (required, and never equal to start_value), current_value (required).
   - checkins: id, key_result_id (references key_results, required), value (required), confidence (1 to 10 that we'll hit the target), note, reported_by, at (defaults to now).
3. Write the database a guide that says what each table is for, that progress is (current - start) / (target - start) so targets that go down work too, to log a check-in first and then update the key result's current_value, and the queries for "progress this quarter" and "stale key results with no check-in in 14 days".

From then on: when I give you a quarter's objectives, add them with their owner, and their key results with start, target and current values. When someone reports a number, log a check-in with their confidence and note, then update the key result. Show me the tables when you're finished.

Ask for the database

You don't write the schema. Describe what you want:

Set up an OKR tracker in databasedmcp: objectives per quarter with an owner, key results under each with a start value, target and current value, and weekly check-ins with a confidence score and a note. When I give you a number for a key result, log a check-in and update it.

Gemini CLI creates a database called okrs and its tables:

schema
CREATE TABLE objectives (
  id INTEGER PRIMARY KEY,
  quarter TEXT NOT NULL,
  title TEXT NOT NULL,
  owner TEXT,
  status TEXT NOT NULL DEFAULT 'active' CHECK (status IN ('active', 'done', 'dropped'))
);

CREATE TABLE key_results (
  id INTEGER PRIMARY KEY,
  objective_id INTEGER NOT NULL REFERENCES objectives(id),
  title TEXT NOT NULL,
  unit TEXT,
  start_value REAL NOT NULL,
  target_value REAL NOT NULL CHECK (target_value <> start_value),
  current_value REAL NOT NULL
);

CREATE TABLE checkins (
  id INTEGER PRIMARY KEY,
  key_result_id INTEGER NOT NULL REFERENCES key_results(id),
  value REAL NOT NULL,
  confidence INTEGER CHECK (confidence BETWEEN 1 AND 10),
  note TEXT,
  reported_by TEXT,
  at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
);

It also writes the database a guide on how the tables are meant to be used. The guide comes back with the schema whenever an assistant looks the database up. Gemini CLI files things the same way next week as today, and so does any other assistant you connect.

guide
# okrs: objectives, key results, check-ins

- **objectives**: one per goal per quarter ("2026-Q4"). status: active, done, dropped.
- **key_results**: the measurable part. Progress is (current - start) / (target - start), so targets that go down work too.
- **checkins**: one row each time someone reports a number. `confidence` is 1 to 10 that we'll hit the target. Log the check-in, then update `key_results.current_value`.

Progress this quarter: `SELECT o.title, kr.title, kr.current_value, kr.target_value, round(100.0 * (kr.current_value - kr.start_value) / (kr.target_value - kr.start_value)) AS pct FROM key_results kr JOIN objectives o ON o.id = kr.objective_id WHERE o.quarter = ?`

Stale: key results with no check-in in 14 days.

Use it

From here on you talk, and Gemini CLI writes the rows. Each request below is one statement:

Our Q4 objective: make onboarding something people finish. Aiko owns it.
execute
INSERT INTO objectives (quarter, title, owner) VALUES (?, ?, ?) RETURNING id
-- params: ["2026-Q4","Make onboarding something people finish","Aiko Tanaka"]
Key results: onboarding completion from 41% to 70%, and median time to first project from 3 days to 1.
execute
INSERT INTO key_results (objective_id, title, unit, start_value, target_value, current_value) VALUES (?, ?, '%', 41, 70, 41), (?, ?, 'days', 3, 1, 3)
-- params: [1,"Onboarding completion rate",1,"Median days to first project"]

The second target goes down. Progress is measured from the start value, so it still counts up to 100%.

Check-in: completion is at 52% after the new checklist shipped. Fairly confident, say 7.
execute
INSERT INTO checkins (key_result_id, value, confidence, note, reported_by) VALUES (?, ?, ?, ?, ?)
-- params: [1,52,7,"New setup checklist shipped on Tuesday.","Aiko Tanaka"]
Update the key result.
execute
UPDATE key_results SET current_value = ? WHERE id = ?
-- params: [52,1]

Ask it questions

Once there's data, each report you'd pay for is a single query:

How are we doing on Q4?
query
SELECT o.title AS objective, kr.title AS key_result, kr.current_value, kr.target_value, kr.unit, round(100.0 * (kr.current_value - kr.start_value) / (kr.target_value - kr.start_value)) AS pct FROM key_results kr JOIN objectives o ON o.id = kr.objective_id WHERE o.quarter = ? AND o.status = 'active' ORDER BY o.id, pct
-- params: ["2026-Q4"]
Which key results haven't had a check-in in two weeks?
query
SELECT o.owner, kr.title, max(c.at) AS last_checkin FROM key_results kr JOIN objectives o ON o.id = kr.objective_id LEFT JOIN checkins c ON c.key_result_id = kr.id WHERE o.status = 'active' GROUP BY kr.id HAVING last_checkin IS NULL OR last_checkin < datetime('now', '-14 days') ORDER BY o.owner
Where is confidence dropping?
query
WITH ranked AS (SELECT key_result_id, confidence, row_number() OVER (PARTITION BY key_result_id ORDER BY at DESC, id DESC) AS n FROM checkins WHERE confidence IS NOT NULL) SELECT kr.title, latest.confidence AS now, previous.confidence AS before FROM ranked latest JOIN ranked previous ON previous.key_result_id = latest.key_result_id AND previous.n = 2 JOIN key_results kr ON kr.id = latest.key_result_id WHERE latest.n = 1 AND latest.confidence < previous.confidence

You can also open the database on the website, page through its rows and run read-only SQL yourself.

What you give up

Nobody gets nudged to check in. Lattice and Weekdone send reminders, collect updates from each person and roll them up for managers. Here a check-in happens when someone tells Gemini CLI, so it works best when one person runs the weekly review and asks which key results have gone stale.

There are no alignment trees, no links to performance reviews or one-to-ones, and no sync with your HR system or chat tool. The website shows rows and runs read-only SQL, but it isn't a dashboard built for a leadership meeting. If OKRs drive reviews across a large company, the paid tools earn their place.

Try it

databasedmcp is free to start, with no card. Free has 100 tool calls a week, enough to set this up and try it for a week. Starter has 1,000 for everyday use.

Create an account

More articles · databasedmcp · Docs