Skip to main content

Local-first AI analytics over your database, safely.

Project description

Insyte

Ask your database questions in plain English — 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 plain English — "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, comparisons, and forecasts over metrics Insyte generates from your schema — with charts, tables, and the exact SQL on demand.
  • Read-only and private — everything runs on your machine against your database; the raw connection URL never leaves your computer.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insyte-0.1.0.tar.gz (355.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

insyte-0.1.0-py3-none-any.whl (248.1 kB view details)

Uploaded Python 3

File details

Details for the file insyte-0.1.0.tar.gz.

File metadata

  • Download URL: insyte-0.1.0.tar.gz
  • Upload date:
  • Size: 355.5 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for insyte-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c126f769a7c8f938aecb2b79d70bea26a98cba891211ae6673e0196a541e6fb
MD5 19cc802d03bb484817a649b2b7537342
BLAKE2b-256 92a2d02ce160b4c6ec024c9ea05d66a250d10c2c40c98064bb99e4099bffda86

See more details on using hashes here.

File details

Details for the file insyte-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: insyte-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 248.1 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for insyte-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 064a71ce2675c3b593244b9a226288e8e6e7df085bbbb00541b3ef50c4687e58
MD5 dce721976408b5771dcefb2a5006d000
BLAKE2b-256 dee73bb08d7492d6c7859ebb0cda73123e8ee0427da963288779e2ac22af5b75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page