MCPcopy Index your code
hub / github.com/Guepard-Corp/qwery-core

github.com/Guepard-Corp/qwery-core @v0.2.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.3 ↗ · + Follow
1,219 symbols 3,258 edges 358 files 84 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Guepard

<h1>Qwery: the AI data agent in your terminal</h1>






<a href="https://youtu.be/WlOkLnoY2h8?si=hb6-7kLhlOvVL1u6">
    <img src="https://img.shields.io/badge/Watch-YouTube-%23ffcb51?logo=youtube&logoColor=black" alt="Watch on YouTube" />
</a>
<a href="https://discord.gg/nCXAsUd3hm">
    <img src="https://img.shields.io/badge/Join-Community-%23ffcb51?logo=discord&logoColor=black" alt="Join our Community" />
</a>
<a href="https://github.com/Guepard-Corp/qwery-core/actions/workflows/ci.yml" target="_blank">
    <img src="https://img.shields.io/github/actions/workflow/status/Guepard-Corp/qwery-core/ci.yml?branch=main" alt="Build">
</a>
<a href="https://github.com/Guepard-Corp/qwery-core/blob/main/LICENCE" target="_blank">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License" />
</a>
<a href="https://bun.sh/" target="_blank">
    <img src="https://img.shields.io/badge/bun-%3E%3D1.3-brightgreen" alt="Bun Version" />
</a>
<a href="https://github.com/Guepard-Corp/qwery-core/pulls" target="_blank">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" />
</a>

Important Notice

🚧 This project is under active development and not yet suitable for production use. Expect breaking changes, incomplete features, and evolving APIs.

Qwery: The Vision

Qwery is an AI data analyst that lives in your terminal. Ask questions in plain language; Qwery connects to your datasources, generates the SQL, runs it locally, and answers, without you ever leaving the keyboard.

It pairs two agents (a DataAgent for analysis and a CodingAgent for building scripts and apps) behind a single TUI.

Privacy by design

Row-level data never leaves your machine and is never sent to the LLM. Queries run in a local query engine; the model only ever sees schemas, aggregate scalars, and locally-rendered output. Destructive operations are protected by GFS ("git for databases"): the agent can branch and snapshot a database before touching it.

🌟 Features

  • Natural-language querying: ask in plain language, get SQL automatically.
  • Privacy-preserving: a local query engine keeps row data on your machine; only schemas/aggregates reach the LLM.
  • Two agents: a DataAgent (analysis) and a CodingAgent (build/edit scripts and apps).
  • GFS safety net: branch/commit/time-travel a database before destructive operations.
  • Many datasources via extensions: PostgreSQL, MySQL, ClickHouse, DuckDB, CSV (local & online), Parquet, JSON, Google Sheets, S3, Excel (.xlsx).
  • Bring your own model: configure any provider in-app via /models (Ollama local & cloud, Azure OpenAI, AWS Bedrock, and any OpenAI-compatible endpoint).
  • Extensible: an extension SDK for custom datasources.

🚀 Quick Start

Install (recommended)

curl -fsSL https://raw.githubusercontent.com/Guepard-Corp/qwery-core/main/install | bash

This installs qwery (and the GFS engine) under ~/.qwery and adds it to your PATH. Then just run:

qwery

Once in the TUI, press /models to connect a provider. No API keys live in environment variables; provider configuration is stored under ~/.qwery.

Try it for free with Ollama: install Ollama, pull a tool-capable model (e.g. ollama pull qwen3-coder:30b), then in /models pick Ollama (local) and point it at http://localhost:11434/v1.

Run from source

Prerequisites: Bun >= 1.3.

git clone https://github.com/Guepard-Corp/qwery-core.git
cd qwery-core
bun install
bun start        # launch the TUI (use `bun dev` for --watch)

🛠️ Development

Monorepo structure

A Bun + Turborepo monorepo with a hexagonal architecture (see AGENTS.md):

  • apps/cli: the Ink TUI (primary adapter)
  • apps/e2e: end-to-end tests driving the real TUI
  • evals/: real-model evaluation suite (NL→SQL correctness, etc.)
  • packages/domain: entities, value objects, and ports (no I/O)
  • packages/application: use cases orchestrating the domain
  • packages/agent-factory-sdk: the agent loop, tools, and compaction
  • packages/adapters/*: compute-duckdb, llm-aisdk, persistence-sqlite, model-catalog-http, branching-gfs, semantic-inprocess
  • packages/extension-sdk + packages/extensions/*: datasource extensions
  • tooling/: dependency-cruiser, privacy and coverage checks

Commands

bun start                 # launch the TUI
bun dev                   # launch with --watch

bun run lint              # Biome lint + format check (bun run lint:fix to apply)
bun run typecheck         # tsc -b
bun test                  # unit + component tests (bun:test)
bun run check:arch        # hexagonal boundaries (dependency-cruiser)
bun run check:privacy     # privacy invariant (no row data crosses the LLM line)
bun run coverage          # test coverage + ADR #16 tiered gate
bun run check:all         # lint + typecheck + arch + privacy + coverage

cd apps/e2e && bun test   # TUI end-to-end tests
cd evals && bun run evals # real-model evals (defaults to a local Ollama; skips if none)

Code quality standards

  • TypeScript: strict typing, no any.
  • Lint & format: Biome.
  • Architecture: hexagonal boundaries enforced by dependency-cruiser.
  • Tests: bun:test for unit/component, apps/e2e for end-to-end, evals/ for real-model checks.

Run bun run check:all before committing.

📚 Documentation

🤝 Contributing

We welcome contributions! Check out our Contributing Guide to get started.

Before submitting

  1. Run bun run check:all to ensure all quality checks pass.
  2. Follow our TypeScript guidelines.
  3. Write tests for new features (a change without tests is incomplete).
  4. Update documentation as needed.

Resources

💬 Join the Qwery Community

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙏 Thank You

We're grateful to the open source community. See our Thank You page for acknowledgments.

Extension points exported contracts — how you extend this code

ConfigStore (Interface)
(no doc) [2 implementers]
packages/domain/src/ports/config-store.ts
DuckDBComputeWithConnection (Interface)
(no doc) [2 implementers]
packages/adapters/compute-duckdb/src/index.ts
Variant (Interface)
A single connection method an extension offers (one per union branch).
apps/cli/src/tui/datasources-overlay.tsx
Case (Interface)
* Tier 1 slash commands (apps/e2e/PLAN.md): instant, deterministic chat output, * no I/O. Each renders the real ,
apps/e2e/src/slash-basic.e2e.test.tsx
PostHogConfig (Interface)
(no doc)
packages/telemetry/src/config.ts
ConnectionFields (Interface)
(no doc)
packages/extension-sdk/src/connection-string-utils.ts
ToolDescriptor (Interface)
(no doc)
packages/agent-factory-sdk/src/tool-registry.ts
DeleteDatasourceDeps (Interface)
(no doc)
packages/application/src/use-cases/datasource/delete-datasource.ts

Core symbols most depended-on inside this repo

run
called by 54
packages/extensions/xlsx-local/src/__tests__/xlsx-local.test.ts
test
called by 45
apps/cli/src/infra/datasources.ts
error
called by 39
packages/domain/src/ports/logger.ts
query
called by 38
packages/extension-sdk/src/types.ts
getQueryEngineConnection
called by 36
packages/extension-sdk/src/query-engine-connection.ts
create
called by 36
packages/agent-factory-sdk/src/background-jobs.ts
get
called by 34
packages/agent-factory-sdk/src/background-jobs.ts
waitForFrame
called by 31
apps/e2e/src/support/harness.tsx

Shape

Function 711
Interface 234
Method 213
Class 56
Enum 5

Languages

TypeScript100%

Modules by API surface

packages/application/src/use-cases/__tests__/repo-mocks.ts30 symbols
packages/extension-sdk/src/types.ts26 symbols
packages/domain/src/ports/branching.ts24 symbols
apps/cli/src/tui/datasources-overlay.tsx23 symbols
apps/cli/src/infra/datasources.ts22 symbols
apps/e2e/src/support/mock-services.tsx21 symbols
apps/cli/src/tui/markdown.tsx21 symbols
apps/cli/src/infra/updater.ts21 symbols
packages/adapters/branching-gfs/src/index.ts19 symbols
packages/domain/src/ports/telemetry.ts14 symbols
packages/adapters/persistence-sqlite/src/message.repository.ts14 symbols
packages/extensions/s3/src/driver.ts13 symbols

Datastores touched

(mysql)Database · 1 repos
dbDatabase · 1 repos
appDatabase · 1 repos
dbDatabase · 1 repos

For agents

$ claude mcp add qwery-core \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page