Guepard-Corp/qwery-core
Tentang
The Boring query platform - Connect and query anything
Data dan analisisYang dapat Anda lakukan
- 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.
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- 0
- dalam 15 hari
- 0
- dalam 1 bulan
- +1
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli
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.
What the model may see
~/.qwery/config.json sets how much the model may see from runQuery:
{
"modelVisibility": "grouped",
"maxGroups": 20,
"minGroupSize": 5,
"datasourceVisibility": {
"<datasource id>": {
"modelVisibility": "strict",
"columnTags": [{ "table": "users", "column": "nickname", "sensitive": true }]
}
}
}
modelVisibility:"strict"(default) returns one row of aggregates;"grouped"also returnsGROUP BYresults.maxGroups(default 20, 1โ100) caps the number of groups;minGroupSize(default 5, 2โ100) refuses any answer with a smaller group, so a grouped query projectsCOUNT(*) AS <name>.datasourceVisibilityoverrides a datasource; an override can only be stricter.columnTagsmarks columns as sensitive (or not) on top of the built-in detector of personal data (emails, phones, names, addresses, identifiers, cards, IPs, birth dates), which a tag cannot switch off.- Sensitive columns may only be counted (
COUNT(email)), never grouped on, filtered on or returned. Agent queries never read files or the network directly; attach them as datasources.
๐ 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/modelspick Ollama (local) and point it athttp://localhost:11434/v1.
Headless mode
Run a single turn without the TUI, for scripts and CI:
qwery -p "How many orders per region last month?" -d sales
qwery -p "Average basket size?" --datasource sales --datasource crm --json
-p, --prompt "<prompt>"runs one turn with the same tools, validator and model visibility as the TUI, then prints the answer.-d, --datasource <name|id>attaches a configured datasource; repeat it to attach several.--jsonprints{ "answer", "tools" }, where each tool entry is{ name, ok, rowCount?, error? }; on failure it prints{ "error" }.- Exit codes:
0an answer was produced,1usage or configuration error,2a datasource or the agent failed. QWERY_HOMEmoves the CLI's user state (config.json, the local database, keys, user skills and agents) away from~/.qwery; the installation and its self-updater stay in~/.qwery.
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 TUIevals/: real-model evaluation suite (NLโSQL correctness, etc.)packages/domain: entities, value objects, and ports (no I/O)packages/application: use cases orchestrating the domainpackages/agent-factory-sdk: the agent loop, tools, and compaction;createAgentRuntimewith acliand aservertool profilepackages/conformance: the privacy conformance suite everyAgentComputeadapter runspackages/adapters/*:compute-duckdb,llm-aisdk,persistence-sqlite,model-catalog-http,branching-gfs,semantic-inprocesspackages/extension-sdk+packages/extensions/*: datasource extensionstooling/: 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:testfor unit/component,apps/e2efor 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
- Run
bun run check:allto ensure all quality checks pass. - Follow our TypeScript guidelines.
- Write tests for new features (a change without tests is incomplete).
- Update documentation as needed.
Resources
- Review good first issues
- Read our Code of Conduct
- Check AGENTS.md for development guidelines
- Join our Discord community
๐ฌ Join the Qwery Community
- Discord: Join our Discord for discussions and support
- GitHub Issues: Report bugs and request features
- YouTube: Watch demos and tutorials
๐ 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.
Jelajahi proyek terkait
Memuatโฆ