Skip to main content

Insyte

Ask your database questions in natural language — locally, and safely.

Insyte connects to your database with read-only credentials and turns natural-language questions into safe analytics. Ask "what were total sales last month?" or "revenue by city" from a browser workspace, a terminal UI, or your own AI tool (Claude Code / Codex) — Insyte writes the SQL, runs it read-only, and shows the answer.

Two things are always true:

  1. AI models never see your database credentials.
  2. Nothing can bypass Insyte's SQL validation, row limits, PII masking, or audit log — a dangerous query is rejected, not executed.

What you can do

  • Ask in natural language — "total order value last month", "orders by payment method", "monthly revenue trend", "what's the expected revenue this year?"
  • Three ways to use it — a browser workspace (insyte studio), a terminal UI (insyte chat), or directly from Claude Code / Codex over MCP.
  • Trends, breakdowns, opportunity segments, comparisons, and forecasts over metrics Insyte generates from your schema — with charts, tables, and the exact SQL on demand.
  • Investigation Mode Lite — ask broader questions like "why did total amount change?" and Studio runs a safe, multi-step investigation: trend, current-vs-previous comparison, segment breakdown, freshness checks, and next questions.
  • Detailed reports (opt-in) — flip on "Detailed report" in Studio for an in-depth analyst write-up: executive summary, key insights, data-quality flags, root-cause reasoning, evidence/counter-evidence, best/expected/worst forecast, and prioritized recommendations, in a visual dashboard. Investigation questions can use the same analyst report skill over the grounded investigation bundle. See the privacy note below for what this shares.
  • Interactive charts — charts include hover tooltips, readable date labels, expandable fullscreen views, and smooth trend lines for faster inspection.
  • Conversation context — Studio remembers compact metric, dimension, period, and result context so follow-up questions like "same metric last month" resolve more reliably.
  • Read-only and private — everything runs on your machine against your database; the raw connection URL never leaves your computer.

Detailed reports & your privacy

Everything above keeps your data on your machine. The one opt-in exception is the Detailed report: to write analyst commentary, Insyte sends the already-aggregated, PII-masked result of your query, or a grounded investigation bundle built from those aggregate results, to your local claude/codex CLI, which forwards it to that provider. The AI only writes prose — it never sees credentials, never authors SQL, and every chart is built by Insyte from real numbers. It's off by default, shows a one-time notice the first time you enable it, and can be turned off entirely with ai.detailed_reports: false in config.yaml.

Install & set up

Easiest — pipx installs Insyte in its own isolated environment (no virtual-env to manage):

pipx install insyte
insyte init          # asks for your read-only DB URL and which AI tool, then sets everything up

No pipx yet? brew install pipx (macOS) or python -m pip install --user pipx && pipx ensurepath, then reopen your terminal.

Prefer plain pip? Install into a virtual environment:

python -m venv .venv && source .venv/bin/activate
pip install insyte
insyte init

insyte init walks you through it:

  1. Enter your read-only database URL (stored once in a 0600 file — never in config, never logged, never sent to an AI).
  2. Pick your AI tool — Claude Code, Codex, or none.
  3. Insyte then connects, scans the schema, generates metrics, and wires up your AI tool — no scripts, no environment variables.

Then use it:

insyte studio        # browser workspace at http://127.0.0.1:3838
insyte chat          # terminal UI
insyte analyze total_amount --by city

Requirements: Python 3.11+, a PostgreSQL database, and — for natural-language questions — the claude or codex CLI (Studio also answers metric questions without one).

Recommended: a read-only database user

Insyte enforces read-only regardless, but a dedicated account is safest:

CREATE ROLE insyte_reader LOGIN PASSWORD '…';
GRANT CONNECT ON DATABASE your_db TO insyte_reader;
GRANT USAGE ON SCHEMA public TO insyte_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO insyte_reader;

Use it from Claude Code / Codex

insyte init already installs the Insyte MCP server into your chosen tool. Restart it, then ask questions in plain language — Claude/Codex call Insyte's safe tools; it validates, runs read-only, masks PII, and audits every query. (Re-run any time with insyte mcp install claude or insyte mcp install codex.)

Handy commands

Command What it does
insyte init Guided setup: DB URL + AI tool → connect, scan, metrics, MCP
insyte studio Browser workspace (localhost only)
insyte chat Terminal UI
insyte analyze <metric> --by <dimension> A single analysis from the CLI
insyte metrics List the metrics Insyte generated
insyte status / insyte doctor Project state / health checks

Everything lives under ~/.insyte/projects/<name>/ (config, stored URL, scanned schema, metrics). The connection URL is read only when needed and never written to config.yaml.

Feedback

Found a bug or have an idea? Please open an issue: https://github.com/insyte-ai/insyte/issues — feedback is very welcome.

Contributing

uv venv && uv pip install -e '.[dev]'
uv run ruff check src tests && uv run mypy src && uv run pytest -q

Security & license

See SECURITY.md for the read-only posture and how to report a vulnerability. Licensed under Apache-2.0 — see LICENSE.

Release files for insyte 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for insyte 0.2.3
File Size Uploaded
insyte-0.2.3.tar.gz 398.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for insyte 0.2.3
File Interpreter ABI Platform
insyte-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 679.1 kB

Release files / insyte-0.2.3.tar.gz

Download URL insyte-0.2.3.tar.gz
Size 398.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ec00772362c035a1a1d89a58b8b0ce9154f2242277738760693c6e1fca3373e7
BLAKE2b-256 checksum
How to use checksums
a36d336e51988a84b3b36861192f96189ffbb925747fe9a83f0cee69b3363721
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / insyte-0.2.3-py3-none-any.whl

Download URL insyte-0.2.3-py3-none-any.whl
Size 280.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bad1ca133c7d1cfd691e24ab01c74b57d0e5d82dbe808d2c0afa1cf2435976e
BLAKE2b-256 checksum
How to use checksums
b559083f18d11c51e580e0c9a05d92e6822ceca1aadcc19e49c2cfba4f8f76da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.2.19

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page