Skip to content

gasxhermvc/sql-context-pack

Repository files navigation

SQL Context Pack

SQL Context Pack extracts read-only database metadata, stored procedures, and sanitized representative rows; performs two-pass business classification and dependency analysis; formats final materialization SQL with SQLFluff; and assembles an integrity-checked AI context bundle.

Current version: 1.1.0 · Python: >=3.11 · Output format: 1

Safety first

  • The owner configures credentials and starts sqlctx-server.
  • Agents use profile names and an agent-scoped loopback token only.
  • Selection never narrows server analysis.
  • SQLFluff runs through the selected host Python. This project never creates a virtual environment.
  • Large bundles travel through the authenticated sqlctx export fetch command, not MCP content.

Development checkout

./scripts/python-preflight.ps1
python -m pip install --user -e ".[dev]"
python -m pytest
./scripts/python-preflight.sh
python3 -m pip install --user -e '.[dev]'
python3 -m pytest

The package install uses the selected interpreter's user site. If the owner selected an existing virtual/conda environment, install its dependencies manually; sqlctx treats that environment as verify/execute-only.

Global Agent installation

Install once into the Codex personal marketplace and selected host Python user site:

git clone https://github.com/gasxhermvc/sql-context-pack.git
cd sql-context-pack
.\install.ps1

Then open a new terminal and Agent thread. Verify with codex plugin list and sqlctx-server --help. See Global Agent Installation for update, status, fallback Skill, removal, PATH troubleshooting, and macOS/Linux commands.

After setup, start the complete owner-controlled service and Codex workflow with one command:

py -3 -m sqlctx.cli launch --harness codex --profile agrimap-dev

See docs/getting-started.md, docs/global-installation.md, docs/security.md, and docs/command-reference.md for operator guidance. Release evidence and artifact hashes are in docs/release-report.md.

Usage

  1. Follow Getting Started to check the machine Python and configure a read-only profile.
  2. Start the owner service using Server Operations.
  3. Launch Codex, Claude Code, or Gemini CLI against the same canonical Skill.
  4. Use the Use Cases and Command Reference for materialization/export commands. See Troubleshooting on failure.

This is one monorepo: a single typed application core prevents HTTP/MCP drift, one Skill prevents harness workflow drift, and one release/version gate validates every package surface together.

About

A tool for dumping databases to create context reference schema for LLMs, providing a better understanding of the data context for programming.

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors