tancat-ai/tancat
Paste a user story → get executable Playwright pytest tests with real DOM selectors.
Powered by local LLMs — no cloud API keys needed.
| Metric | Status |
|---|---|
| CI/CD Pipeline | |
| Python Version | |
| License | |
| Code Quality |
Demo
A short walkthrough video is planned. Until it is recorded, the Your first run page in the user docs specifies exactly what the video will show, and walks the same story end to end with real expected output.
How It Works
User story (natural language)
↓
Skeleton generation — LLM produces test structure with placeholders
↓
DOM scraping — real page structure captured, never injected into prompts
↓
Placeholder resolution — placeholders replaced with actual selectors
↓
Executable pytest file (sync format, ready to run)
Key Features
- AI-Powered Generation — Natural language stories → pytest sync tests
- Self-Learning RAG — the resolver improves with use: passing runs and self-healed locators teach a local, site-scoped store (no telemetry, no cloud)
- Self-Healing — failed locators are reviewed and repaired automatically, then written back so the next generation resolves correctly
- Local LLMs — Runs entirely offline via llama.cpp, Ollama, or LM Studio
- Semantic Scraper — Three-layer extraction (BS4 + CDP accessibility tree + ARIA snapshot) captures computed accessible names, placeholder text, and container elements that CSS-only scrapers miss
- Real Selectors — Scrapes actual DOM; no selector hallucination
- Skeleton-First Pipeline — Two-phase generation eliminates bad selectors
- Page Object Models — Optional POM output for scalable test suites
- Streamlit UI — Primary interface for non-technical QA testers
- CLI — Command-line mode for CI/CD integration
- Evidence Tracking — Annotated screenshots, Gantt timelines, heat maps
- Multi-Format Reports — Markdown, Jira, or standalone HTML
Quick Start
Prerequisites
- Python 3.14+
- uv (package manager)
- A local LLM server — llama.cpp on
:8080(default), Ollama, or LM Studio
Install & Run
# 1. Install dependencies
uv sync
playwright install chromium
# 2. Configure (optional — prompts at runtime)
cp .env.example .env
# 3. Launch the UI
bash launch_ui.sh
# → http://localhost:8501
Or use the CLI:
bash launch_cli.sh
For the CLI, run bash launch_cli.sh. It starts an interactive menu; the
Install page covers the launch options,
and tancat --help prints the usage text.
Connect your LLM
Pick the provider in the Streamlit sidebar or the CLI "Configure LLM" menu. The supported providers are: Ollama, LM Studio, OpenAI-compatible (local), OpenAI (cloud), Azure OpenAI, OpenAI-compatible (cloud), and OpenRouter. Local providers need no key. Cloud providers need a key; the app stores it in memory for the session unless you save it encrypted.
Every provider is configured with base URL + model + key. For a generic endpoint the model is whatever the endpoint serves; for Azure OpenAI the "model" is your deployment name.
Azure OpenAI (first-class)
Azure is not a plain OpenAI-compatible endpoint: the deployment name is in the
request path, api-version is a query parameter, and the key goes in the
api-key header. The app builds:
POST https://<resource>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=2024-10-21
api-key: <AZURE_OPENAI_API_KEY>
Set these in .env (or inject them from your platform's secret store):
LLM_PROVIDER=azure-openai
AZURE_OPENAI_ENDPOINT=https://my-resource.openai.azure.com
AZURE_OPENAI_DEPLOYMENT=my-gpt4o-deployment
AZURE_OPENAI_API_KEY=...
# AZURE_OPENAI_API_VERSION=2024-10-21 # optional; this is the default
AWS Bedrock (via the Bedrock Access Gateway)
Do not point TanCat at bedrock-runtime directly. AWS ships the
Bedrock Access Gateway,
an OpenAI-compatible API in front of Bedrock. Use the generic compatible
provider --- no adapter needed:
LLM_PROVIDER=openai-compatible
OPENAI_COMPATIBLE_BASE_URL=https://<api-id>.execute-api.<region>.amazonaws.com/api/v1
OPENAI_COMPATIBLE_API_KEY=<bedrock-gateway-api-key>
OPENAI_COMPATIBLE_MODEL=anthropic.claude-3-5-sonnet-20241022-v2:0
The base URL shape is the API Gateway invoke URL with a trailing /api/v1
(add the stage if you deployed one):
https://<api-id>.execute-api.<region>.amazonaws.com/<stage>/api/v1.
The gateway speaks /chat/completions with Authorization: Bearer, which is
exactly what the compatible provider sends.
Any other gateway
The same compatible path covers LiteLLM, Portkey, Azure API Management,
self-hosted vLLM/SGLang/TGI, Together, Groq, and DeepSeek: set the provider to
OpenAI-compatible, paste the gateway's /v1 base URL and key, and name the
model. See .env.example for the full list of variables.
Architecture
Phase 1: SKELETON GENERATION (LLM)
────────────────────────────────────
streamlit_app.py / cli/main.py
│
▼
orchestrator.py ──┐
│ │
┌────┼────┬──────┴──────────────┐
▼ ▼ ▼ ▼
spec test scraper LLM
analyzer generator (scraper) client
│ │
▼ ▼
skeleton with prompt_utils.py
placeholders ←───────── prompt template
Phase 2: PLACEHOLDER RESOLUTION (DOM Data)
────────────────────────────────────────────
│
▼
placeholder_orchestrator.py (coordinates per-page resolution)
│ │ │
▼ ▼ ▼
journey_ stateful_ semantic_
scraper scraper candidate_ranker
│
▼
placeholder_resolver
(semantic_matcher + intent_matcher)
│
▼
locator_builder → code_postprocessor
Phase 3: PERSISTENCE + REPORTING
─────────────────────────────────
│
▼
pipeline_writer.py ──→ generated_tests/
│
evidence_tracker.py → .evidence.json sidecars
│
report_builder ←──┐
│ │
▼ ▼
failure_reporter evidence_loader
│
▼
report_formatters → markdown / jira / html
For a full module map and dependency graph, see ARCHITECTURE.md.
- Interactive call-flow diagram: generated locally with
graphify update .(not committed to the repo).
Documentation
| Doc | Purpose |
|---|---|
| docs/user/ | User documentation - install, configure your LLM, first run, guides, licensing |
| ARCHITECTURE.md | System architecture, data flows, dependency graph |
| PROJECT_KNOWLEDGE.md | Decisions, gotchas, recurring bugs |
| DEMO_GUIDE.md | Step-by-step demo for stakeholders |
| BACKLOG.md | Feature backlog and bug tracker |
| AGENTS.md | AI coding agent conventions |
| CONTEXT.md | Single-page project context |
For Contributors
See CONTRIBUTING.md and AGENTS.md.
Pre-commit checklist: smoke.py (offline import/resolver check) → ruff → mypy → pytest.
License
Business Source License 1.1 (source-available) — see LICENSE.
The source is free to read, modify and use, including production use for any internal purpose. Two limits apply until each version's Change Date (four years after its first public release): you may not offer TanCat as a competing product or service, and the licence is not OSI open source until it converts to the Apache License, Version 2.0 on that date.
Metadata
Release files for tancat 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tancat-0.1.2.tar.gz | 34.2 MB | With provenance | Details for tancat-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tancat-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for tancat-0.1.2-py3-none-any.whl |
Total release size: 63.2 MB
Release files / tancat-0.1.2.tar.gz
| Download URL | tancat-0.1.2.tar.gz |
|---|---|
| Size | 34.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f36e3ab1b2122369365101876d2cc136867aa97b158497896ec7f45508f3125
|
|
BLAKE2b-256 checksum How to use checksums |
eb430b70a602a22b1c0852e36eec8bad87b9f440a0de2352cd1775b4e1b76ac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / tancat-0.1.2-py3-none-any.whl
| Download URL | tancat-0.1.2-py3-none-any.whl |
|---|---|
| Size | 29.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f95dce72c8af84e7a901af4facea4a67fc154a7781fe045bdac0960e20f1a40
|
|
BLAKE2b-256 checksum How to use checksums |
e62af9c631320657d7ad47013906b7fea3c090d25ae42f3bc0ad2e491380fe40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for tancat 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tancat-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.