GitHub Trending
GitHub Weekly Trending
Total Repos
10
Avg Stars
60.6K
Languages
5
Weeks of Data
1
Nov 2026 · W2Top 10
RepositoryStarsForks
1
NVIDIA/auto-ontology
Auto Ontology
Agents can retrieve documents and query databases, but reliability gates agentic analytics: a revenue metric answered faster is worth nothing if the number is wrong. Agents need a context layer that tells them where data lives, what it means, whether to use it, how to use it, where it came from, and what is similar. NVIDIA Auto Ontology is an open library that builds that layer from enterprise metadata, reconciles definitions across systems, and exposes it to any agent harness through MCP, CLI, and API. It complements the semantic models customers already own.
It enables developers to:
Discover: generate enterprise ontologies from metadata; connect existing ontologies and semantic models; build AI-ready knowledge graphs.
Ground: give agents trusted business meaning for metrics, entities, and relationships; reconcile inconsistent definitions across systems.
Validate: check generated queries against certified definitions and lineage; return provenance with every answer.
Expose: serve context to any agent harness through MCP, CLI, and API.
Learn: fold certified corrections and usage back into the ontology, so shared context improves with every question.
Benchmarks
To run a text-to-SQL benchmark such as BIRD, refer to the
ontology SQL evaluation repository.
Licensing & contributions. Auto Ontology is distributed under the
Apache License 2.0. Third-party open-source components
bundled, linked, or otherwise used by this project are listed in
THIRD_PARTY_NOTICES.md. **This project
is currently not accepting external contributions.**
Key Features
Natural-language querying of structured data — questions are translated to
SQL and executed against connected databases, powered by NVIDIA NIM.
Semantic catalog / ontology layer over relational sources, stored in
Postgres alongside the catalog it describes.
Authentication & RBAC —using Better Auth.
Web UI for chat, analysis, data catalog, analytics, and settings.
Flexible deployment — Helm chart for Kubernetes or Docker Compose for a
local stack.
Software Components
| Component | Technology | Role | Default port |
| ------------------- | ---------------------------------------------------------------------- | ------------------------------------------ | ------------ |
| Frontend | Next.js 16 (React 19, TypeScript, Tailwind CSS 4), Better Auth, Prisma | Web UI, authentication, API gateway | 3000 |
| Backend | FastAPI (Python 3.12+), LangChain | Chat / NL-to-SQL, catalog, datasource APIs | 3001 |
| Ingestion worker | FastAPI (Python 3.12+) | Ingests tabular data and writes embeddings | 3002 |
| Postgres + pgvector | Relational Database | App metadata, the catalog and ontology, vector store | 5432 |
| HashiCorp Vault | Optional | Secure storage of connection credentials | — |
NVIDIA NIM
Auto Ontology uses NVIDIA NIM endpoints for inference — either the hosted
NVIDIA API catalog (integrate.api.nvidia.com) or
self-hosted NIMs. The defaults in .env.example are:
LLM: nvidia/nemotron-3.5-lightning-30b-a3b
Embeddings: nvidia/nemotron-3-embed-1b
Reranking: nvidia/llama-nemotron-rerank-vl-1b-v2
The endpoints and models are configured via the DEFAULT_MODELS_ENDPOINT, DEFAULT_MODELS_MODEL,
EMBED_ENDPOINT, and EMBED_MODEL environment variables and require a
DEFAULT_MODELS_API_KEY.
Model triplets
Each model role is configured by a triplet of environment variables —
_ENDPOINT (URL), _API_KEY, and _MODEL:
| Prefix | Role |
| ---------------- | ----------------------------------------------------------- |
| DEFAULT_MODELS | Shared default; every field below falls back to it. |
| REASONING | Main chat / NL-to-SQL model. |
| NON_REASONING | Lighter model used for entity extraction. |
| EMBED | Text-embedding model (must match between ingest and query). |
| RERANK | Reranker used by the retrieval flow. |
You can set a full triplet, only some of its fields, or none at all — any field
left unset falls back to the matching DEFAULT_MODELS_. So the simplest
setup is to fill in DEFAULT_MODELS_* and override per-triplet fields only where
they differ (e.g. EMBED_MODEL, NON_REASONING_MODEL). *_API_KEY also falls
back to the legacy NVIDIA_API_KEY for backward compatibility.
Quickstart
This runs Auto-Ontology with Docker Compose against Wide World Importers,
Microsoft's sample sales database. You need Docker with Compose v2,
uv, and an NVIDIA API key (nvapi-...) from
build.nvidia.com.
Clone the repository and create .env:
git clone https://github.com/NVIDIA/auto-ontology.git && cd auto-ontology
cp .env.example .env
Then set these values in .env:
DEFAULT_MODELS_API_KEY=nvapi-...
AUTH_SECRET=
APP_URL=http://localhost:3000
POSTGRES_PASSWORD=
CONNECTION_STRINGS=postgresql://postgres:@postgres:5432/wideworldimporters
AUTO_ONTOLOGY_ADMIN_PASSWORD=
PGADMIN_PASSWORD=
Compose publishes Postgres, pgAdmin, and the web app on the host, so replace
each default password before you start it. .env.example also sets an API
key per model role: replace each nvapi-your-api-key-here with your key, or
delete those lines so they fall back to DEFAULT_MODELS_API_KEY.
Start Postgres and load the sample database. The seed script lives in
auto-ontology-eval; pass it the Postgres password you set:
docker compose up -d --wait postgres
git clone https://github.com/NVIDIA/auto-ontology-eval.git ../auto-ontology-eval
(cd ../auto-ontology-eval && uv sync && cp .env.example .env && \
POSTGRES_PASSWORD='' \
uv run python scripts/seed/seed_wwi.py --database-name wideworldimporters --drop)
Build and start the rest of the stack:
docker compose up -d --build
Open and sign in with AUTO_ONTOLOGY_ADMIN_EMAIL and
AUTO_ONTOLOGY_ADMIN_PASSWORD from .env. Go to **Settings → Semantic
Compilation** and turn it on. Ingestion runs at startup; compilation starts
immediately and reports Semantic compilation is ready when it finishes.
Ask a question in Chat:
What was revenue for the USB food flash drive - sushi roll in Pennsylvania
in June 2015?
The agent resolves revenue, product, and state to terms in the
ontology, follows their relationships to the joins it needs, and runs the
query. The answer comes back with its SQL and the steps that produced it,
so you can check the result against the source:
Answer: Revenue for USB food flash drive - sushi roll in Pennsylvania in
June 2015 was $588.80, from 3 invoice lines.
SQL: SELECT SUM(il.extendedprice) AS revenue, COUNT(*) AS invoice_lines
FROM sales.invoicelines il
JOIN sales.invoices i ON il.invoiceid = i.invoiceid
JOIN warehouse.stockitems si ON il.stockitemid = si.stockitemid
JOIN sales.customers c ON i.customerid = c.customerid
JOIN application.cities ct ON c.deliverycityid = ct.cityid
JOIN application.stateprovinces sp ON ct.stateprovinceid = sp.stateprovinceid
WHERE si.stockitemname = 'USB food flash drive - sushi roll'
AND sp.stateprovincename = 'Pennsylvania'
AND i.invoicedate >= '2015-06-01' AND i.invoicedate invoice -> customer -> city -> state province
Validated the filter values against the data, then executed
Ask something the data can't answer. Wide World Importers has no
advertising data, so a question about ad spend has nothing to resolve
against. An agent connected through MCP checks answerability
first and asks you to clarify:
You: What was return on ad spend for the sushi roll flash drive in June 2015?
Agent: check_answerable -> coverage 0.5; no term covers "ad spend"
Agent: I can find revenue for that product, but this data has no
advertising spend, so I can't compute return on ad spend. Do you
want June 2015 revenue instead, or is ad spend tracked in another
source I should connect?
If the UI loads without its left navigation after a restart, the browser is
holding a stale session cookie. Clear site data for localhost:3000 and sign in
again. For other setup failures, see the
setup skill's troubleshooting guide.
How it works
Auto-Ontology works in three stages: it generates an ontology, people certify
it, and the agent answers questions from it.
The ontology holds three kinds of definition:
Terms. Business concepts such as Customer or Invoice Line, each with a
description and synonyms, mapped to the columns that hold them.
SQL attributes. Reviewed SQL expressions under a term, such as a margin or
a rolling total. The agent reuses them, so answers compute each measure the
same way.
Relationships. How tables join, including bridge tables, inferred from
keys and from the data.
Generate. The ingestion service builds a first draft from the source
databases:
Read sources: extract schemas, profile columns, and sample values into the
catalog.
Name entities: extract terms table by table and map each to columns.
Resolve relationships: infer joins between tables and bridge tables, and
suggest SQL attributes from query history.
Write the ontology: store terms, relationships, and SQL attributes in
Postgres, with embeddings in pgvector for retrieval.
The result is a semantic graph you can explore in the UI. In this example, one
compilation of Wide World Importers produced 31 terms; selecting Order shows
its description, related terms, mapped columns, and SQL attributes:
Certify. People make the draft trustworthy:
Test with real questions in Chat, or with check_answerable and
ask_question over MCP.
Refine terms, descriptions, and SQL attributes in the UI or through the API.
Certify names, descriptions, and SQL attributes once they're correct.
Answer. For each question, the agent:
Classifies the intent and extracts the entities the question names.
Retrieves candidate terms, columns, and SQL attributes by embedding search.
Writes SQL from those candidates.
Checks the filter values and the query against the database, repairing the
SQL when a check fails.
Runs the query and returns the answer with its SQL and the steps it took.
When the candidates can't support a query, the agent reports that the question
can't be answered from this data. Predictive questions go to KumoRFM when it's
configured (see Predictions).
In Chat, each answer shows its SQL, and you can view the rows, download them as
CSV, or read them as a chart:
Auto-Ontology is compatible with Apache Ossie, the
open standard for exchanging semantic models. Ossie includes a
converter for Auto-Ontology,
which Auto-Ontology uses to import and export model definitions as Ossie YAML.
Use Settings → Import / Export, or POST /api/model/import and
POST /api/model/export.
| Component | Technology | Role | Port |
| ------------------- | --------------------------------- | ------------------------------------------ | ---- |
| Frontend | Next.js, Better Auth, Prisma | Web UI, authentication, public API gateway | 3000 |
| Backend | FastAPI (Python 3.12+), LangChain | Text-to-SQL agent, catalog, ontology APIs | 3001 |
| Ingestion service | FastAPI (Python 3.12+) | Ingestion and semantic compilation | 3002 |
| MCP server | FastMCP | Read-only agent tools over the public API | 3003 |
| Postgres + pgvector | PostgreSQL 17 | Catalog, ontology, app data, vector store | 5432 |
| HashiCorp Vault | Optional | Connection credential storage | n/a |
Keep ports 3001 and 3002 on a private network. FastAPI trusts the user identity
the frontend forwards in the x-auto-ontology-user-id header, and the ingestion
service's endpoints (ingest, delete, reset, compile) have no authentication of
their own. Clients go through the web app on port 3000.
Use it from your agent
MCP server
The MCP server gives any MCP client read-only
tools over the ontology. Each user signs in through Auto-Ontology, and every
call runs with that user's permissions.
| Job | Tools |
| ------------- | ------------------------------------------------------------- |
| Readiness | check_readiness: can this deployment answer anything at all |
| Terms | search_terms, get_term, get_term_columns, get_term_sql_attributes, get_sql_attribute, describe_table |
| Answerability | check_answerable: does the ontology cover this question |
| Questions | ask_question: the answer, the SQL, and the rows |
Run the server against your deployment:
AUTO_ONTOLOGY_API_URL=http://localhost:3000 \
uvx --from "git+https://github.com/NVIDIA/auto-ontology.git#subdirectory=mcp" auto-ontology-mcp
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"auto-ontology": { "url": "http://localhost:3003/mcp" }
}
}
Claude Desktop (claude_desktop_config.json), bridged with
mcp-remote:
{
"mcpServers": {
"auto-ontology": {
"command": "npx",
"args": "mcp-remote", "http://localhost:3003/mcp"]
}
}
}
Restart the client after editing its config, then sign in when it prompts.
Sign-in, configuration, and troubleshooting are in [docs/mcp.md.
Agent skills
Three skills teach a coding agent to work with Auto-Ontology. Start at
AGENTS.md.
| Skill | Covers |
| -------------------------------------------------------------------- | ---------------------------------------------------- |
| nvidia-ontology-setup | Install, connect sources, compile, prove readiness |
| nvidia-ontology-management | Inspect, model, certify, import/export, and publish |
| nvidia-ontology-query | Ask questions and validate the SQL, rows, and answer |
REST API
Ask a question with POST /api/chat/completions on the web app's origin. Mint
an API token under the user menu → API Tokens. The response is a
server-sent event stream: a result event carries the answer, and
data: DONE] ends the stream.
curl -N http://localhost:3000/api/chat/completions \
-H "x-api-key: $AUTO_ONTOLOGY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"question": "How many orders shipped last week?"}'
import json
import os
import requests
response = requests.post(
"http://localhost:3000/api/chat/completions",
headers={"x-api-key": os.environ["AUTO_ONTOLOGY_API_TOKEN"]},
json={"question": "How many orders shipped last week?"},
stream=True,
timeout=900,
)
response.raise_for_status()
for line in response.iter_lines(decode_unicode=True):
if not line or not line.startswith("data:"):
continue
payload = line.removeprefix("data:").strip()
if payload == "[DONE]":
break
event = json.loads(payload)
if event["type"] == "result":
print(event["answer")
print(event"answer")
elif event"type"] == "error":
raise RuntimeError(event["message"])
Event types, multi-turn conversations, and the gateway trust boundary are in
[docs/conversation-api.md. Every other operation is
in the OpenAPI spec.
Connectors, models, and predictions
Sources
Auto-Ontology connects to ten engines:
PostgreSQL
MySQL
Databricks
Snowflake
ClickHouse
Trino
Apache Kyuubi
HeavyDB
DuckDB
SQLite
Add connections under Settings → Connections, or list them in
CONNECTION_STRINGS. DuckDB and SQLite are connection-string only. See
docs/connections.md for URL schemes, scoping, and
credential storage.
Models
Auto-Ontology uses four model roles. With an nvapi- key, each defaults to an
NVIDIA NIM on build.nvidia.com:
| Role | Default model | What it does |
| --------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| REASONING | nvidia/nemotron-3.5-lightning-30b-a3b | Builds the ontology (terms, relationships, SQL attributes), writes each answer's SQL and explanation, and grades answerability |
| NON_REASONING | nvidia/nemotron-3.5-lightning-30b-a3b | Runs the agent's faster steps: question intent, entity extraction, candidate selection, and SQL checks and repair |
| EMBED | nvidia/nemotron-3.5-embed-1b | Indexes tables, columns, terms, and SQL attributes in pgvector, and matches each question to them |
| RERANK | nvidia/nemotron-3.5-rerank-8b | Ranks candidate tables when compilation builds bridge-table SQL attributes |
To use self-hosted NIM or any OpenAI-compatible endpoint, set
_ENDPOINT, _API_KEY, and _MODEL. Any field you leave
unset falls back to DEFAULT_MODELS_, so the simplest setup fills in
DEFAULT_MODELS_* and overrides only what differs. Use models
that support structured output, and keep the embedding model the same for
ingestion and queries. .env.example documents every
variable.
Predictions
Set KUMO_RFM_API_KEY and the agent routes predictive questions to KumoRFM.
KumoRFM is a hosted service: to answer, the agent uploads the connected tables
to it, capped by KUMO_MAX_TABLES (20 by default) and
KUMO_MAX_ROWS_PER_TABLE (unlimited unless set). Review what that sends, and
complete your organization's data review, before you enable it.
Integrate with us
To integrate an agent platform, application, or storage provider with
Auto-Ontology,
open an integration request.
The Auto-Ontology team maintains the code and doesn't accept external pull
requests. Integration requests and bug reports are welcome as issues. Report
security vulnerabilities through SECURITY.md. Maintainer
workflow is in CONTRIBUTING.md.
Reference
| Topic | Doc |
| --------------------------------------- | ---------------------------------------------------- |
| Kubernetes deployment with Helm | DEPLOYMENT.md |
| Connections, scoping, and Vault | docs/connections.md |
| Authentication, SSO, and API tokens | docs/authentication.md |
| Conversation API | docs/conversation-api.md |
| MCP server | docs/mcp.md |
| REST API | docs/openapi/auto-ontology-api.json |
License
Auto-Ontology is licensed under the Apache License, Version 2.0.
SPDX identifier: Apache-2.0.
Each NVIDIA-authored source file in this repository carries an SPDX header
of the form:
SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES.
All rights reserved.
SPDX-License-Identifier: Apache-2.0
Third-party open-source components used by Auto-Ontology are enumerated, with their
upstream licenses and project URLs, in
THIRD_PARTY_NOTICES.md. Components added by the
container images are listed separately in
CONTAINER_THIRD_PARTY_NOTICES.md.
Notice and Disclaimer
NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or
interacts with external materials. Those retrieved materials are not
distributed with this software and are governed solely by separate terms,
conditions and licenses. You are solely responsible for finding, reviewing and
complying with all applicable terms, conditions, and licenses, and for
verifying the security, integrity and suitability of any retrieved materials
for your specific use case. This software is provided "AS IS", without warranty
of any kind. The author makes no representations or warranties regarding any
retrieved materials, and assumes no liability for any losses, damages,
liabilities or legal consequences from your use or inability to use this
software or any retrieved materials. Use this software and the retrieved
materials at your own risk.
External materials Auto-Ontology interacts with at run time:
Model endpoints you configure, by default the NVIDIA API catalog
(integrate.api.nvidia.com, ai.api.nvidia.com), under each provider's and
model's terms.
The KumoRFM service, only when KUMO_RFM_API_KEY is set, under Kumo's terms.
Your source databases, under your agreements for those systems.
Security
Report security vulnerabilities as described in SECURITY.md.
Python10.7K9.3K
1
NVIDIA/auto-ontology
Auto Ontology
Agents can retrieve documents and query databases, but reliability gates agentic analytics: a revenue metric answered faster is worth nothing if the number is wrong. Agents need a context layer that tells them where data lives, what it means, whether to use it, how to use it, where it came from, and what is similar. NVIDIA Auto Ontology is an open library that builds that layer from enterprise metadata, reconciles definitions across systems, and exposes it to any agent harness through MCP, CLI, and API. It complements the semantic models customers already own.
It enables developers to:
Discover: generate enterprise ontologies from metadata; connect existing ontologies and semantic models; build AI-ready knowledge graphs.
Ground: give agents trusted business meaning for metrics, entities, and relationships; reconcile inconsistent definitions across systems.
Validate: check generated queries against certified definitions and lineage; return provenance with every answer.
Expose: serve context to any agent harness through MCP, CLI, and API.
Learn: fold certified corrections and usage back into the ontology, so shared context improves with every question.
Benchmarks
To run a text-to-SQL benchmark such as BIRD, refer to the
ontology SQL evaluation repository.
Licensing & contributions. Auto Ontology is distributed under the
Apache License 2.0. Third-party open-source components
bundled, linked, or otherwise used by this project are listed in
THIRD_PARTY_NOTICES.md. **This project
is currently not accepting external contributions.**
Key Features
Natural-language querying of structured data — questions are translated to
SQL and executed against connected databases, powered by NVIDIA NIM.
Semantic catalog / ontology layer over relational sources, stored in
Postgres alongside the catalog it describes.
Authentication & RBAC —using Better Auth.
Web UI for chat, analysis, data catalog, analytics, and settings.
Flexible deployment — Helm chart for Kubernetes or Docker Compose for a
local stack.
Software Components
| Component | Technology | Role | Default port |
| ------------------- | ---------------------------------------------------------------------- | ------------------------------------------ | ------------ |
| Frontend | Next.js 16 (React 19, TypeScript, Tailwind CSS 4), Better Auth, Prisma | Web UI, authentication, API gateway | 3000 |
| Backend | FastAPI (Python 3.12+), LangChain | Chat / NL-to-SQL, catalog, datasource APIs | 3001 |
| Ingestion worker | FastAPI (Python 3.12+) | Ingests tabular data and writes embeddings | 3002 |
| Postgres + pgvector | Relational Database | App metadata, the catalog and ontology, vector store | 5432 |
| HashiCorp Vault | Optional | Secure storage of connection credentials | — |
NVIDIA NIM
Auto Ontology uses NVIDIA NIM endpoints for inference — either the hosted
NVIDIA API catalog (integrate.api.nvidia.com) or
self-hosted NIMs. The defaults in .env.example are:
LLM: nvidia/nemotron-3.5-lightning-30b-a3b
Embeddings: nvidia/nemotron-3-embed-1b
Reranking: nvidia/llama-nemotron-rerank-vl-1b-v2
The endpoints and models are configured via the DEFAULT_MODELS_ENDPOINT, DEFAULT_MODELS_MODEL,
EMBED_ENDPOINT, and EMBED_MODEL environment variables and require a
DEFAULT_MODELS_API_KEY.
Model triplets
Each model role is configured by a triplet of environment variables —
_ENDPOINT (URL), _API_KEY, and _MODEL:
| Prefix | Role |
| ---------------- | ----------------------------------------------------------- |
| DEFAULT_MODELS | Shared default; every field below falls back to it. |
| REASONING | Main chat / NL-to-SQL model. |
| NON_REASONING | Lighter model used for entity extraction. |
| EMBED | Text-embedding model (must match between ingest and query). |
| RERANK | Reranker used by the retrieval flow. |
You can set a full triplet, only some of its fields, or none at all — any field
left unset falls back to the matching DEFAULT_MODELS_. So the simplest
setup is to fill in DEFAULT_MODELS_* and override per-triplet fields only where
they differ (e.g. EMBED_MODEL, NON_REASONING_MODEL). *_API_KEY also falls
back to the legacy NVIDIA_API_KEY for backward compatibility.
Quickstart
This runs Auto-Ontology with Docker Compose against Wide World Importers,
Microsoft's sample sales database. You need Docker with Compose v2,
uv, and an NVIDIA API key (nvapi-...) from
build.nvidia.com.
Clone the repository and create .env:
git clone https://github.com/NVIDIA/auto-ontology.git && cd auto-ontology
cp .env.example .env
Then set these values in .env:
DEFAULT_MODELS_API_KEY=nvapi-...
AUTH_SECRET=
APP_URL=http://localhost:3000
POSTGRES_PASSWORD=
CONNECTION_STRINGS=postgresql://postgres:@postgres:5432/wideworldimporters
AUTO_ONTOLOGY_ADMIN_PASSWORD=
PGADMIN_PASSWORD=
Compose publishes Postgres, pgAdmin, and the web app on the host, so replace
each default password before you start it. .env.example also sets an API
key per model role: replace each nvapi-your-api-key-here with your key, or
delete those lines so they fall back to DEFAULT_MODELS_API_KEY.
Start Postgres and load the sample database. The seed script lives in
auto-ontology-eval; pass it the Postgres password you set:
docker compose up -d --wait postgres
git clone https://github.com/NVIDIA/auto-ontology-eval.git ../auto-ontology-eval
(cd ../auto-ontology-eval && uv sync && cp .env.example .env && \
POSTGRES_PASSWORD='' \
uv run python scripts/seed/seed_wwi.py --database-name wideworldimporters --drop)
Build and start the rest of the stack:
docker compose up -d --build
Open and sign in with AUTO_ONTOLOGY_ADMIN_EMAIL and
AUTO_ONTOLOGY_ADMIN_PASSWORD from .env. Go to **Settings → Semantic
Compilation** and turn it on. Ingestion runs at startup; compilation starts
immediately and reports Semantic compilation is ready when it finishes.
Ask a question in Chat:
What was revenue for the USB food flash drive - sushi roll in Pennsylvania
in June 2015?
The agent resolves revenue, product, and state to terms in the
ontology, follows their relationships to the joins it needs, and runs the
query. The answer comes back with its SQL and the steps that produced it,
so you can check the result against the source:
Answer: Revenue for USB food flash drive - sushi roll in Pennsylvania in
June 2015 was $588.80, from 3 invoice lines.
SQL: SELECT SUM(il.extendedprice) AS revenue, COUNT(*) AS invoice_lines
FROM sales.invoicelines il
JOIN sales.invoices i ON il.invoiceid = i.invoiceid
JOIN warehouse.stockitems si ON il.stockitemid = si.stockitemid
JOIN sales.customers c ON i.customerid = c.customerid
JOIN application.cities ct ON c.deliverycityid = ct.cityid
JOIN application.stateprovinces sp ON ct.stateprovinceid = sp.stateprovinceid
WHERE si.stockitemname = 'USB food flash drive - sushi roll'
AND sp.stateprovincename = 'Pennsylvania'
AND i.invoicedate >= '2015-06-01' AND i.invoicedate invoice -> customer -> city -> state province
Validated the filter values against the data, then executed
Ask something the data can't answer. Wide World Importers has no
advertising data, so a question about ad spend has nothing to resolve
against. An agent connected through MCP checks answerability
first and asks you to clarify:
You: What was return on ad spend for the sushi roll flash drive in June 2015?
Agent: check_answerable -> coverage 0.5; no term covers "ad spend"
Agent: I can find revenue for that product, but this data has no
advertising spend, so I can't compute return on ad spend. Do you
want June 2015 revenue instead, or is ad spend tracked in another
source I should connect?
If the UI loads without its left navigation after a restart, the browser is
holding a stale session cookie. Clear site data for localhost:3000 and sign in
again. For other setup failures, see the
setup skill's troubleshooting guide.
How it works
Auto-Ontology works in three stages: it generates an ontology, people certify
it, and the agent answers questions from it.
The ontology holds three kinds of definition:
Terms. Business concepts such as Customer or Invoice Line, each with a
description and synonyms, mapped to the columns that hold them.
SQL attributes. Reviewed SQL expressions under a term, such as a margin or
a rolling total. The agent reuses them, so answers compute each measure the
same way.
Relationships. How tables join, including bridge tables, inferred from
keys and from the data.
Generate. The ingestion service builds a first draft from the source
databases:
Read sources: extract schemas, profile columns, and sample values into the
catalog.
Name entities: extract terms table by table and map each to columns.
Resolve relationships: infer joins between tables and bridge tables, and
suggest SQL attributes from query history.
Write the ontology: store terms, relationships, and SQL attributes in
Postgres, with embeddings in pgvector for retrieval.
The result is a semantic graph you can explore in the UI. In this example, one
compilation of Wide World Importers produced 31 terms; selecting Order shows
its description, related terms, mapped columns, and SQL attributes:
Certify. People make the draft trustworthy:
Test with real questions in Chat, or with check_answerable and
ask_question over MCP.
Refine terms, descriptions, and SQL attributes in the UI or through the API.
Certify names, descriptions, and SQL attributes once they're correct.
Answer. For each question, the agent:
Classifies the intent and extracts the entities the question names.
Retrieves candidate terms, columns, and SQL attributes by embedding search.
Writes SQL from those candidates.
Checks the filter values and the query against the database, repairing the
SQL when a check fails.
Runs the query and returns the answer with its SQL and the steps it took.
When the candidates can't support a query, the agent reports that the question
can't be answered from this data. Predictive questions go to KumoRFM when it's
configured (see Predictions).
In Chat, each answer shows its SQL, and you can view the rows, download them as
CSV, or read them as a chart:
Auto-Ontology is compatible with Apache Ossie, the
open standard for exchanging semantic models. Ossie includes a
converter for Auto-Ontology,
which Auto-Ontology uses to import and export model definitions as Ossie YAML.
Use Settings → Import / Export, or POST /api/model/import and
POST /api/model/export.
| Component | Technology | Role | Port |
| ------------------- | --------------------------------- | ------------------------------------------ | ---- |
| Frontend | Next.js, Better Auth, Prisma | Web UI, authentication, public API gateway | 3000 |
| Backend | FastAPI (Python 3.12+), LangChain | Text-to-SQL agent, catalog, ontology APIs | 3001 |
| Ingestion service | FastAPI (Python 3.12+) | Ingestion and semantic compilation | 3002 |
| MCP server | FastMCP | Read-only agent tools over the public API | 3003 |
| Postgres + pgvector | PostgreSQL 17 | Catalog, ontology, app data, vector store | 5432 |
| HashiCorp Vault | Optional | Connection credential storage | n/a |
Keep ports 3001 and 3002 on a private network. FastAPI trusts the user identity
the frontend forwards in the x-auto-ontology-user-id header, and the ingestion
service's endpoints (ingest, delete, reset, compile) have no authentication of
their own. Clients go through the web app on port 3000.
Use it from your agent
MCP server
The MCP server gives any MCP client read-only
tools over the ontology. Each user signs in through Auto-Ontology, and every
call runs with that user's permissions.
| Job | Tools |
| ------------- | ------------------------------------------------------------- |
| Readiness | check_readiness: can this deployment answer anything at all |
| Terms | search_terms, get_term, get_term_columns, get_term_sql_attributes, get_sql_attribute, describe_table |
| Answerability | check_answerable: does the ontology cover this question |
| Questions | ask_question: the answer, the SQL, and the rows |
Run the server against your deployment:
AUTO_ONTOLOGY_API_URL=http://localhost:3000 \
uvx --from "git+https://github.com/NVIDIA/auto-ontology.git#subdirectory=mcp" auto-ontology-mcp
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"auto-ontology": { "url": "http://localhost:3003/mcp" }
}
}
Claude Desktop (claude_desktop_config.json), bridged with
mcp-remote:
{
"mcpServers": {
"auto-ontology": {
"command": "npx",
"args": "mcp-remote", "http://localhost:3003/mcp"]
}
}
}
Restart the client after editing its config, then sign in when it prompts.
Sign-in, configuration, and troubleshooting are in [docs/mcp.md.
Agent skills
Three skills teach a coding agent to work with Auto-Ontology. Start at
AGENTS.md.
| Skill | Covers |
| -------------------------------------------------------------------- | ---------------------------------------------------- |
| nvidia-ontology-setup | Install, connect sources, compile, prove readiness |
| nvidia-ontology-management | Inspect, model, certify, import/export, and publish |
| nvidia-ontology-query | Ask questions and validate the SQL, rows, and answer |
REST API
Ask a question with POST /api/chat/completions on the web app's origin. Mint
an API token under the user menu → API Tokens. The response is a
server-sent event stream: a result event carries the answer, and
data: DONE] ends the stream.
curl -N http://localhost:3000/api/chat/completions \
-H "x-api-key: $AUTO_ONTOLOGY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"question": "How many orders shipped last week?"}'
import json
import os
import requests
response = requests.post(
"http://localhost:3000/api/chat/completions",
headers={"x-api-key": os.environ["AUTO_ONTOLOGY_API_TOKEN"]},
json={"question": "How many orders shipped last week?"},
stream=True,
timeout=900,
)
response.raise_for_status()
for line in response.iter_lines(decode_unicode=True):
if not line or not line.startswith("data:"):
continue
payload = line.removeprefix("data:").strip()
if payload == "[DONE]":
break
event = json.loads(payload)
if event["type"] == "result":
print(event["answer")
print(event"answer")
elif event"type"] == "error":
raise RuntimeError(event["message"])
Event types, multi-turn conversations, and the gateway trust boundary are in
[docs/conversation-api.md. Every other operation is
in the OpenAPI spec.
Connectors, models, and predictions
Sources
Auto-Ontology connects to ten engines:
PostgreSQL
MySQL
Databricks
Snowflake
ClickHouse
Trino
Apache Kyuubi
HeavyDB
DuckDB
SQLite
Add connections under Settings → Connections, or list them in
CONNECTION_STRINGS. DuckDB and SQLite are connection-string only. See
docs/connections.md for URL schemes, scoping, and
credential storage.
Models
Auto-Ontology uses four model roles. With an nvapi- key, each defaults to an
NVIDIA NIM on build.nvidia.com:
| Role | Default model | What it does |
| --------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| REASONING | nvidia/nemotron-3.5-lightning-30b-a3b | Builds the ontology (terms, relationships, SQL attributes), writes each answer's SQL and explanation, and grades answerability |
| NON_REASONING | nvidia/nemotron-3.5-lightning-30b-a3b | Runs the agent's faster steps: question intent, entity extraction, candidate selection, and SQL checks and repair |
| EMBED | nvidia/nemotron-3.5-embed-1b | Indexes tables, columns, terms, and SQL attributes in pgvector, and matches each question to them |
| RERANK | nvidia/nemotron-3.5-rerank-8b | Ranks candidate tables when compilation builds bridge-table SQL attributes |
To use self-hosted NIM or any OpenAI-compatible endpoint, set
_ENDPOINT, _API_KEY, and _MODEL. Any field you leave
unset falls back to DEFAULT_MODELS_, so the simplest setup fills in
DEFAULT_MODELS_* and overrides only what differs. Use models
that support structured output, and keep the embedding model the same for
ingestion and queries. .env.example documents every
variable.
Predictions
Set KUMO_RFM_API_KEY and the agent routes predictive questions to KumoRFM.
KumoRFM is a hosted service: to answer, the agent uploads the connected tables
to it, capped by KUMO_MAX_TABLES (20 by default) and
KUMO_MAX_ROWS_PER_TABLE (unlimited unless set). Review what that sends, and
complete your organization's data review, before you enable it.
Integrate with us
To integrate an agent platform, application, or storage provider with
Auto-Ontology,
open an integration request.
The Auto-Ontology team maintains the code and doesn't accept external pull
requests. Integration requests and bug reports are welcome as issues. Report
security vulnerabilities through SECURITY.md. Maintainer
workflow is in CONTRIBUTING.md.
Reference
| Topic | Doc |
| --------------------------------------- | ---------------------------------------------------- |
| Kubernetes deployment with Helm | DEPLOYMENT.md |
| Connections, scoping, and Vault | docs/connections.md |
| Authentication, SSO, and API tokens | docs/authentication.md |
| Conversation API | docs/conversation-api.md |
| MCP server | docs/mcp.md |
| REST API | docs/openapi/auto-ontology-api.json |
License
Auto-Ontology is licensed under the Apache License, Version 2.0.
SPDX identifier: Apache-2.0.
Each NVIDIA-authored source file in this repository carries an SPDX header
of the form:
SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES.
All rights reserved.
SPDX-License-Identifier: Apache-2.0
Third-party open-source components used by Auto-Ontology are enumerated, with their
upstream licenses and project URLs, in
THIRD_PARTY_NOTICES.md. Components added by the
container images are listed separately in
CONTAINER_THIRD_PARTY_NOTICES.md.
Notice and Disclaimer
NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or
interacts with external materials. Those retrieved materials are not
distributed with this software and are governed solely by separate terms,
conditions and licenses. You are solely responsible for finding, reviewing and
complying with all applicable terms, conditions, and licenses, and for
verifying the security, integrity and suitability of any retrieved materials
for your specific use case. This software is provided "AS IS", without warranty
of any kind. The author makes no representations or warranties regarding any
retrieved materials, and assumes no liability for any losses, damages,
liabilities or legal consequences from your use or inability to use this
software or any retrieved materials. Use this software and the retrieved
materials at your own risk.
External materials Auto-Ontology interacts with at run time:
Model endpoints you configure, by default the NVIDIA API catalog
(integrate.api.nvidia.com, ai.api.nvidia.com), under each provider's and
model's terms.
The KumoRFM service, only when KUMO_RFM_API_KEY is set, under Kumo's terms.
Your source databases, under your agreements for those systems.
Security
Report security vulnerabilities as described in SECURITY.md.
Python
10.7K
stars
9.3K
forks
What users love
No positive feedback yet
Areas for improvement
Missing source connectors: reviewers request BigQuery support (2 helpfulness votes) and DolphinDB support (1 vote).
Inaccurate documentation: MCP setup incorrectly describes the public repository as NVIDIA-internal and requiring GitHub credentials (2 votes); SQLDatabase documents a nonexistent dialect constructor argument (1 vote).
Hosted NVIDIA API incompatibility breaks Text-to-SQL: nvext.guided_json is rejected with HTTP 400, while OpenAI response_format returns empty content (1 vote).
A reviewer requests capability-matched Kumo prediction clients (1 vote).
A reviewer requests improved agent security, without specifying vulnerabilities or required changes (1 vote).
What users love
No positive feedback yetAreas for improvement
Missing source connectors: reviewers request BigQuery support (2 helpfulness votes) and DolphinDB support (1 vote).
Inaccurate documentation: MCP setup incorrectly describes the public repository as NVIDIA-internal and requiring GitHub credentials (2 votes); SQLDatabase documents a nonexistent dialect constructor argument (1 vote).
Hosted NVIDIA API incompatibility breaks Text-to-SQL: nvext.guided_json is rejected with HTTP 400, while OpenAI response_format returns empty content (1 vote).
A reviewer requests capability-matched Kumo prediction clients (1 vote).
A reviewer requests improved agent security, without specifying vulnerabilities or required changes (1 vote).
2
thedotmack/claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
TypeScript115.1K6.4K
2
thedotmack/claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
TypeScript
115.1K
stars
6.4K
forks
What users love
Persistent memory that survives across sessions.
Automatic capture and compression of Claude's actions.
Relevant context is injected back into future sessions.
Web Viewer UI for real-time memory stream.
Skill-based search for querying project history.
Areas for improvement
Stop hook failures with 'Unknown event type: session-complete'.
Stop hook can cause infinite session loops when summarize output is interpreted as instructions.
CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED setting is documented but not implemented.
Creates CLAUDE.md files in arbitrary and potentially problematic working directories (e.g., inside .git/).
Worker service leaks numerous Claude subprocesses, leading to high system resource consumption and potential crashes.
What users love
Persistent memory that survives across sessions.
Automatic capture and compression of Claude's actions.
Relevant context is injected back into future sessions.
Web Viewer UI for real-time memory stream.
Skill-based search for querying project history.
Areas for improvement
Stop hook failures with 'Unknown event type: session-complete'.
Stop hook can cause infinite session loops when summarize output is interpreted as instructions.
CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED setting is documented but not implemented.
Creates CLAUDE.md files in arbitrary and potentially problematic working directories (e.g., inside .git/).
Worker service leaks numerous Claude subprocesses, leading to high system resource consumption and potential crashes.
3
max-sixty/worktrunk
Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Rust12.2K2.3K
3
max-sixty/worktrunk
Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Rust
12.2K
stars
2.3K
forks
What users love
Users actively request workflow enhancements around worktree creation, switching, branch cleanup, upstream setup, and list sorting, indicating the CLI addresses a meaningful worktree-management need.
Requests for AI-agent-native naming and an OpenCode activity plugin indicate interest in the product's parallel AI-agent workflow direction.
A documentation suggestion and request for version annotations show users value the project documentation and want it made more actionable and easier to navigate.
Areas for improvement
Shell initialization can generate broken tab completion when a custom command name is used (`config shell init --cmd <name>`).
Codex activity hooks fail on Windows when an unqualified `bash` resolves to WSL, creating a cross-platform compatibility issue.
A partial `git worktree add` failure can leave an orphan branch; `wt switch --create` needs detection and cleanup.
`wt list` lacks requested sorting support, limiting usability when managing many worktrees.
Security tooling flags the Worktrunk skill at a critical risk level, requiring investigation and remediation.
What users love
Users actively request workflow enhancements around worktree creation, switching, branch cleanup, upstream setup, and list sorting, indicating the CLI addresses a meaningful worktree-management need.
Requests for AI-agent-native naming and an OpenCode activity plugin indicate interest in the product's parallel AI-agent workflow direction.
A documentation suggestion and request for version annotations show users value the project documentation and want it made more actionable and easier to navigate.
Areas for improvement
Shell initialization can generate broken tab completion when a custom command name is used (`config shell init --cmd <name>`).
Codex activity hooks fail on Windows when an unqualified `bash` resolves to WSL, creating a cross-platform compatibility issue.
A partial `git worktree add` failure can leave an orphan branch; `wt switch --create` needs detection and cleanup.
`wt list` lacks requested sorting support, limiting usability when managing many worktrees.
Security tooling flags the Worktrunk skill at a critical risk level, requiring investigation and remediation.
4
anthropics/skills
Public repository for Agent Skills
Python190.1K3.2K
4
anthropics/skills
Public repository for Agent Skills
Python
190.1K
stars
3.2K
forks
What users love
Demonstrates a wide range of capabilities from creative to technical and enterprise workflows.
Provides a clear structure for creating custom skills with a template and detailed instructions.
Includes advanced document manipulation skills (docx, pdf, pptx, xlsx) for complex file formats.
Offers practical examples for integrating external APIs and services.
Showcases how to apply branding guidelines and create professional themes.
Areas for improvement
License terms may misappropriate code from tool documentation.
XLSX documentation skill can corrupt files, causing Excel to flag them as corrupt and remove sheets.
Skill creator generates skills that fail validation due to missing frontmatter properties.
Potential security risk with xml.etree.ElementTree in evaluation.py; defusedxml is recommended.
Documentation needs updates and has typos.
What users love
Demonstrates a wide range of capabilities from creative to technical and enterprise workflows.
Provides a clear structure for creating custom skills with a template and detailed instructions.
Includes advanced document manipulation skills (docx, pdf, pptx, xlsx) for complex file formats.
Offers practical examples for integrating external APIs and services.
Showcases how to apply branding guidelines and create professional themes.
Areas for improvement
License terms may misappropriate code from tool documentation.
XLSX documentation skill can corrupt files, causing Excel to flag them as corrupt and remove sheets.
Skill creator generates skills that fail validation due to missing frontmatter properties.
Potential security risk with xml.etree.ElementTree in evaluation.py; defusedxml is recommended.
Documentation needs updates and has typos.
5
Donchitos/Claude-Code-Game-Studios
Claude Code Game Studios
Turn a single Claude Code session into a full game development studio.
49 agents. 74 skills. One coordinated AI team.
Why This Exists
Building a game solo with AI is powerful — but a single chat session has no structure. No one stops you from hardcoding magic numbers, skipping design docs, or writing spaghetti code. There's no QA pass, no design review, no one asking "does this actually fit the game's vision?"
Claude Code Game Studios solves this by giving your AI session the structure of a real studio. Instead of one general-purpose assistant, you get 49 specialized agents organized into a studio hierarchy — directors who guard the vision, department leads who own their domains, and specialists who do the hands-on work. Each agent has defined responsibilities, escalation paths, and quality gates.
The result: you still make every decision, but now you have a team that asks the right questions, catches mistakes early, and keeps your project organized from first brainstorm to launch.
Table of Contents
What's Included
Studio Hierarchy
Slash Commands
Does it produce games, or documents?
Getting Started
Configuration
Upgrading
Project Structure
How It Works
Design Philosophy
Customization
Platform Support
Community
Supporting This Project
License
What's Included
| Category | Count | Description |
|----------|-------|-------------|
| Agents | 49 | Specialized subagents across design, programming, art, audio, narrative, QA, and production |
| Skills | 74 | Slash commands for every workflow phase (/start, /design-system, /create-epics, /create-stories, /dev-story, /story-done, etc.) |
| Hooks | 15 | Automated validation on commits, pushes, asset changes, design-doc reads, writes and registries, session lifecycle, agent audit trail, and gap detection |
| Rules | 14 | Path-scoped coding standards enforced when editing gameplay, engine, AI, UI, network code, scene and asset files, and more |
| Templates | 62 | Document templates for GDDs, UX specs, ADRs, sprint plans, HUD design, accessibility, and more |
Studio Hierarchy
Agents are organized into three tiers, matching how real studios operate:
Tier 1 — Directors
creative-director technical-director producer
Tier 2 — Department Leads
game-designer lead-programmer art-director
audio-director narrative-director qa-lead
release-manager localization-lead
Tier 3 — Specialists
gameplay-programmer engine-programmer ai-programmer
network-programmer tools-programmer ui-programmer
systems-designer level-designer economy-designer
technical-artist sound-designer writer
world-builder ux-designer prototyper
performance-analyst devops-engineer analytics-engineer
security-engineer qa-tester accessibility-specialist
live-ops-designer community-manager
Each agent declares a model in its frontmatter: the three directors ask for
Opus, lead-programmer and fifteen specialists name Sonnet, and the remaining thirty
inherit your session's model. Treat the tiers as seniority of role, not as
a billing plan — most of the studio runs on whatever model you are already using.
Engine Specialists
The template includes agent sets for all three major engines. Use the set that matches your project:
| Engine | Lead Agent | Sub-Specialists |
|--------|-----------|-----------------|
| Godot 4 | godot-specialist | GDScript, Shaders, GDExtension |
| Unity | unity-specialist | DOTS/ECS, Shaders/VFX, Addressables, UI Toolkit |
| Unreal Engine 5 | unreal-specialist | GAS, Blueprints, Replication, UMG/CommonUI |
Slash Commands
Type / in Claude Code to access all 74 skills:
Onboarding & Navigation
/start /help /project-stage-detect /setup-engine /adopt /settings
Game Design
/brainstorm /map-systems /design-system /quick-design /review-all-gdds /propagate-design-change
Art & Assets
/art-bible /asset-spec /asset-audit
UX & Interface Design
/ux-design /ux-review
Architecture
/create-architecture /architecture-decision /architecture-review /create-control-manifest
Stories & Sprints
/create-epics /create-stories /dev-story /sprint-plan /sprint-status /story-readiness /story-done /estimate
Reviews & Analysis
/design-review /code-review /balance-check /content-audit /scope-check /perf-profile /tech-debt /gate-check /consistency-check /security-audit
QA & Testing
/qa-plan /smoke-check /soak-test /regression-suite /test-setup /test-helpers /test-evidence-review /test-flakiness /skill-test /skill-improve
Production
/milestone-review /retrospective /bug-report /bug-triage /reverse-document /playtest-report
Release
/release-checklist /launch-checklist /changelog /patch-notes /hotfix /day-one-patch
Creative & Content
/prototype /vertical-slice /onboard /localize
Team Orchestration (coordinate multiple agents on a single feature)
/team-combat /team-narrative /team-ui /team-release /team-polish /team-audio /team-level /team-live-ops /team-qa
Does it produce games, or documents?
A fair question, and the answer is a measurement rather than a sample project.
Four games were built from one brief at different modes.rigor levels and the
documents each wrote before its first line of game code were counted:
| modes.rigor | Docs before first line of game code | Time |
|---|---:|---:|
| minimal | 1 (the one-page brief) | 0 min |
| standard | 30 | 58 min |
All of them produced a running, tested game. Two blind reviewers and a human
playtest then ranked the standard build last — the extra 29 documents
bought traceability, not a better game.
It runs the game and looks at it
The measurement above is about cost. The other half is whether the thing works,
and for a game that means someone has to look at it — a passing test says
nothing about a menu drawn off-screen. So a story that changes anything the
player sees is not closed until the game has been launched, observed, and a
screenshot retained in production/qa/evidence/. A parse check is not a run.
This holds at every rigor level, including minimal, where automated tests are
waived but the look is not.
The games themselves are deliberately not shipped here: this is a template
you clone to start your own project, and somebody else's game in your repo is
clutter, not evidence.
Getting Started
Prerequisites
Git
Claude Code — the native installer is recommended (npm install -g @anthropic-ai/claude-code also works, on Node.js 22+)
Python 3 — reads project.yaml for every skill and hook; without it every setting silently falls back to its default
Bash — runs every hook; built into macOS and Linux, and on Windows it comes with Git for Windows
Recommended: jq (for hook validation)
Hooks fail gracefully if optional tools are missing — you just lose validation — with one deliberate exception: a commit that stages data JSON is blocked when there is no Python to validate it.
Setup
Clone or use as template:
git clone https://github.com/Donchitos/Claude-Code-Game-Studios.git my-game
cd my-game
Open Claude Code in the project's root folder (the one holding
CLAUDE.md and project.yaml) and start a session:
claude
Starting it in a subfolder such as src/ skips the project's hooks, deny
rules and ask-first permission mode.
Run /start — the system asks where you are (no idea, vague concept,
clear design, existing work) and guides you to the right workflow. No assumptions.
Or jump directly to a specific skill if you already know what you need:
/brainstorm — explore game ideas from scratch
/setup-engine godot 4.7 — configure your engine if you already know
/project-stage-detect — analyze an existing project
Configuration
project.yaml at the repo root is the single source of truth for how the
studio behaves on your project — engine, naming conventions, and a modes
block that controls how much process every skill enforces. /start writes it
for you; you rarely need to hand-edit it.
The one question that matters most is modes.rigor — minimal, standard,
or full. It's a single front door over six separate knobs (workflow —
which GDD sections are required, docs.density, qa.level,
story_granularity, review_mode — how many director agents review your work,
and team.size), so /start asks it once instead of six times:
minimal (default) — jam-game speed. No GDDs required, terse docs, minimal QA evidence, solo review. /start → /setup-engine → /brainstorm (a one-page brief) → /create-stories → /dev-story ↔ /story-done.
standard — 5 required GDD sections, balanced doc depth, standard QA evidence, lean review.
full — all 8 GDD sections, thorough docs, full QA evidence on every story type, full director review.
minimal is the default because the heavier tier costs more to reach working
code without producing a better result, and gives nothing back when someone new
picks the project up. Raise it in one /settings call when your project grows
— /help and /gate-check will suggest it when they see the signs.
Two escape hatches keep one setting from being a blunt instrument.
system_overrides holds a single system to a higher standard than the rest
of the project — your combat system gets the full treatment while everything
else stays light. testing.strict sets, per test type (logic, integration,
visual, UI, config), whether missing evidence blocks a story or merely warns.
Any of the six underlying knobs can still be set individually if you want a mix
(e.g. workflow: full with docs.density: terse — comprehensive but compact).
Two of them — review_mode (full / lean / solo) and team.size — are
also personal: rigor sets the team-wide default, but you can override them
per-developer in a gitignored project.local.yaml without touching the shared
config. modes.automation (how often the AI pauses to ask before it acts) sits
outside rigor and is likewise personally overridable.
View or change any setting with the /settings skill:
/settings # view effective config
/settings modes.review_mode # view one setting
/settings modes.rigor=full # write to project.yaml (team-wide)
/settings --local modes.review_mode=solo # write to project.local.yaml (just you)
Full schema and per-setting behavior: .claude/docs/effects-map.md.
Upgrading
Already using an older version of this template? See UPGRADING.md
for step-by-step migration instructions, a breakdown of what changed between
versions, and which files are safe to overwrite vs. which need a manual merge.
Project Structure
CLAUDE.md # Master configuration
.claude/
settings.json # Hooks, permissions, safety rules
agents/ # 49 agent definitions (markdown + YAML frontmatter)
skills/ # 74 slash commands (subdirectory per skill)
hooks/ # 18 scripts (bash) — 15 event hooks, two helpers they
source (yaml-helper.sh, update-check.sh), and one
opt-in diagnostic you wire yourself
rules/ # 14 path-scoped coding standards
statusline.sh # Status line script (context%, model, stage, epic breadcrumb)
docs/
workflow-catalog.yaml # 7-phase pipeline definition (read by /help)
templates/ # 62 document templates (+ per-section guidance)
src/ # Game source code (Godot). The code root is
ENGINE-SPECIFIC: Unity compiles only
Assets/, Unreal builds from Source//
assets/ # Art, audio, VFX, shaders, data files
design/ # GDDs, narrative docs, level designs
docs/ # Technical documentation and ADRs
tests/ # Test suites (unit, integration, performance, playtest)
tools/ # Build and pipeline tools
prototypes/ # Throwaway prototypes (isolated from src/)
production/ # Sprint plans, milestones, release tracking
studio-tests/ # QA for the skills and agents themselves — see below
Testing your customizations
CCGS is a template you are meant to edit. studio-tests/ is how
you check that an edited or newly written skill still holds up — a catalog of all
74 skills and 49 agents, per-category quality rubrics, behavioral specs, and
templates for writing specs of your own.
/skill-test static name] # structural linter — 7 compliance checks
/skill-test category [name] # category-specific quality rubric
/skill-test spec [name] # behavioral spec assertions
/skill-test audit # coverage report across skills and agents
/skill-improve [name] # test-fix-retest loop; keeps or reverts on score change
It tests the framework, never your game — game tests live in tests/.
How It Works
Agent Coordination
Agents follow a structured delegation model:
Vertical delegation — directors delegate to leads, leads delegate to specialists
Horizontal consultation — same-tier agents can consult each other but can't make binding cross-domain decisions
Conflict resolution — disagreements escalate up to the shared parent (creative-director for design, technical-director for technical)
Change propagation — cross-department changes are coordinated by producer
Domain boundaries — agents don't modify files outside their domain without explicit delegation
Collaborative, Not Autonomous
This is not an auto-pilot system. Every agent follows a strict collaboration protocol:
Ask — agents ask questions before proposing solutions
Present options — agents show 2-4 options with pros/cons
You decide — the user always makes the call
Draft — agents show work before finalizing
Approve — nothing gets written without your sign-off
You stay in control. The agents provide structure and expertise, not autonomy.
That is how a terminal session started at the project root behaves out of the
box. The guided and autonomous automation settings, and Claude Code's own
auto mode, trade some of these prompts for speed; see
[setup-requirements.md for the routes into
auto mode.
Automated Safety
Hooks run automatically on every session:
| Hook | Trigger | What It Does |
|------|---------|--------------|
| validate-commit.sh | PreToolUse (Bash, PowerShell) | Checks for hardcoded values, TODO format, JSON validity, design doc sections — exits early if the command is not git commit |
| validate-push.sh | PreToolUse (Bash, PowerShell) | Warns on pushes to protected branches, and on git tag, git merge, gh release, butler push and steamcmd +run_app_build — exits early for any other command |
| validate-read.sh | PreToolUse (Read) | Refuses a whole-file read of a design doc over 40 KB and answers with its headings, so the retry reads one section (features.read_guard) |
| validate-write.sh | PreToolUse (Write/Edit) | Warns, never blocks, when a write would break a rule the skills state: a file they never overwrite, the config guard, the prototype boundary, a localization freeze |
| validate-registry.sh | PreToolUse (Write/Edit) | Warns when a write to the entity or TR-ID registry would delete or renumber an entry, or set a status its header does not list |
| validate-assets.sh | PostToolUse (Write/Edit) | Checks data-file JSON under assets/, Assets/ or Content/, and asset naming in Godot's assets/ only — exits early if the file is under none of them |
| session-start.sh | Session open | Shows current branch and recent commits for orientation |
| detect-gaps.sh | Session open | Detects fresh projects (suggests /start) and missing design docs when code or prototypes exist |
| pre-compact.sh | Before compaction | Logs the compaction (its output does not reach Claude — session-start.sh restores context afterwards) |
| notify.sh | Permission prompt, or idle about a minute | Shows Windows toast notification via PowerShell |
| session-stop.sh | Every response end, in the background | Archives active.md to session log and records git activity |
| log-agent.sh | Agent spawned | Audit trail start — logs subagent invocation |
| log-agent-stop.sh | Agent stops | Audit trail stop — completes subagent record |
| validate-agent-artifact.sh | Agent stops | Warns when a subagent stops without writing the file its brief named |
| validate-skill-change.sh | PostToolUse (Write/Edit) | Advises running /skill-test after any .claude/skills/ change |
Note: validate-commit.sh, validate-push.sh, validate-read.sh, validate-write.sh, validate-registry.sh, validate-assets.sh and validate-skill-change.sh fire on every Bash, PowerShell, Read, Write or Edit tool call and exit immediately (exit 0) when the command or file path is not relevant. This is normal hook behavior — not a performance concern.
Permission rules in settings.json auto-allow test runs and block dangerous operations (force push, rm -rf, reading .env files) in both the Bash and PowerShell tools. Read-only commands such as git status, git log and ls need no rule: Claude Code runs them without asking. The git rules match anywhere after git, so a git command whose text only mentions push followed later by + or -f, clean followed by -f, or reset followed by --hard — a commit message such as git commit -m "push + pull" included — is denied too: reword the message.
Path-Scoped Rules
Coding standards are automatically enforced based on file location. The paths
below are Godot's. Each rule also matches the Unity and Unreal layouts: the code
rules match C# under Assets//Gameplay/ and C++ under Source//Gameplay/ (and Core,
AI, Networking, UI), data matches JSON under Assets/**/Data/ and
Content/**/Data/, shaders match by file type, and tests match
C# under Assets/Tests/ and C++ under Source/**/Tests/.
| Path | Enforces |
|------|----------|
| src/gameplay/** | Data-driven values, delta time usage, no UI references |
| src/core/** | Zero allocations in hot paths, thread safety, API stability |
| src/ai/** | Performance budgets, debuggability, data-driven parameters |
| src/networking/** | Server-authoritative, versioned messages, security |
| src/ui/** | No game state ownership, localization-ready, accessibility |
| design/gdd/** | Required sections per modes.workflow, formula format, edge cases |
| design/narrative/** | Lore consistency, character voice, canon levels |
| assets/data/*/.json | JSON validity, naming conventions, schema rules |
| assets/shaders/** | Naming conventions, performance targets, cross-platform rules |
| /*.tscn, /*.tres | Scene and resource files changed in the editor where possible; safe hand-edit rules |
| tests/** | Test naming, coverage requirements, fixture patterns |
| prototypes/** | Relaxed standards, README required, hypothesis documented |
Design Philosophy
This template is grounded in professional game development practices:
MDA Framework — Mechanics, Dynamics, Aesthetics analysis for game design
Self-Determination Theory — Autonomy, Competence, Relatedness for player motivation
Flow State Design — Challenge-skill balance for player engagement
Bartle Player Types — Audience targeting and validation
Verification-Driven Development — Tests first, then implementation
Customization
This is a template, not a locked framework. Everything is meant to be customized:
Add/remove agents — delete agent files you don't need, add new ones for your domains
Edit agent prompts — tune agent behavior, add project-specific knowledge
Modify skills — adjust workflows to match your team's process
Add rules — create new path-scoped rules for your project's directory structure
Tune hooks — adjust validation strictness, add new checks
Pick your engine — use the Godot, Unity, or Unreal agent set (or none)
Tune process weight — modes.rigor and its underlying knobs in project.yaml (see Configuration). Override per-run with --review solo on any skill.
Platform Support
Primary development on Windows 10 with Git Bash. The hooks and scripts are also tested on macOS — its stock bash 3.2 and BSD tools, with and without jq — and on Linux. All hooks use POSIX-compatible patterns (grep -E, not grep -P) and include fallbacks for missing tools. The notify.sh hook uses PowerShell for Windows toast notifications and is a no-op elsewhere — desktop notifications on macOS/Linux are not yet wired. Please file issues for any platform-specific breakage.
Community
Discussions — GitHub Discussions for questions, ideas, and showcasing what you've built
Issues — Bug reports and feature requests
Supporting This Project
Claude Code Game Studios is free and open source. If it saves you time or helps you ship your game, consider supporting continued development:
Buy Me a Coffee — one-time support
GitHub Sponsors — recurring support through GitHub
Sponsorships help fund time spent maintaining skills, adding new agents, keeping up with Claude Code and engine API changes, and responding to community issues.
Built for Claude Code. Maintained and extended — contributions welcome via GitHub Discussions.
License
MIT License. See LICENSE for details.
Shell37.2K5.2K
5
Donchitos/Claude-Code-Game-Studios
Claude Code Game Studios
Turn a single Claude Code session into a full game development studio.
49 agents. 74 skills. One coordinated AI team.
Why This Exists
Building a game solo with AI is powerful — but a single chat session has no structure. No one stops you from hardcoding magic numbers, skipping design docs, or writing spaghetti code. There's no QA pass, no design review, no one asking "does this actually fit the game's vision?"
Claude Code Game Studios solves this by giving your AI session the structure of a real studio. Instead of one general-purpose assistant, you get 49 specialized agents organized into a studio hierarchy — directors who guard the vision, department leads who own their domains, and specialists who do the hands-on work. Each agent has defined responsibilities, escalation paths, and quality gates.
The result: you still make every decision, but now you have a team that asks the right questions, catches mistakes early, and keeps your project organized from first brainstorm to launch.
Table of Contents
What's Included
Studio Hierarchy
Slash Commands
Does it produce games, or documents?
Getting Started
Configuration
Upgrading
Project Structure
How It Works
Design Philosophy
Customization
Platform Support
Community
Supporting This Project
License
What's Included
| Category | Count | Description |
|----------|-------|-------------|
| Agents | 49 | Specialized subagents across design, programming, art, audio, narrative, QA, and production |
| Skills | 74 | Slash commands for every workflow phase (/start, /design-system, /create-epics, /create-stories, /dev-story, /story-done, etc.) |
| Hooks | 15 | Automated validation on commits, pushes, asset changes, design-doc reads, writes and registries, session lifecycle, agent audit trail, and gap detection |
| Rules | 14 | Path-scoped coding standards enforced when editing gameplay, engine, AI, UI, network code, scene and asset files, and more |
| Templates | 62 | Document templates for GDDs, UX specs, ADRs, sprint plans, HUD design, accessibility, and more |
Studio Hierarchy
Agents are organized into three tiers, matching how real studios operate:
Tier 1 — Directors
creative-director technical-director producer
Tier 2 — Department Leads
game-designer lead-programmer art-director
audio-director narrative-director qa-lead
release-manager localization-lead
Tier 3 — Specialists
gameplay-programmer engine-programmer ai-programmer
network-programmer tools-programmer ui-programmer
systems-designer level-designer economy-designer
technical-artist sound-designer writer
world-builder ux-designer prototyper
performance-analyst devops-engineer analytics-engineer
security-engineer qa-tester accessibility-specialist
live-ops-designer community-manager
Each agent declares a model in its frontmatter: the three directors ask for
Opus, lead-programmer and fifteen specialists name Sonnet, and the remaining thirty
inherit your session's model. Treat the tiers as seniority of role, not as
a billing plan — most of the studio runs on whatever model you are already using.
Engine Specialists
The template includes agent sets for all three major engines. Use the set that matches your project:
| Engine | Lead Agent | Sub-Specialists |
|--------|-----------|-----------------|
| Godot 4 | godot-specialist | GDScript, Shaders, GDExtension |
| Unity | unity-specialist | DOTS/ECS, Shaders/VFX, Addressables, UI Toolkit |
| Unreal Engine 5 | unreal-specialist | GAS, Blueprints, Replication, UMG/CommonUI |
Slash Commands
Type / in Claude Code to access all 74 skills:
Onboarding & Navigation
/start /help /project-stage-detect /setup-engine /adopt /settings
Game Design
/brainstorm /map-systems /design-system /quick-design /review-all-gdds /propagate-design-change
Art & Assets
/art-bible /asset-spec /asset-audit
UX & Interface Design
/ux-design /ux-review
Architecture
/create-architecture /architecture-decision /architecture-review /create-control-manifest
Stories & Sprints
/create-epics /create-stories /dev-story /sprint-plan /sprint-status /story-readiness /story-done /estimate
Reviews & Analysis
/design-review /code-review /balance-check /content-audit /scope-check /perf-profile /tech-debt /gate-check /consistency-check /security-audit
QA & Testing
/qa-plan /smoke-check /soak-test /regression-suite /test-setup /test-helpers /test-evidence-review /test-flakiness /skill-test /skill-improve
Production
/milestone-review /retrospective /bug-report /bug-triage /reverse-document /playtest-report
Release
/release-checklist /launch-checklist /changelog /patch-notes /hotfix /day-one-patch
Creative & Content
/prototype /vertical-slice /onboard /localize
Team Orchestration (coordinate multiple agents on a single feature)
/team-combat /team-narrative /team-ui /team-release /team-polish /team-audio /team-level /team-live-ops /team-qa
Does it produce games, or documents?
A fair question, and the answer is a measurement rather than a sample project.
Four games were built from one brief at different modes.rigor levels and the
documents each wrote before its first line of game code were counted:
| modes.rigor | Docs before first line of game code | Time |
|---|---:|---:|
| minimal | 1 (the one-page brief) | 0 min |
| standard | 30 | 58 min |
All of them produced a running, tested game. Two blind reviewers and a human
playtest then ranked the standard build last — the extra 29 documents
bought traceability, not a better game.
It runs the game and looks at it
The measurement above is about cost. The other half is whether the thing works,
and for a game that means someone has to look at it — a passing test says
nothing about a menu drawn off-screen. So a story that changes anything the
player sees is not closed until the game has been launched, observed, and a
screenshot retained in production/qa/evidence/. A parse check is not a run.
This holds at every rigor level, including minimal, where automated tests are
waived but the look is not.
The games themselves are deliberately not shipped here: this is a template
you clone to start your own project, and somebody else's game in your repo is
clutter, not evidence.
Getting Started
Prerequisites
Git
Claude Code — the native installer is recommended (npm install -g @anthropic-ai/claude-code also works, on Node.js 22+)
Python 3 — reads project.yaml for every skill and hook; without it every setting silently falls back to its default
Bash — runs every hook; built into macOS and Linux, and on Windows it comes with Git for Windows
Recommended: jq (for hook validation)
Hooks fail gracefully if optional tools are missing — you just lose validation — with one deliberate exception: a commit that stages data JSON is blocked when there is no Python to validate it.
Setup
Clone or use as template:
git clone https://github.com/Donchitos/Claude-Code-Game-Studios.git my-game
cd my-game
Open Claude Code in the project's root folder (the one holding
CLAUDE.md and project.yaml) and start a session:
claude
Starting it in a subfolder such as src/ skips the project's hooks, deny
rules and ask-first permission mode.
Run /start — the system asks where you are (no idea, vague concept,
clear design, existing work) and guides you to the right workflow. No assumptions.
Or jump directly to a specific skill if you already know what you need:
/brainstorm — explore game ideas from scratch
/setup-engine godot 4.7 — configure your engine if you already know
/project-stage-detect — analyze an existing project
Configuration
project.yaml at the repo root is the single source of truth for how the
studio behaves on your project — engine, naming conventions, and a modes
block that controls how much process every skill enforces. /start writes it
for you; you rarely need to hand-edit it.
The one question that matters most is modes.rigor — minimal, standard,
or full. It's a single front door over six separate knobs (workflow —
which GDD sections are required, docs.density, qa.level,
story_granularity, review_mode — how many director agents review your work,
and team.size), so /start asks it once instead of six times:
minimal (default) — jam-game speed. No GDDs required, terse docs, minimal QA evidence, solo review. /start → /setup-engine → /brainstorm (a one-page brief) → /create-stories → /dev-story ↔ /story-done.
standard — 5 required GDD sections, balanced doc depth, standard QA evidence, lean review.
full — all 8 GDD sections, thorough docs, full QA evidence on every story type, full director review.
minimal is the default because the heavier tier costs more to reach working
code without producing a better result, and gives nothing back when someone new
picks the project up. Raise it in one /settings call when your project grows
— /help and /gate-check will suggest it when they see the signs.
Two escape hatches keep one setting from being a blunt instrument.
system_overrides holds a single system to a higher standard than the rest
of the project — your combat system gets the full treatment while everything
else stays light. testing.strict sets, per test type (logic, integration,
visual, UI, config), whether missing evidence blocks a story or merely warns.
Any of the six underlying knobs can still be set individually if you want a mix
(e.g. workflow: full with docs.density: terse — comprehensive but compact).
Two of them — review_mode (full / lean / solo) and team.size — are
also personal: rigor sets the team-wide default, but you can override them
per-developer in a gitignored project.local.yaml without touching the shared
config. modes.automation (how often the AI pauses to ask before it acts) sits
outside rigor and is likewise personally overridable.
View or change any setting with the /settings skill:
/settings # view effective config
/settings modes.review_mode # view one setting
/settings modes.rigor=full # write to project.yaml (team-wide)
/settings --local modes.review_mode=solo # write to project.local.yaml (just you)
Full schema and per-setting behavior: .claude/docs/effects-map.md.
Upgrading
Already using an older version of this template? See UPGRADING.md
for step-by-step migration instructions, a breakdown of what changed between
versions, and which files are safe to overwrite vs. which need a manual merge.
Project Structure
CLAUDE.md # Master configuration
.claude/
settings.json # Hooks, permissions, safety rules
agents/ # 49 agent definitions (markdown + YAML frontmatter)
skills/ # 74 slash commands (subdirectory per skill)
hooks/ # 18 scripts (bash) — 15 event hooks, two helpers they
source (yaml-helper.sh, update-check.sh), and one
opt-in diagnostic you wire yourself
rules/ # 14 path-scoped coding standards
statusline.sh # Status line script (context%, model, stage, epic breadcrumb)
docs/
workflow-catalog.yaml # 7-phase pipeline definition (read by /help)
templates/ # 62 document templates (+ per-section guidance)
src/ # Game source code (Godot). The code root is
ENGINE-SPECIFIC: Unity compiles only
Assets/, Unreal builds from Source//
assets/ # Art, audio, VFX, shaders, data files
design/ # GDDs, narrative docs, level designs
docs/ # Technical documentation and ADRs
tests/ # Test suites (unit, integration, performance, playtest)
tools/ # Build and pipeline tools
prototypes/ # Throwaway prototypes (isolated from src/)
production/ # Sprint plans, milestones, release tracking
studio-tests/ # QA for the skills and agents themselves — see below
Testing your customizations
CCGS is a template you are meant to edit. studio-tests/ is how
you check that an edited or newly written skill still holds up — a catalog of all
74 skills and 49 agents, per-category quality rubrics, behavioral specs, and
templates for writing specs of your own.
/skill-test static name] # structural linter — 7 compliance checks
/skill-test category [name] # category-specific quality rubric
/skill-test spec [name] # behavioral spec assertions
/skill-test audit # coverage report across skills and agents
/skill-improve [name] # test-fix-retest loop; keeps or reverts on score change
It tests the framework, never your game — game tests live in tests/.
How It Works
Agent Coordination
Agents follow a structured delegation model:
Vertical delegation — directors delegate to leads, leads delegate to specialists
Horizontal consultation — same-tier agents can consult each other but can't make binding cross-domain decisions
Conflict resolution — disagreements escalate up to the shared parent (creative-director for design, technical-director for technical)
Change propagation — cross-department changes are coordinated by producer
Domain boundaries — agents don't modify files outside their domain without explicit delegation
Collaborative, Not Autonomous
This is not an auto-pilot system. Every agent follows a strict collaboration protocol:
Ask — agents ask questions before proposing solutions
Present options — agents show 2-4 options with pros/cons
You decide — the user always makes the call
Draft — agents show work before finalizing
Approve — nothing gets written without your sign-off
You stay in control. The agents provide structure and expertise, not autonomy.
That is how a terminal session started at the project root behaves out of the
box. The guided and autonomous automation settings, and Claude Code's own
auto mode, trade some of these prompts for speed; see
[setup-requirements.md for the routes into
auto mode.
Automated Safety
Hooks run automatically on every session:
| Hook | Trigger | What It Does |
|------|---------|--------------|
| validate-commit.sh | PreToolUse (Bash, PowerShell) | Checks for hardcoded values, TODO format, JSON validity, design doc sections — exits early if the command is not git commit |
| validate-push.sh | PreToolUse (Bash, PowerShell) | Warns on pushes to protected branches, and on git tag, git merge, gh release, butler push and steamcmd +run_app_build — exits early for any other command |
| validate-read.sh | PreToolUse (Read) | Refuses a whole-file read of a design doc over 40 KB and answers with its headings, so the retry reads one section (features.read_guard) |
| validate-write.sh | PreToolUse (Write/Edit) | Warns, never blocks, when a write would break a rule the skills state: a file they never overwrite, the config guard, the prototype boundary, a localization freeze |
| validate-registry.sh | PreToolUse (Write/Edit) | Warns when a write to the entity or TR-ID registry would delete or renumber an entry, or set a status its header does not list |
| validate-assets.sh | PostToolUse (Write/Edit) | Checks data-file JSON under assets/, Assets/ or Content/, and asset naming in Godot's assets/ only — exits early if the file is under none of them |
| session-start.sh | Session open | Shows current branch and recent commits for orientation |
| detect-gaps.sh | Session open | Detects fresh projects (suggests /start) and missing design docs when code or prototypes exist |
| pre-compact.sh | Before compaction | Logs the compaction (its output does not reach Claude — session-start.sh restores context afterwards) |
| notify.sh | Permission prompt, or idle about a minute | Shows Windows toast notification via PowerShell |
| session-stop.sh | Every response end, in the background | Archives active.md to session log and records git activity |
| log-agent.sh | Agent spawned | Audit trail start — logs subagent invocation |
| log-agent-stop.sh | Agent stops | Audit trail stop — completes subagent record |
| validate-agent-artifact.sh | Agent stops | Warns when a subagent stops without writing the file its brief named |
| validate-skill-change.sh | PostToolUse (Write/Edit) | Advises running /skill-test after any .claude/skills/ change |
Note: validate-commit.sh, validate-push.sh, validate-read.sh, validate-write.sh, validate-registry.sh, validate-assets.sh and validate-skill-change.sh fire on every Bash, PowerShell, Read, Write or Edit tool call and exit immediately (exit 0) when the command or file path is not relevant. This is normal hook behavior — not a performance concern.
Permission rules in settings.json auto-allow test runs and block dangerous operations (force push, rm -rf, reading .env files) in both the Bash and PowerShell tools. Read-only commands such as git status, git log and ls need no rule: Claude Code runs them without asking. The git rules match anywhere after git, so a git command whose text only mentions push followed later by + or -f, clean followed by -f, or reset followed by --hard — a commit message such as git commit -m "push + pull" included — is denied too: reword the message.
Path-Scoped Rules
Coding standards are automatically enforced based on file location. The paths
below are Godot's. Each rule also matches the Unity and Unreal layouts: the code
rules match C# under Assets//Gameplay/ and C++ under Source//Gameplay/ (and Core,
AI, Networking, UI), data matches JSON under Assets/**/Data/ and
Content/**/Data/, shaders match by file type, and tests match
C# under Assets/Tests/ and C++ under Source/**/Tests/.
| Path | Enforces |
|------|----------|
| src/gameplay/** | Data-driven values, delta time usage, no UI references |
| src/core/** | Zero allocations in hot paths, thread safety, API stability |
| src/ai/** | Performance budgets, debuggability, data-driven parameters |
| src/networking/** | Server-authoritative, versioned messages, security |
| src/ui/** | No game state ownership, localization-ready, accessibility |
| design/gdd/** | Required sections per modes.workflow, formula format, edge cases |
| design/narrative/** | Lore consistency, character voice, canon levels |
| assets/data/*/.json | JSON validity, naming conventions, schema rules |
| assets/shaders/** | Naming conventions, performance targets, cross-platform rules |
| /*.tscn, /*.tres | Scene and resource files changed in the editor where possible; safe hand-edit rules |
| tests/** | Test naming, coverage requirements, fixture patterns |
| prototypes/** | Relaxed standards, README required, hypothesis documented |
Design Philosophy
This template is grounded in professional game development practices:
MDA Framework — Mechanics, Dynamics, Aesthetics analysis for game design
Self-Determination Theory — Autonomy, Competence, Relatedness for player motivation
Flow State Design — Challenge-skill balance for player engagement
Bartle Player Types — Audience targeting and validation
Verification-Driven Development — Tests first, then implementation
Customization
This is a template, not a locked framework. Everything is meant to be customized:
Add/remove agents — delete agent files you don't need, add new ones for your domains
Edit agent prompts — tune agent behavior, add project-specific knowledge
Modify skills — adjust workflows to match your team's process
Add rules — create new path-scoped rules for your project's directory structure
Tune hooks — adjust validation strictness, add new checks
Pick your engine — use the Godot, Unity, or Unreal agent set (or none)
Tune process weight — modes.rigor and its underlying knobs in project.yaml (see Configuration). Override per-run with --review solo on any skill.
Platform Support
Primary development on Windows 10 with Git Bash. The hooks and scripts are also tested on macOS — its stock bash 3.2 and BSD tools, with and without jq — and on Linux. All hooks use POSIX-compatible patterns (grep -E, not grep -P) and include fallbacks for missing tools. The notify.sh hook uses PowerShell for Windows toast notifications and is a no-op elsewhere — desktop notifications on macOS/Linux are not yet wired. Please file issues for any platform-specific breakage.
Community
Discussions — GitHub Discussions for questions, ideas, and showcasing what you've built
Issues — Bug reports and feature requests
Supporting This Project
Claude Code Game Studios is free and open source. If it saves you time or helps you ship your game, consider supporting continued development:
Buy Me a Coffee — one-time support
GitHub Sponsors — recurring support through GitHub
Sponsorships help fund time spent maintaining skills, adding new agents, keeping up with Claude Code and engine API changes, and responding to community issues.
Built for Claude Code. Maintained and extended — contributions welcome via GitHub Discussions.
License
MIT License. See LICENSE for details.
Shell
37.2K
stars
5.2K
forks
What users love
No positive feedback yet
Areas for improvement
Excessive confirmation prompts interrupt the workflow; the highest-weight entry complains that too many things require confirmation (5 helpfulness votes).
Validation and audit logging are unreliable: GDScript parse checks fail silently because of an invalid ripgrep type, and agent dispatch logs show 'unknown' because hooks read a nonexistent field (2 helpfulness votes each).
Core workflows can fail to initialize: /start and skills are not recognized after cloning, and game-designer and creative-director fail to launch because skill preprocessing conflicts with Bash restrictions.
Model and document-context handling need improvement: subagent model mismatches cause context overflow, and /dev-story reads or rereads oversized ADRs despite embedded decision summaries, increasing read costs.
Configuration and guidance drift causes confusion: agent test specifications and model-tier documentation differ from agent definitions, update instructions are incorrect, and session previews show oldest rather than newest extracts.
What users love
No positive feedback yetAreas for improvement
Excessive confirmation prompts interrupt the workflow; the highest-weight entry complains that too many things require confirmation (5 helpfulness votes).
Validation and audit logging are unreliable: GDScript parse checks fail silently because of an invalid ripgrep type, and agent dispatch logs show 'unknown' because hooks read a nonexistent field (2 helpfulness votes each).
Core workflows can fail to initialize: /start and skills are not recognized after cloning, and game-designer and creative-director fail to launch because skill preprocessing conflicts with Bash restrictions.
Model and document-context handling need improvement: subagent model mismatches cause context overflow, and /dev-story reads or rereads oversized ADRs despite embedded decision summaries, increasing read costs.
Configuration and guidance drift causes confusion: agent test specifications and model-tier documentation differ from agent definitions, update instructions are incorrect, and session previews show oldest rather than newest extracts.
6
milind-soni/OpenMausBot
OpenMausBot
The open-source Grok Bot alternative: your own team of AI bots, in a chat app.
openmausbot.com · Download · Open source Grok Bot alternative, compared
OpenMausBot is an open-source Grok Bot alternative: an independent project inspired by Grok Bot, and the open-source alternative to Meta Muse, OpenAI dots and Cue by Manus — bring-your-own-agent, local-first, on the models you already have. Also known as MausBot; formerly OpenGrokBot. Not affiliated with xAI, Meta, OpenAI or Manus.
Every bot in the sidebar is a real agent — Claude or Codex running locally under the hood — with its own
personality, its own model, its own cloud computer, and its own connected apps.
Talk to them like contacts. Watch them work. Approve what matters.
TypeScript
React
Electron
Agents
Release
PRs
latest release · macOS: Apple silicon & Intel · signed & notarized .dmg · Windows: x64 installer · Ubuntu 24.04 x64: .deb or AppImage beta · all releases
Powered by boat.dev
⚠️ No affiliation with any cryptocurrency. OpenMausBot has no token. Any coin using the OpenMausBot, Maus, or SupaMaus name is not created, endorsed, or affiliated with this project or its maintainer. I have received no tokens, payment, or allocation from anyone, and I will not be endorsing any token.
Why
One assistant in one box is the wrong shape for agents. OpenMausBot is an independent, open-source project inspired by Grok Bot —
it keeps the idea (AI as a messaging app: a roster of bots you chat with, each with its own personality,
memory of its thread, model, computer, and apps) and rebuilds it open, local-first, and on the agents you
already have:
Bring your own agents. Bots run on the claude, codex, and grok CLIs installed on your own machine
— your existing logins and subscriptions, no new accounts, no proxy in the middle. Point any engine at a
custom CLI binary (a versioned build or wrapper) in Settings → Engines.
Local first. One small harness server on 127.0.0.1 owns every agent process. Transcripts, keys, and
events live in ~/.openmausbot, not a cloud.
Agents with hands. Each bot can use a cloud Linux desktop, an isolated Local VM, or—where the platform
safety boundary is currently certified—your own computer, plus 500+ apps through Composio. Host control is
available on macOS and Ubuntu Xorg after explicit opt-in. Ubuntu Wayland host control remains disabled while
issue #345 is resolved.
The open-source alternative to Grok Bot, Muse, dots and Cue
Four closed personal-agent products shipped in seven weeks of 2026, and each one keeps the model, the
computer and your data on its maker's side of the line. OpenMausBot is the open-source version of that
shape: a team of agents in a chat app, each with its own model, its own computer and its own connected
apps, running on your machine under Apache 2.0. If you searched for an open Muse, open dots, an
open-source Grok Bot, an open Instinct or an open Cue, this is the repository.
| Looking for | What it is | How OpenMausBot differs | Read more |
| --- | --- | --- | --- |
| Open source Grok Bot | xAI's roster of bots on one shared cloud computer, Grok only, from a SuperGrok or Cursor plan | Same roster shape; any model per bot; your own machine; approval cards | Grok Bot vs OpenMausBot |
| Open Muse | Meta's single personal agent in a Meta cloud VM, US and Canada only | A team instead of one agent; runs anywhere; data in ~/.openmausbot | Meta Muse alternative |
| Open dots | OpenAI's always-on agent inside ChatGPT, GPT only, Pro and Business Premium plans | Several agents; your Claude, ChatGPT or Grok login; no plan required | OpenAI dots alternative |
| Open Cue | Manus's invite-only agents with their own phone, email and wallet | No invite; OAuth instead of passwords; open source | Cue by Manus alternative |
| Open Instinct | Spear Street's invite-only agent that holds your passwords on a cloud computer | Ask for approval when you want it; signs in over OAuth; your machine | Instinct AI alternative |
All five side by side: Muse vs Grok Bot vs Dots vs Cue,
and a decision guide in five questions: Which AI agent should I use?
Features
🧠 Pick a brain per bot
A model picker with a provider rail — Claude and Codex models side by side, defaults marked, unavailable
providers dimmed with the reason. Switch a bot's model mid-conversation.
🖥️ Every bot gets a computer
Open the Computer panel and the bot's cloud desktop spins up on its own — live screen preview while it
works, "Open desktop" to take over in your browser, or point the bot at this Mac instead.
🙋 Bots ask before they act
Shell commands, file edits, and questions surface as inline cards — Allow / Deny / answer in chat. A
permission broker turns every risky action into a decision you make, for cloud and local computers alike.
🔌 Connected apps
A one-click marketplace over Composio Sessions: Gmail, Slack, GitHub, Notion, Linear and hundreds more.
OAuth once, and every bot can use them as tools.
🗂 Manage bots like chats
Right-click any bot: pin, mark unread, edit profile, duplicate, copy conversation ID, hide, delete. It's a
messaging app — your agents behave like contacts.
🔑 Keys once, everything lights up
Paste credentials in App Settings — they persist locally and the provider fleet hot-reloads instantly.
Secrets are write-only: the UI only ever sees "configured" flags.
#️⃣ Channels for every context
Keep Work, Personal, and each project in separate channels without cloning your bots. Every channel has
its own transcript, shared instructions, working folder, responder rules, and editable bot roster. File a
channel and its bots under a named context, then rename it or change its members whenever the team changes.
⚡ Fast decisions with Jev
Add a Cloudflare Workers AI token with its account ID, a TypeSafe Jev key, or an OpenRouter key and model, in Settings → Decision and extraction and rooms set to Auto pick the bot
that fits each un-mentioned message in a few hundred milliseconds, falling back to the room's lead whenever the decision model is off or unsure.
See docs/decision-model.md.
📦 Install a complete team from one Markdown file
Browse outcome-driven teams on BotMRR, then choose Add to OpenMausBot. The app
opens a review screen before creating the bots, Chief of Staff, channels, playbooks, connector checklist,
and suggested routines. You can also import the same .md file from disk or paste its public GitHub URL
in Teams → Import.
The format stays portable: OpenMausBot reads the structured YAML frontmatter for a reliable one-click
install, while Grok, Claude, ChatGPT, and people can follow the ordinary Markdown playbook. Connections
remain off until you approve them, routines arrive paused, and packages never carry credentials,
conversations, permissions, memory, or computer access. Browse the
open-source playbook repository or read its
portable format.
🤝 Share a whole department
Right-click a department and choose Share department… (or use Templates → Share) to save the whole department as one
file: its bots with their instructions, pictures and skills, group chats, routines, shared instructions,
Chief of Staff, connection slots and each bot's starter notes (untick them to leave them out). The dialog
shows exactly what the file holds before you save it. Chat history, keys and passwords, model choices and
computers never go in, and anything that looks like a secret is removed from the text. Whoever imports it
gets new bots on Ask, skills switched off and routines paused. See docs/team-sharing.md.
Desktops connected to an organization also get Templates → From {Organization}: the packages its Admin shares,
added with one click, skills switched on. See docs/org-library.md.
Your New bot defaults can travel too, as a preset bot that appears in New bot (in a team file, or on
their own with Share as preset…). See docs/presets.md.
🎧 Bots that talk back
Press the speaker on any reply, or switch a bot to read its answers out as they land — so you can listen
to what ran overnight while you make breakfast. Hit call and it's a conversation: it hears you, tells
you what it's doing while it works, and asks for approvals out loud.
Choose ElevenLabs, Fish Audio, Grok (xAI), built-in Mac voices, or a local Chatterbox server in an agent profile. Paste a
cloud key once when needed, pick a voice, and every bot can talk.
Give a bot its own voice and a channel stops sounding like one person.
For Grok, save your xAI API key in Settings → Connections, then choose Grok (xAI)
and a voice under the bot’s Voice & alerts. It reuses that host-side key and returns MP3
audio for spoken replies and calls. Language is detected automatically from the reply text;
quality varies outside xAI’s officially supported languages.
This adds speech synthesis to the existing call flow; microphone transcription remains unchanged.
Also in the box: streaming replies with tool-run activity chips · dictation from the
composer mic (on-device Apple speech recognition on macOS, Fish Audio speech-to-text on Windows and Linux, in the desktop app) · SupaMaus cursor mascots with role-aware
expressions · screenshots of the bot's work folded into the transcript.
Powered By
Claude
Codex
Grok
Electron
React
Vite
Tailwind CSS
Composio
Boat
Cua
ElevenLabs
Fish Audio
GitHub Sponsors
| Service | Purpose |
|---|---|
| Claude · Codex · Grok | The agents behind every bot, run through their local CLIs |
| Electron | Desktop shells for macOS, Windows, and Ubuntu |
| React + Vite + Tailwind CSS | The chat app UI and its build |
| Boat (boat.dev) | Each bot's cloud computer · our sponsor |
| Composio | Connected apps — Gmail, Slack, GitHub, and more |
| Cua Driver | Native computer use on your own machine |
| ElevenLabs · Fish Audio | Hosted voices for bots that talk back |
| GitHub Sponsors | One-time and monthly project support |
How it works
Two processes. The app holds no transports of its own — it sends typed commands over HTTP and folds one SSE
event stream into state. The harness server owns every agent process and normalizes each provider's native
protocol into one canonical runtime event stream (logged per-thread as NDJSON).
flowchart LR
subgraph app "App — React + Tailwind (5199)"]
UI[Chat UI · model picker · computer panel]
end
subgraph server ["Harness server (127.0.0.1:8799)"]
REG[Driver registry] --> BUS[Event bus → SSE]
BROKER[Permission broker]
end
subgraph agents ["Agents on your computer"]
CL[claude CLI]
CX[codex CLI]
GR[grok CLI]
end
UI -- "HTTP commands" --> server
BUS -- "one SSE stream" --> UI
REG --> CL & CX & GR
CL & CX & GR -- "permission requests" --> BROKER
server -- "Boat API" --> BOAT[("Cloud computerboat.dev")]
server -- "Composio Session" --> APPS[("Gmail · Slack · GitHub · …")]
| Layer | Where | What it does |
|---|---|---|
| Drivers | server/drivers/ | One per provider: Claude, Codex, and Grok Build over their local CLIs (stream-JSON / JSON-RPC / ACP), plus a cloud-computer agent. Unknown drivers degrade to "unavailable", never crash the fleet. |
| Harness | server/harness/ | Registry (configs → live instances) and the fan-in event bus every client folds. |
| API | server/index.ts | Bots, turns, approvals, model catalog, computer lifecycle, connectors, config — HTTP + SSE. |
| Voice | server/tts/ | ElevenLabs, Fish Audio, Grok (xAI), built-in Mac voices, or local Chatterbox. Cloud keys stay on the harness; markdown is rewritten into something worth hearing before it is spoken. |
| App | src/ | The chat shell. Server-backed store, one reducer, zero client-side transports. |
| Desktop | electron/ | macOS, Windows, and Ubuntu shells with an embedded harness and platform capabilities; Apple speech stays macOS-only, Ubuntu Xorg has opt-in local control, and Wayland remains fail-closed. |
Orchestrate OpenMausBot over MCP
OpenMausBot ships a stdio MCP server for external clients such as Claude Desktop and Cursor. It exposes a
deliberately bounded team control plane: inspect bots and channels, read/search compact transcript pages,
create and configure bots/channels/tasks, send work, wait for completion, switch models, and interrupt turns.
It does not expose approval grants, deletion, arbitrary settings, credentials, or computer lifecycle.
See [MCP server setup and tool reference.
Run it from scripts and CI
The openmausbot command drives a running workspace without a screen: set a
team up from a file, give a bot one job, wait until it and every teammate it
asked are done, and export what they made. One JSON document with --json,
and exit codes a script can branch on.
openmausbot team apply team.yaml
openmausbot run "Room Lead" "Rehearse the launch of https://example.com" --export ./out
See Run OpenMausBot from scripts and CI.
Quick start
Released builds (latest release): the harness server is embedded, so no separate server setup is required.
| | Download | Install |
|---|---|---|
| macOS (Apple silicon) | OpenMausBot.dmg | Drag it to Applications, open it. Signed & notarized. |
| macOS (Intel) | OpenMausBot-intel.dmg | Same app, built for Intel Macs. Signed & notarized. |
| Windows (x64) | OpenMausBot-setup.exe | Run it — one-click, per-user, no admin rights. The installer isn't code-signed yet, so SmartScreen shows "unknown publisher": More info → Run anyway. |
| Ubuntu 24.04 (x64) | OpenMausBot-amd64.deb · OpenMausBot.AppImage | Install the .deb with APT (recommended), or make the AppImage executable and run it. Beta; GNOME is the supported desktop. |
See the Ubuntu Desktop guide for installation, capabilities, and troubleshooting.
Any desktop build can also pair as a client to another Windows, macOS, or Ubuntu host over Tailscale; see desktop-to-desktop companion mode.
From source:
git clone https://github.com/milind-soni/OpenMausBot && cd OpenMausBot
pnpm install
pnpm dev:server # harness server → 127.0.0.1:8799
pnpm dev # app → http://127.0.0.1:5199
pnpm dev:desktop # Electron shell; keep the two commands above running
Requirements: macOS, Windows, or Ubuntu 24.04 x64, Node 24+, pnpm, and at least one agent CLI — claude,
codex, or grok — installed and logged in. They appear
in the model picker automatically.
Package the desktop application:
pnpm package:mac # macOS: DMG + ZIP; requires Swift/Xcode tools
pnpm package:win # Windows: installer + ZIP
pnpm package:linux # Ubuntu x64: .deb + AppImage + verified CUA runtime
Desktop capability status
| Capability | macOS | Ubuntu 24.04 Xorg | Ubuntu 24.04 Wayland |
|---|---|---|---|
| Packaged app, embedded harness, local agent CLIs | Supported | Beta | Beta |
| Composio and Boat/cloud computers | Supported | Beta | Beta |
| Explicit preview-only local screen capture | Supported | Beta | Beta |
| Bot control of this computer | Supported | Beta, explicit opt-in | Disabled: Wayland safety gate (Omarchy with Cua's Hyprland plugin: experimental) |
| Native on-device dictation | Supported | Planned | Planned |
| Dictation and Take turns calls through Fish Audio (needs a Fish Audio key) | Not used, on-device instead | Supported | Supported |
The Linux preview is user-initiated and never enables local bot control or Auto routing. On Xorg, the reviewed Cua
Driver 0.41.3 runtime starts only after explicit opt-in and without its full-screen cursor overlay. On Wayland the
app never starts it and clears legacy opt-ins while that real-seat safety gate remains unresolved. Chat, preview,
Cloud, and Local VM remain available on both sessions. See the Ubuntu Desktop guide and tracking
issues #29,
#345, and
#113.
The Linux packager downloads only the tag-pinned upstream archive during the build, verifies its size, SHA-256,
complete member allowlist, and inner executable hashes, then packages only the CLI and cursor-theme sidecar. The
installed app never downloads or self-updates native automation code. Cua's MIT notice, Inter's SIL OFL, a generated
third-party license report, and a CycloneDX inventory ship with the runtime. See
third_party/cua-driver/ for the reviewed provenance record.
These credentials are optional — local chat works without them. Paste a key once in App Settings (gear
in the sidebar footer) when you want to enable its integration:
| Credential | What it enables | Where to get it |
|---|---|---|
| Composio project key (ak_…) | Connect Gmail, GitHub, Slack, Notion, and other apps to your bots | OpenMausBot Composio setup |
| Boat API key | Give bots an isolated remote Linux computer with a desktop and terminal | Boat API key guide |
| ElevenLabs key | Read replies aloud, and call your bots | ElevenLabs API keys |
| Fish Audio key | Read replies aloud with Fish Audio voices, and call your bots | Fish Audio API keys |
Composio and Boat are third-party services with their own accounts and terms. Boat is a paid service after
its trial, and using a cloud computer may incur charges.
pnpm typecheck # app + server
pnpm test # unit, driver, API, and desktop capability tests
pnpm build # typecheck + production build
pnpm check:electron # syntax-check Electron main/preload files
pnpm package:win # Windows installer + zip → release/
pnpm package:linux # Ubuntu x64 .deb + AppImage → release/
Triggers: schedules and webhooks
A trigger is "when something happens, a bot does something". Tell a bot "every weekday at 9, send me a summary
of my inbox" or "whenever our form calls, draft a reply" and it sets the trigger up in that turn with
its trigger tool (no confirmation; the chat shows a live card with Edit, Pause and Undo). Triggers, first in
the sidebar, lists every schedule and webhook, with a calendar and the run history. Bots manage them with
trigger_info (list, app events), trigger (create, update, pause, resume, run now) and delete_trigger; a webhook a bot makes never shows the bot its secret:
the person copies the link from the card or the Triggers page.
Schedules (routines) can run once, on selected weekdays, or every 5–1,440 minutes, using either a bot's configured
model/computer or the Cloud VM runner. Interval schedules stay aligned to their chosen start time and skip
an occurrence when the previous run is still active, so slow work cannot build an unbounded queue. A
separate optional Advanced run limit can safely stop stuck work; no timeout is imposed unless one is chosen.
The existing duration field remains calendar/display metadata. Webhook triggers are independent from schedules
but reuse the same queued task executor and calendar
receipts.
App events start a bot when something happens in a connected app ("whenever I get an email from Acme, draft
a reply"). The bot finds the app's events with trigger_info (action: "events") and calls trigger with
action: "create" and when: "app_event"; the person can also choose New → Set it up yourself → When something happens in an app.
Composio sends each event to OpenMausBot's connected-apps service, which queues it; the app collects the queue
with a long poll, so a desktop needs no public address and events wait while it is closed. Gmail is checked every
15 minutes; Slack, GitHub and other push apps arrive at once. A desktop keeps up to 500 events a day and a paid
Cloud 2,000; what is skipped shows on the automation. App events need the included connected apps: a server
using its own Composio key cannot watch apps yet. Details: docs/composio.md.
OpenMausBot starts a webhook-only receiver on 127.0.0.1:8800 by default (or one port above OMB_PORT).
Set OMB_WEBHOOK_PORT to choose another port. A webhook secret is shown once when the trigger is created
or rotated. Bearer authentication is recommended so the secret stays out of request URLs and most access
logs; a single capability URL remains available for senders that cannot configure headers. The receiver
exposes only /health and secret /hooks/... endpoints; it never exposes the app's broader API.
OpenMausBot must remain running to accept a delivery. For public internet delivery, proxy only this
dedicated receiver through a hosted relay or a tool such as Tailscale Funnel.
Status
Early but real — the loop works end to end: message → agent → streamed reply → tools → approvals →
computer use. macOS, Windows, and Ubuntu 24.04 x64 have released builds; Ubuntu remains a beta with the
capability limits above. Rough edges to expect: hosted/mobile connectivity is still being built, and webhook
triggers currently use the local receiver rather than an always-on hosted relay.
Hosted voice needs an ElevenLabs, Fish Audio, or xAI key; built-in Mac and local Chatterbox voices need no cloud key. Take-turns calls and the composer mic listen on-device on macOS and through Fish Audio speech-to-text on Windows and Linux (the same Fish Audio key as voices). See docs/voice-mode.md for the design and the known gaps.
Contributions welcome — the driver SPI in server/contracts.ts is deliberately
small; adding a provider is one file in server/drivers/ plus a one-line registration.
No code needed at all for your own engines: any ACP-speaking CLI or OpenAI-compatible endpoint
plugs in through config — see docs/custom-engines.md.
Users can add their own MCP tool servers with zero code via docs/custom-mcp-servers.md.
To run bots on OpenRouter, Fireworks AI, DeepSeek, Cline or your own OpenAI- or Anthropic-compatible provider,
see Other model providers.
Privacy
Usage analytics are optional and anonymous: product events and a once-a-day count of what is set up, never keys,
names, addresses or conversations. Turn them off in Settings → General → Usage analytics;
docs/analytics.md lists every event and property.
Support the project
OpenMausBot is free and open source. If it does real work for you, you can
support its development through GitHub Sponsors
with a one-time contribution or a monthly sponsorship. Your support helps fund ongoing development
and maintenance; OpenMausBot remains free and open source.
Run from a terminal or on a server
With Node 24 or newer, install once and run:
npm install -g openmausbot
openmausbot
Or use npx openmausbot without a global install. First launch guides you with
arrow-key choices: choose AI access, sign in or paste a hidden API key, choose
a model, and optionally connect a phone. Next time, the same command reuses your
saved setup and opens OpenMausBot on this computer. Keep the terminal open; Ctrl-C stops
the server, not your saved work. Use --no-open to skip opening the browser.
Phone access is optional and defaults to skipping. Choose an explicitly
approved managed public HTTPS endpoint protected by pairing, an existing
Tailscale connection, or your own HTTPS reverse proxy. Both native apps pair from
this flow: the QR is an app link when you are connecting an Android phone, and the
iOS app takes either that or the web link. A browser works on either phone. A phone
cannot use a localhost link. --local ignores saved remote access for one launch;
--no-pair suppresses phone prompts and invitations but does not disable a saved
remote connection.
The web UI can also be installed from Safari or Chrome as a standalone phone
app. See Install the phone web app for Home Screen
installation and pairing.
Run openmausbot setup to reconfigure without resetting bots or conversations;
the saved model default applies only to new bots. Native setup confirms provider
sign-in; API setup asks before a potentially billable test message. API keys are
saved as plaintext, not encrypted, in private config.json (0600 on Unix).
See the short setup guide for account differences,
phone choices, credential storage, and cancellation.
For a server on a VPS or an always-on computer, run npx openmausbot serve
with one way in: --public-url behind your own cloudflared, Caddy or nginx,
--domain for a certificate on your own domain, --tailscale for your
tailnet, --lan for this network only, or --tunnel (after
npx openmausbot login) for a free MausBot web address. It prints one
pairing link; paste it into the desktop app under **+ → Connect to a
server**. The short path for each install method (npx, Docker, a service) is
at the top of docs/self-hosting.md; a server from
scratch is docs/deploy-vps.md.
License
Apache License 2.0 © 2026 Milind Soni and OpenMausBot contributors,
except enterprise/, which is source-available under its
own license; delete that folder and what remains is the
open-source edition. Details, including how contributions are signed off, are
in LICENSING.md.
Packaged Cua Driver components retain their upstream MIT, SIL OFL 1.1, MPL-2.0, and other dependency terms;
the corresponding notices, license texts, source locations, and SBOM are in
third_party/cua-driver/ and ship beside the native runtime.
OpenMausBot is an independent, open-source project inspired by Grok Bot. It is
not affiliated with, endorsed by, or associated with xAI; "Grok" is a trademark
of its respective owner.
TypeScript19.1K7.6K
6
milind-soni/OpenMausBot
OpenMausBot
The open-source Grok Bot alternative: your own team of AI bots, in a chat app.
openmausbot.com · Download · Open source Grok Bot alternative, compared
OpenMausBot is an open-source Grok Bot alternative: an independent project inspired by Grok Bot, and the open-source alternative to Meta Muse, OpenAI dots and Cue by Manus — bring-your-own-agent, local-first, on the models you already have. Also known as MausBot; formerly OpenGrokBot. Not affiliated with xAI, Meta, OpenAI or Manus.
Every bot in the sidebar is a real agent — Claude or Codex running locally under the hood — with its own
personality, its own model, its own cloud computer, and its own connected apps.
Talk to them like contacts. Watch them work. Approve what matters.
TypeScript
React
Electron
Agents
Release
PRs
latest release · macOS: Apple silicon & Intel · signed & notarized .dmg · Windows: x64 installer · Ubuntu 24.04 x64: .deb or AppImage beta · all releases
Powered by boat.dev
⚠️ No affiliation with any cryptocurrency. OpenMausBot has no token. Any coin using the OpenMausBot, Maus, or SupaMaus name is not created, endorsed, or affiliated with this project or its maintainer. I have received no tokens, payment, or allocation from anyone, and I will not be endorsing any token.
Why
One assistant in one box is the wrong shape for agents. OpenMausBot is an independent, open-source project inspired by Grok Bot —
it keeps the idea (AI as a messaging app: a roster of bots you chat with, each with its own personality,
memory of its thread, model, computer, and apps) and rebuilds it open, local-first, and on the agents you
already have:
Bring your own agents. Bots run on the claude, codex, and grok CLIs installed on your own machine
— your existing logins and subscriptions, no new accounts, no proxy in the middle. Point any engine at a
custom CLI binary (a versioned build or wrapper) in Settings → Engines.
Local first. One small harness server on 127.0.0.1 owns every agent process. Transcripts, keys, and
events live in ~/.openmausbot, not a cloud.
Agents with hands. Each bot can use a cloud Linux desktop, an isolated Local VM, or—where the platform
safety boundary is currently certified—your own computer, plus 500+ apps through Composio. Host control is
available on macOS and Ubuntu Xorg after explicit opt-in. Ubuntu Wayland host control remains disabled while
issue #345 is resolved.
The open-source alternative to Grok Bot, Muse, dots and Cue
Four closed personal-agent products shipped in seven weeks of 2026, and each one keeps the model, the
computer and your data on its maker's side of the line. OpenMausBot is the open-source version of that
shape: a team of agents in a chat app, each with its own model, its own computer and its own connected
apps, running on your machine under Apache 2.0. If you searched for an open Muse, open dots, an
open-source Grok Bot, an open Instinct or an open Cue, this is the repository.
| Looking for | What it is | How OpenMausBot differs | Read more |
| --- | --- | --- | --- |
| Open source Grok Bot | xAI's roster of bots on one shared cloud computer, Grok only, from a SuperGrok or Cursor plan | Same roster shape; any model per bot; your own machine; approval cards | Grok Bot vs OpenMausBot |
| Open Muse | Meta's single personal agent in a Meta cloud VM, US and Canada only | A team instead of one agent; runs anywhere; data in ~/.openmausbot | Meta Muse alternative |
| Open dots | OpenAI's always-on agent inside ChatGPT, GPT only, Pro and Business Premium plans | Several agents; your Claude, ChatGPT or Grok login; no plan required | OpenAI dots alternative |
| Open Cue | Manus's invite-only agents with their own phone, email and wallet | No invite; OAuth instead of passwords; open source | Cue by Manus alternative |
| Open Instinct | Spear Street's invite-only agent that holds your passwords on a cloud computer | Ask for approval when you want it; signs in over OAuth; your machine | Instinct AI alternative |
All five side by side: Muse vs Grok Bot vs Dots vs Cue,
and a decision guide in five questions: Which AI agent should I use?
Features
🧠 Pick a brain per bot
A model picker with a provider rail — Claude and Codex models side by side, defaults marked, unavailable
providers dimmed with the reason. Switch a bot's model mid-conversation.
🖥️ Every bot gets a computer
Open the Computer panel and the bot's cloud desktop spins up on its own — live screen preview while it
works, "Open desktop" to take over in your browser, or point the bot at this Mac instead.
🙋 Bots ask before they act
Shell commands, file edits, and questions surface as inline cards — Allow / Deny / answer in chat. A
permission broker turns every risky action into a decision you make, for cloud and local computers alike.
🔌 Connected apps
A one-click marketplace over Composio Sessions: Gmail, Slack, GitHub, Notion, Linear and hundreds more.
OAuth once, and every bot can use them as tools.
🗂 Manage bots like chats
Right-click any bot: pin, mark unread, edit profile, duplicate, copy conversation ID, hide, delete. It's a
messaging app — your agents behave like contacts.
🔑 Keys once, everything lights up
Paste credentials in App Settings — they persist locally and the provider fleet hot-reloads instantly.
Secrets are write-only: the UI only ever sees "configured" flags.
#️⃣ Channels for every context
Keep Work, Personal, and each project in separate channels without cloning your bots. Every channel has
its own transcript, shared instructions, working folder, responder rules, and editable bot roster. File a
channel and its bots under a named context, then rename it or change its members whenever the team changes.
⚡ Fast decisions with Jev
Add a Cloudflare Workers AI token with its account ID, a TypeSafe Jev key, or an OpenRouter key and model, in Settings → Decision and extraction and rooms set to Auto pick the bot
that fits each un-mentioned message in a few hundred milliseconds, falling back to the room's lead whenever the decision model is off or unsure.
See docs/decision-model.md.
📦 Install a complete team from one Markdown file
Browse outcome-driven teams on BotMRR, then choose Add to OpenMausBot. The app
opens a review screen before creating the bots, Chief of Staff, channels, playbooks, connector checklist,
and suggested routines. You can also import the same .md file from disk or paste its public GitHub URL
in Teams → Import.
The format stays portable: OpenMausBot reads the structured YAML frontmatter for a reliable one-click
install, while Grok, Claude, ChatGPT, and people can follow the ordinary Markdown playbook. Connections
remain off until you approve them, routines arrive paused, and packages never carry credentials,
conversations, permissions, memory, or computer access. Browse the
open-source playbook repository or read its
portable format.
🤝 Share a whole department
Right-click a department and choose Share department… (or use Templates → Share) to save the whole department as one
file: its bots with their instructions, pictures and skills, group chats, routines, shared instructions,
Chief of Staff, connection slots and each bot's starter notes (untick them to leave them out). The dialog
shows exactly what the file holds before you save it. Chat history, keys and passwords, model choices and
computers never go in, and anything that looks like a secret is removed from the text. Whoever imports it
gets new bots on Ask, skills switched off and routines paused. See docs/team-sharing.md.
Desktops connected to an organization also get Templates → From {Organization}: the packages its Admin shares,
added with one click, skills switched on. See docs/org-library.md.
Your New bot defaults can travel too, as a preset bot that appears in New bot (in a team file, or on
their own with Share as preset…). See docs/presets.md.
🎧 Bots that talk back
Press the speaker on any reply, or switch a bot to read its answers out as they land — so you can listen
to what ran overnight while you make breakfast. Hit call and it's a conversation: it hears you, tells
you what it's doing while it works, and asks for approvals out loud.
Choose ElevenLabs, Fish Audio, Grok (xAI), built-in Mac voices, or a local Chatterbox server in an agent profile. Paste a
cloud key once when needed, pick a voice, and every bot can talk.
Give a bot its own voice and a channel stops sounding like one person.
For Grok, save your xAI API key in Settings → Connections, then choose Grok (xAI)
and a voice under the bot’s Voice & alerts. It reuses that host-side key and returns MP3
audio for spoken replies and calls. Language is detected automatically from the reply text;
quality varies outside xAI’s officially supported languages.
This adds speech synthesis to the existing call flow; microphone transcription remains unchanged.
Also in the box: streaming replies with tool-run activity chips · dictation from the
composer mic (on-device Apple speech recognition on macOS, Fish Audio speech-to-text on Windows and Linux, in the desktop app) · SupaMaus cursor mascots with role-aware
expressions · screenshots of the bot's work folded into the transcript.
Powered By
Claude
Codex
Grok
Electron
React
Vite
Tailwind CSS
Composio
Boat
Cua
ElevenLabs
Fish Audio
GitHub Sponsors
| Service | Purpose |
|---|---|
| Claude · Codex · Grok | The agents behind every bot, run through their local CLIs |
| Electron | Desktop shells for macOS, Windows, and Ubuntu |
| React + Vite + Tailwind CSS | The chat app UI and its build |
| Boat (boat.dev) | Each bot's cloud computer · our sponsor |
| Composio | Connected apps — Gmail, Slack, GitHub, and more |
| Cua Driver | Native computer use on your own machine |
| ElevenLabs · Fish Audio | Hosted voices for bots that talk back |
| GitHub Sponsors | One-time and monthly project support |
How it works
Two processes. The app holds no transports of its own — it sends typed commands over HTTP and folds one SSE
event stream into state. The harness server owns every agent process and normalizes each provider's native
protocol into one canonical runtime event stream (logged per-thread as NDJSON).
flowchart LR
subgraph app "App — React + Tailwind (5199)"]
UI[Chat UI · model picker · computer panel]
end
subgraph server ["Harness server (127.0.0.1:8799)"]
REG[Driver registry] --> BUS[Event bus → SSE]
BROKER[Permission broker]
end
subgraph agents ["Agents on your computer"]
CL[claude CLI]
CX[codex CLI]
GR[grok CLI]
end
UI -- "HTTP commands" --> server
BUS -- "one SSE stream" --> UI
REG --> CL & CX & GR
CL & CX & GR -- "permission requests" --> BROKER
server -- "Boat API" --> BOAT[("Cloud computerboat.dev")]
server -- "Composio Session" --> APPS[("Gmail · Slack · GitHub · …")]
| Layer | Where | What it does |
|---|---|---|
| Drivers | server/drivers/ | One per provider: Claude, Codex, and Grok Build over their local CLIs (stream-JSON / JSON-RPC / ACP), plus a cloud-computer agent. Unknown drivers degrade to "unavailable", never crash the fleet. |
| Harness | server/harness/ | Registry (configs → live instances) and the fan-in event bus every client folds. |
| API | server/index.ts | Bots, turns, approvals, model catalog, computer lifecycle, connectors, config — HTTP + SSE. |
| Voice | server/tts/ | ElevenLabs, Fish Audio, Grok (xAI), built-in Mac voices, or local Chatterbox. Cloud keys stay on the harness; markdown is rewritten into something worth hearing before it is spoken. |
| App | src/ | The chat shell. Server-backed store, one reducer, zero client-side transports. |
| Desktop | electron/ | macOS, Windows, and Ubuntu shells with an embedded harness and platform capabilities; Apple speech stays macOS-only, Ubuntu Xorg has opt-in local control, and Wayland remains fail-closed. |
Orchestrate OpenMausBot over MCP
OpenMausBot ships a stdio MCP server for external clients such as Claude Desktop and Cursor. It exposes a
deliberately bounded team control plane: inspect bots and channels, read/search compact transcript pages,
create and configure bots/channels/tasks, send work, wait for completion, switch models, and interrupt turns.
It does not expose approval grants, deletion, arbitrary settings, credentials, or computer lifecycle.
See [MCP server setup and tool reference.
Run it from scripts and CI
The openmausbot command drives a running workspace without a screen: set a
team up from a file, give a bot one job, wait until it and every teammate it
asked are done, and export what they made. One JSON document with --json,
and exit codes a script can branch on.
openmausbot team apply team.yaml
openmausbot run "Room Lead" "Rehearse the launch of https://example.com" --export ./out
See Run OpenMausBot from scripts and CI.
Quick start
Released builds (latest release): the harness server is embedded, so no separate server setup is required.
| | Download | Install |
|---|---|---|
| macOS (Apple silicon) | OpenMausBot.dmg | Drag it to Applications, open it. Signed & notarized. |
| macOS (Intel) | OpenMausBot-intel.dmg | Same app, built for Intel Macs. Signed & notarized. |
| Windows (x64) | OpenMausBot-setup.exe | Run it — one-click, per-user, no admin rights. The installer isn't code-signed yet, so SmartScreen shows "unknown publisher": More info → Run anyway. |
| Ubuntu 24.04 (x64) | OpenMausBot-amd64.deb · OpenMausBot.AppImage | Install the .deb with APT (recommended), or make the AppImage executable and run it. Beta; GNOME is the supported desktop. |
See the Ubuntu Desktop guide for installation, capabilities, and troubleshooting.
Any desktop build can also pair as a client to another Windows, macOS, or Ubuntu host over Tailscale; see desktop-to-desktop companion mode.
From source:
git clone https://github.com/milind-soni/OpenMausBot && cd OpenMausBot
pnpm install
pnpm dev:server # harness server → 127.0.0.1:8799
pnpm dev # app → http://127.0.0.1:5199
pnpm dev:desktop # Electron shell; keep the two commands above running
Requirements: macOS, Windows, or Ubuntu 24.04 x64, Node 24+, pnpm, and at least one agent CLI — claude,
codex, or grok — installed and logged in. They appear
in the model picker automatically.
Package the desktop application:
pnpm package:mac # macOS: DMG + ZIP; requires Swift/Xcode tools
pnpm package:win # Windows: installer + ZIP
pnpm package:linux # Ubuntu x64: .deb + AppImage + verified CUA runtime
Desktop capability status
| Capability | macOS | Ubuntu 24.04 Xorg | Ubuntu 24.04 Wayland |
|---|---|---|---|
| Packaged app, embedded harness, local agent CLIs | Supported | Beta | Beta |
| Composio and Boat/cloud computers | Supported | Beta | Beta |
| Explicit preview-only local screen capture | Supported | Beta | Beta |
| Bot control of this computer | Supported | Beta, explicit opt-in | Disabled: Wayland safety gate (Omarchy with Cua's Hyprland plugin: experimental) |
| Native on-device dictation | Supported | Planned | Planned |
| Dictation and Take turns calls through Fish Audio (needs a Fish Audio key) | Not used, on-device instead | Supported | Supported |
The Linux preview is user-initiated and never enables local bot control or Auto routing. On Xorg, the reviewed Cua
Driver 0.41.3 runtime starts only after explicit opt-in and without its full-screen cursor overlay. On Wayland the
app never starts it and clears legacy opt-ins while that real-seat safety gate remains unresolved. Chat, preview,
Cloud, and Local VM remain available on both sessions. See the Ubuntu Desktop guide and tracking
issues #29,
#345, and
#113.
The Linux packager downloads only the tag-pinned upstream archive during the build, verifies its size, SHA-256,
complete member allowlist, and inner executable hashes, then packages only the CLI and cursor-theme sidecar. The
installed app never downloads or self-updates native automation code. Cua's MIT notice, Inter's SIL OFL, a generated
third-party license report, and a CycloneDX inventory ship with the runtime. See
third_party/cua-driver/ for the reviewed provenance record.
These credentials are optional — local chat works without them. Paste a key once in App Settings (gear
in the sidebar footer) when you want to enable its integration:
| Credential | What it enables | Where to get it |
|---|---|---|
| Composio project key (ak_…) | Connect Gmail, GitHub, Slack, Notion, and other apps to your bots | OpenMausBot Composio setup |
| Boat API key | Give bots an isolated remote Linux computer with a desktop and terminal | Boat API key guide |
| ElevenLabs key | Read replies aloud, and call your bots | ElevenLabs API keys |
| Fish Audio key | Read replies aloud with Fish Audio voices, and call your bots | Fish Audio API keys |
Composio and Boat are third-party services with their own accounts and terms. Boat is a paid service after
its trial, and using a cloud computer may incur charges.
pnpm typecheck # app + server
pnpm test # unit, driver, API, and desktop capability tests
pnpm build # typecheck + production build
pnpm check:electron # syntax-check Electron main/preload files
pnpm package:win # Windows installer + zip → release/
pnpm package:linux # Ubuntu x64 .deb + AppImage → release/
Triggers: schedules and webhooks
A trigger is "when something happens, a bot does something". Tell a bot "every weekday at 9, send me a summary
of my inbox" or "whenever our form calls, draft a reply" and it sets the trigger up in that turn with
its trigger tool (no confirmation; the chat shows a live card with Edit, Pause and Undo). Triggers, first in
the sidebar, lists every schedule and webhook, with a calendar and the run history. Bots manage them with
trigger_info (list, app events), trigger (create, update, pause, resume, run now) and delete_trigger; a webhook a bot makes never shows the bot its secret:
the person copies the link from the card or the Triggers page.
Schedules (routines) can run once, on selected weekdays, or every 5–1,440 minutes, using either a bot's configured
model/computer or the Cloud VM runner. Interval schedules stay aligned to their chosen start time and skip
an occurrence when the previous run is still active, so slow work cannot build an unbounded queue. A
separate optional Advanced run limit can safely stop stuck work; no timeout is imposed unless one is chosen.
The existing duration field remains calendar/display metadata. Webhook triggers are independent from schedules
but reuse the same queued task executor and calendar
receipts.
App events start a bot when something happens in a connected app ("whenever I get an email from Acme, draft
a reply"). The bot finds the app's events with trigger_info (action: "events") and calls trigger with
action: "create" and when: "app_event"; the person can also choose New → Set it up yourself → When something happens in an app.
Composio sends each event to OpenMausBot's connected-apps service, which queues it; the app collects the queue
with a long poll, so a desktop needs no public address and events wait while it is closed. Gmail is checked every
15 minutes; Slack, GitHub and other push apps arrive at once. A desktop keeps up to 500 events a day and a paid
Cloud 2,000; what is skipped shows on the automation. App events need the included connected apps: a server
using its own Composio key cannot watch apps yet. Details: docs/composio.md.
OpenMausBot starts a webhook-only receiver on 127.0.0.1:8800 by default (or one port above OMB_PORT).
Set OMB_WEBHOOK_PORT to choose another port. A webhook secret is shown once when the trigger is created
or rotated. Bearer authentication is recommended so the secret stays out of request URLs and most access
logs; a single capability URL remains available for senders that cannot configure headers. The receiver
exposes only /health and secret /hooks/... endpoints; it never exposes the app's broader API.
OpenMausBot must remain running to accept a delivery. For public internet delivery, proxy only this
dedicated receiver through a hosted relay or a tool such as Tailscale Funnel.
Status
Early but real — the loop works end to end: message → agent → streamed reply → tools → approvals →
computer use. macOS, Windows, and Ubuntu 24.04 x64 have released builds; Ubuntu remains a beta with the
capability limits above. Rough edges to expect: hosted/mobile connectivity is still being built, and webhook
triggers currently use the local receiver rather than an always-on hosted relay.
Hosted voice needs an ElevenLabs, Fish Audio, or xAI key; built-in Mac and local Chatterbox voices need no cloud key. Take-turns calls and the composer mic listen on-device on macOS and through Fish Audio speech-to-text on Windows and Linux (the same Fish Audio key as voices). See docs/voice-mode.md for the design and the known gaps.
Contributions welcome — the driver SPI in server/contracts.ts is deliberately
small; adding a provider is one file in server/drivers/ plus a one-line registration.
No code needed at all for your own engines: any ACP-speaking CLI or OpenAI-compatible endpoint
plugs in through config — see docs/custom-engines.md.
Users can add their own MCP tool servers with zero code via docs/custom-mcp-servers.md.
To run bots on OpenRouter, Fireworks AI, DeepSeek, Cline or your own OpenAI- or Anthropic-compatible provider,
see Other model providers.
Privacy
Usage analytics are optional and anonymous: product events and a once-a-day count of what is set up, never keys,
names, addresses or conversations. Turn them off in Settings → General → Usage analytics;
docs/analytics.md lists every event and property.
Support the project
OpenMausBot is free and open source. If it does real work for you, you can
support its development through GitHub Sponsors
with a one-time contribution or a monthly sponsorship. Your support helps fund ongoing development
and maintenance; OpenMausBot remains free and open source.
Run from a terminal or on a server
With Node 24 or newer, install once and run:
npm install -g openmausbot
openmausbot
Or use npx openmausbot without a global install. First launch guides you with
arrow-key choices: choose AI access, sign in or paste a hidden API key, choose
a model, and optionally connect a phone. Next time, the same command reuses your
saved setup and opens OpenMausBot on this computer. Keep the terminal open; Ctrl-C stops
the server, not your saved work. Use --no-open to skip opening the browser.
Phone access is optional and defaults to skipping. Choose an explicitly
approved managed public HTTPS endpoint protected by pairing, an existing
Tailscale connection, or your own HTTPS reverse proxy. Both native apps pair from
this flow: the QR is an app link when you are connecting an Android phone, and the
iOS app takes either that or the web link. A browser works on either phone. A phone
cannot use a localhost link. --local ignores saved remote access for one launch;
--no-pair suppresses phone prompts and invitations but does not disable a saved
remote connection.
The web UI can also be installed from Safari or Chrome as a standalone phone
app. See Install the phone web app for Home Screen
installation and pairing.
Run openmausbot setup to reconfigure without resetting bots or conversations;
the saved model default applies only to new bots. Native setup confirms provider
sign-in; API setup asks before a potentially billable test message. API keys are
saved as plaintext, not encrypted, in private config.json (0600 on Unix).
See the short setup guide for account differences,
phone choices, credential storage, and cancellation.
For a server on a VPS or an always-on computer, run npx openmausbot serve
with one way in: --public-url behind your own cloudflared, Caddy or nginx,
--domain for a certificate on your own domain, --tailscale for your
tailnet, --lan for this network only, or --tunnel (after
npx openmausbot login) for a free MausBot web address. It prints one
pairing link; paste it into the desktop app under **+ → Connect to a
server**. The short path for each install method (npx, Docker, a service) is
at the top of docs/self-hosting.md; a server from
scratch is docs/deploy-vps.md.
License
Apache License 2.0 © 2026 Milind Soni and OpenMausBot contributors,
except enterprise/, which is source-available under its
own license; delete that folder and what remains is the
open-source edition. Details, including how contributions are signed off, are
in LICENSING.md.
Packaged Cua Driver components retain their upstream MIT, SIL OFL 1.1, MPL-2.0, and other dependency terms;
the corresponding notices, license texts, source locations, and SBOM are in
third_party/cua-driver/ and ship beside the native runtime.
OpenMausBot is an independent, open-source project inspired by Grok Bot. It is
not affiliated with, endorsed by, or associated with xAI; "Grok" is a trademark
of its respective owner.
TypeScript
19.1K
stars
7.6K
forks
What users love
No positive feedback yet
Areas for improvement
Agent reliability breaks around MCP integrations: the highest-weight report says Codex turns fail after a custom MCP restart; other reports say iCloud MCP setup or connected-app mount failures stop all bots or every chat turn.
Provider and credential handling failures interrupt work: DashScope streaming loses tool-call IDs, credential-backed tools become unauthorized after context refresh, and background Codex calls return 403 in blocked regions.
Remote access and hosted setup are unreliable: pairing invitations cannot be generated, secure HTTPS pairing capacity is exhausted, and users encounter 502/504 errors.
Windows connectors fail to connect; iOS users report scrolling problems and failing Open-button navigation.
Automation results can be delivered to the wrong conversation, failure indicators remain uncleared, and Codex native skills cannot be disabled per bot even after deleting imported copies.
What users love
No positive feedback yetAreas for improvement
Agent reliability breaks around MCP integrations: the highest-weight report says Codex turns fail after a custom MCP restart; other reports say iCloud MCP setup or connected-app mount failures stop all bots or every chat turn.
Provider and credential handling failures interrupt work: DashScope streaming loses tool-call IDs, credential-backed tools become unauthorized after context refresh, and background Codex calls return 403 in blocked regions.
Remote access and hosted setup are unreliable: pairing invitations cannot be generated, secure HTTPS pairing capacity is exhausted, and users encounter 502/504 errors.
Windows connectors fail to connect; iOS users report scrolling problems and failing Open-button navigation.
Automation results can be delivered to the wrong conversation, failure indicators remain uncleared, and Codex native skills cannot be disabled per bot even after deleting imported copies.
7
pingdotgg/t3code
-
TypeScript53.2K15.4K
7
pingdotgg/t3code
-
TypeScript
53.2K
stars
15.4K
forks
What users love
No positive feedback yet
Areas for improvement
Agent-session lifecycle failures can kill live Claude subagents, brick stopped threads, or leave Grok child agents stuck as running; transient Antigravity network failures crash turns instead of retrying.
Remote connectivity can silently fail when cloudflared is missing, fail after VPN changes, or misreport running Tailscale installations.
Account and model reporting is inconsistent: enabled Claude accounts and billed Cursor accounts are omitted, custom Codex models are excluded, and mobile threads lack account badges.
Desktop, web, and mobile workflow defects include hard rerenders, unresumed drafts, incomplete file copying, inaccessible HTML/PDF links, and failed longer iPhone voice recordings.
Security and resource-management defects include Claude MCP bearer tokens exposed in process arguments, settled Codex threads retaining MCP servers, and protected Git configuration scans hanging the server.
What users love
No positive feedback yetAreas for improvement
Agent-session lifecycle failures can kill live Claude subagents, brick stopped threads, or leave Grok child agents stuck as running; transient Antigravity network failures crash turns instead of retrying.
Remote connectivity can silently fail when cloudflared is missing, fail after VPN changes, or misreport running Tailscale installations.
Account and model reporting is inconsistent: enabled Claude accounts and billed Cursor accounts are omitted, custom Codex models are excluded, and mobile threads lack account badges.
Desktop, web, and mobile workflow defects include hard rerenders, unresumed drafts, incomplete file copying, inaccessible HTML/PDF links, and failed longer iPhone voice recordings.
Security and resource-management defects include Claude MCP bearer tokens exposed in process arguments, settled Codex threads retaining MCP servers, and protected Git configuration scans hanging the server.
8
Nutlope/hallmark
Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS51.3K6.4K
8
Nutlope/hallmark
Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS
51.3K
stars
6.4K
forks
What users love
Supports multiple AI coding tools including Claude Code, Cursor, and Codex
Offers anti-AI-generated design output with different shapes for different briefs
Provides multiple modes such as build, audit, redesign, and study
Includes custom theme generation when no catalog theme fits
Ships with install/update instructions and reusable skill files
Areas for improvement
One review reports installation failure: 'No valid skills found'
The SKILL.md description appears to break YAML parsing because of an unquoted colon
No negative reviews were provided beyond the install issue
Limited review volume makes it hard to validate broader weaknesses
Potential setup friction during skills add/install
What users love
Supports multiple AI coding tools including Claude Code, Cursor, and Codex
Offers anti-AI-generated design output with different shapes for different briefs
Provides multiple modes such as build, audit, redesign, and study
Includes custom theme generation when no catalog theme fits
Ships with install/update instructions and reusable skill files
Areas for improvement
One review reports installation failure: 'No valid skills found'
The SKILL.md description appears to break YAML parsing because of an unquoted colon
No negative reviews were provided beyond the install issue
Limited review volume makes it hard to validate broader weaknesses
Potential setup friction during skills add/install
9
Renhuai123/ziwei-doushu
紫微斗数 · 开源排盘引擎
算法是公开的传统智慧,不应该被锁在围墙里
CI
License: MIT
Dataset: CC BY 4.0
中文 · English
一、项目理念:紫微斗数是中国传统命理学的瑰宝,倪海厦老师在《天纪》中系统梳理了正宗的紫微斗数体系。我们希望通过技术手段让更多人接触和学习这门学问。
开源排盘算法和知识库,是因为我们相信:算法是公开的传统智慧,不应该被锁在围墙里。真正的价值在于解读的深度、用户体验的打磨、以及持续运营的积累。
二、项目信息:基于倪海厦《天纪》教学体系的紫微斗数排盘系统,包含完整排盘算法、四化系统、格局知识库、古籍原文数据,以及一套完整开源的紫微斗数解读数据:v4.0 解读数据集——67.5 万张命盘 × 13 维 = 877 万段解读,正文约 204 亿字,解压后 56.6 GB(2026-10-15 发布)。
| 数据集 | 命盘 | 解读段数 | 解压后 | 覆盖年份 | 每张盘解读字数 |
|---|---|---|---|---|---|
| v4.0 解读数据集(2026-10-15) | 674,976 | 8,774,688 | 56.6 GB | 1950–2026(只含真实日期) | 约 3.0 万字 |
| v3.0 样本数据集 | 518,400 | 6,739,200 | 33.1 GB | 1924–1983 | 约 2.1 万字 |
| 变化 | +30% | +30% | +71% | +17 年 | +44% |
v3.0 每张盘解读字数按 2,160 张盘抽样估算,其余数字为全量统计;两版每张盘都是 13 维。
在线体验:ouranic.cn,排盘、AI 解读、命盘历史全部开放。
注:关于六亲判断
紫微斗数在六亲(父母、兄弟、子女等)判断上存在一定局限。倪师在《天纪》中指出:“斗数批六亲本来就比较差一点。”(2上 · 00:25:27)在传统术数中,铁板神数在核对六亲方面有其独特优势(2上 · 00:03:15);倪师仍以紫微斗数为核心,是因为它能结合地理、环境与人事进行综合判断,形成“上知天文、下知地理、中知人事”的完整体系(2上 · 00:25:43)。因此,与六亲相关的分析仅供参考;ouranic.cn 上父母、兄弟、子女三个维度也附有同样的说明。
目录
| | 章节 | 一句话 |
|---|------|--------|
| 一 | 本轮更新 | 13 维断语按倪师原话与《全书》逐句校正,发布 67.5 万命盘 × 13 维解读数据集 v4.0 |
| 二·新 | 13 维解读数据集 v4.0 | 2026-10-15 新版断语,67.5 万命盘,按年份下载 |
| 二 | 51.8 万命盘样本数据集 | 规格、下载、用途、许可 |
| 三 | 快速开始 | 克隆到跑起来 |
| 四 | 排盘引擎 | 能做到什么、文件怎么分、古籍数据 |
| 五 | 倪师《天纪·紫微斗数》原话 | 14 讲 + 2 段补充、1848 条,一图看全,每条可回放 |
| 六 | 界面是一份 Demo | 不是线上那套,差距写明 |
| 七 | 开源边界 | 什么开源、什么不开源 |
| 八 | 维护节奏与贡献 | 同步节奏、issue / PR 口径 |
| 九 | 协议 | 代码 MIT / 数据 CC BY 4.0 / 古籍公版 / 倪师原话非商用 |
| 十 | 关于与联系 | 项目理念、技术栈、联系方式 |
一、本轮更新(2026-10-15)
本轮跟随网站 2026-10-15 发版(网站内容版本 ca268829f7a9):
本轮更新总览
1. 发布 13 维解读数据集 v4.0 —— 674,976 张命盘(公历 1950–2026 年每一个真实日期 × 12 时辰 × 男女)× 13 维 = 8,774,688 段解读,正文约 204 亿字。解压后 56.6 GB(v3.0 为 33.1 GB,增加 71%),压缩后只有 161 MB,按年份分 77 个文件,可以只下需要的年份,也可以一次下全年份总包。下载见 Release v4.0-13d,规格和字段见第二·新章。发布前 77 个文件逐个解压,与原始数据逐字节比对一致。
2. 13 维断语按倪师原话与《全书》原文逐句校正(断语库仍不开源,校正结果体现在 v4.0 数据集里):
标着倪师或《全书》却查不到出处的引文,删掉或换成逐字可查的原话;倪师原话注明《天纪》第几集、几分几秒
不会发生的四化(如七杀化权、紫微化忌)相关的句子删去;只在某种条件下才成立的断语补上条件
「力量强时……落陷时……」这类两头说的句子,改为按命盘只显示成立的那一种
健康:哪个脏腑要留意,改按倪师的看法——全盘杀星最集中的那一宫,按它的地支对应脏腑;不再按星的五行推脏器
网站知识库「古籍引证」由 244 处增至 405 处,每一处都能在《紫微斗数全书》原文里逐字找到
3. 排盘引擎同步(PR #39)—— dst-cn.ts 新增 chinaDSTSpan(year),查某年中国夏令时起止;cities.ts 补全省直辖县级单位与新疆兵团各市的经度(神农架、海南各市县、阿拉尔等),出生地选这些城市时真太阳时校正可用。
4. 许可 —— DATASET-LICENSE 适用范围加上 v4.0;写明解读里引用的倪师原话不在数据授权范围内,与第五章倪师原话的 CC BY-NC-SA 4.0 一致。v3.0 样本数据集及其条款不变。
2026-11-08 补充:新开公开仓 nishi-ziwei-video-reading——用多家大模型把倪师《天纪》紫微 17 集共 160 万帧逐帧精读一遍,方案、脚本、考试成绩和踩过的坑全过程公开,边做边更新,近期动态看那里。
2026-11-02 补充:晚子时换日改按真太阳时判断,与时辰支同一口径(#63)——填了出生地时,东经 100° 钟表 23:30(真太阳时 22:10,亥时)留在本日,不再排成「次日亥时」;不填出生地不做校正,结果不变,线上 ouranic.cn 也是这个口径。闰月归属参数写错时当场报错,不再静默按「归本月」排盘(#71)。感谢 Bortlesboat、xunguangzlj-cloud 提交,Verchiel666 复核。
2026-10-31 补充:线上平台更名 OURANIC,网址由 metisziwei.com 迁到 ouranic.cn(运营主体北京王多鱼科技有限责任公司,京ICP备2026069066号-1);旧网址会自动跳转,本仓库的代码、数据集与许可都不变。
2026-10-27 补充:排盘引擎同步——true-solar-time.ts 支持海外出生地:传 utcOffsetMinutes(出生地时区的固定标准偏移),按当地时区中央经线做经度修正,国内不传时结果逐位不变;新增 clock-adjust.ts,把夏令时、或当年时区与现在不同时的钟表读数换成标准时间(跨日不改,交给用户),建议做成用户亲手点、可撤销的按钮,不要自动改。顺带更正:中国夏令时引擎只判定、从不自动扣除,此前「引擎能力」表写成「自动扣除」,有误。
2026-10-24 补充:项目理念移到页首——标题下居中一句「算法是公开的传统智慧,不应该被锁在围墙里」,紧接两段理念原文(前标「项目理念」),原有介绍段前标「项目信息」;第十章「项目理念」改为指向页首。
2026-10-20 补充:星曜亮度默认改为《斗数全书》,与主流排盘软件默认一致,此前默认的「现代修正 v2」仍可在流派设置里选;补齐天姚、天刑、天喜、大耗、解神、截空、副截、旬空的亮度,月德不再标亮度。用 5 张金标准盘逐宫核对,星曜落宫与亮度全部吻合。注意:v4.0 数据集(10-15)是按旧默认「现代修正 v2」生成的,其中亮度字和少量随亮度变化的解读句会与新默认不同。
2026-10-06 ~ 10-07 补充:README 加「注:关于六亲判断」(倪师原话 + 出处链接,中英两份);网站链接加渠道码 ?from=;同步倪师原话语料勘误(主星南斗、北斗归属)。
上一轮更新(2026-09-21)
2026-10-03 补充:倪师《天纪·紫微斗数》原话 1848 条单独成章(第五章);合并外部贡献 #29(时辰序号校验);引擎拒绝不存在的公历日期,数据集补字段口径与已知问题;提交 package-lock.json;站点地址改为可配置;合盘演示改用本地引擎起盘、AI 接口缺失时明确提示;补齐贡献指南、行为准则、问题与 PR 模板;新增英文简介 README.en.md;去掉两个用不上的部署工具包(vercel CLI、@cloudflare/next-on-pages),依赖从 483 个减到 185 个;随后升级到 Next.js 16 修掉 postcss 漏洞,GitHub 安全提醒从 51 条清零。
本轮更新总览
时隔三个月,本仓库完成一次完整更新(PR #28,26 个文件、+2736 / −108 行):
1. 排盘引擎同步到线上口径 —— algorithm.ts 从 181 行到 641 行,另更新 sihua / types / constants / patterns / cities / famous;新增 8 个模块(1367 行):
| 模块 | 作用 |
|------|------|
| true-solar-time.ts | 真太阳时校正(经度差 + 均时差) |
| dst-cn.ts | 中国 1986–1991 夏令时 |
| clock-adjust.ts | 钟表读数换成标准时间(夏令时 / 当年时区不同) |
| lunar-solar.ts | 农历 / 公历互转与闰月边界 clamp |
| school-data.ts / school-tables.generated.ts / school-config.ts | 星曜亮度流派数据与对照表、闰月与晚子时口径配置 |
| shier-shen.ts | 十二神煞 |
| yunxian-context.ts | 运限上下文(含童限) |
2. 补上回归测试与 CI —— 此前本仓库没有任何测试。现在 5 条排盘回归,npm test 一条命令跑完,每次 push 与 PR 在 GitHub Actions 上自动跑。
3. 修掉样本时辰注释错位(#26)—— famous.ts 里 11 条名人样本有 7 条的时辰注释与 hour 索引不符(hour 一直是时辰地支索引 0–11,不是 0–23 的小时数)。已改正并加回归钉住。
4. 积压 issue 从 18 条清到 4 条,留下的都是还在走的。
5. 文档与许可 —— 新增 DATASET-LICENSE;README 补齐引擎能力清单、维护节奏、开源边界;修正两处不实描述(数据集「口径与线上完全一致」、界面「完整的 Next.js 15 前端」)。
二·新、13 维解读数据集 v4.0(2026-10-15)
下载位置:本仓库右侧 Releases → v4.0-13d
v4.0 用 2026-10-15 版网站断语库重新生成:13 个分析维度的断语已按倪海厦《天纪》逐字稿与《紫微斗数全书》原文逐句校正——查不到出处的引文删去或换成逐字可查的原话(倪师原话注明《天纪》集数与时间码),不会发生的四化相关句子删去,有条件的断语写明条件。
规格
| 项目 | 说明 |
|------|------|
| 命盘数 | 674,976 张(公历 1950–2026 年 × 真实每月天数 × 12 时辰 × 男女) |
| 解读段数 | 8,774,688 段(每张盘 13 维) |
| 维度 | 命格总览、性格、感情、事业、财运、健康、兄弟、子女、迁移、人际、田宅、福德、父母 |
| 大小 | 解压后 56.6 GB;压缩后 161 MB(77 个年份文件,zstd;另有一个全年份总包 ziwei-interp-v4-all.tar) |
| 正文 | 约 204 亿字,每张盘约 3.0 万字 |
| 生成方式 | 排盘引擎 + 断语库确定性生成,不经 AI,同一输入恒得同一输出 |
| 内容版本 | ca268829f7a9(与网站同期的 ANALYSIS_CONTENT_VERSION) |
每行一张盘(JSON Lines),字段:
| 字段 | 含义 |
|------|------|
| k | 键:YYYY-MM-DD-时辰序号-性别,如 1990-01-01-0-male |
| y / m / d | 公历出生日期;只含真实存在的日期(不再有 2 月 30 日之类) |
| h | 时辰序号 0–11(子 = 0 …… 亥 = 11),不是钟点;对照表见上一节 |
| g | male / female |
| ms | 命宫第一颗主星;命宫无主星时为 null |
| t | 各维字数 |
| c | 13 维解读全文(Markdown),键为 overview / personality / love / career / wealth / health / family / children / move / friends / home / spirit / parents |
口径说明
是本命盘视图的解读;网站上按读者当前年龄改写的句子、各维末尾附加的倪师法则段、AI 解读都不在数据集里。
按时辰序号直接排盘,未按出生地做真太阳时校正。
下载与解压
一次下全部:gh release download v4.0-13d --repo Renhuai123/ziwei-doushu -p "ziwei-interp-v4-all.tar"
只要某几年就只下那几年,例如 1990 年
zstd -d --long=27 year-1990.jsonl.zst # 得到 year-1990.jsonl
shasum -a 256 -c SHA256SUMS.txt --ignore-missing # 校验
--long=27 必须带上(压缩时用了长窗口)。Windows 可用 zstd 官方发布包 里的 zstd.exe,参数相同。
引文说明
解读里引用的倪海厦《天纪》原话不属于本数据集的授权范围:它们是为说明断语出处而注明集数与时间码的简短引用,著作权归原权利人;要把这些原话单独成批使用,按第五章倪师原话的 CC BY-NC-SA 4.0 处理。《紫微斗数全书》原文属公有领域。
许可
与 v3.0 相同:CC BY 4.0,可自由商用,唯一要求是保留来源标注(上面「引文说明」里的倪师原话除外),完整条款见 DATASET-LICENSE。引用时请写:
本项目使用了 紫微斗数开源解读数据集 v4.0(674,976 张命盘 × 13 维)
来源:https://github.com/Renhuai123/ziwei-doushu
作者:王多鱼AI
二、51.8 万命盘样本数据集
下载位置:本仓库右侧 Releases 页面
我们开源了一套完整的紫微斗数命盘样本数据集,覆盖 51.8 万种排盘组合(年 60 × 月 12 × 日 30 × 时 12 × 性别 2),每条样本包含完整的命盘结构和基于倪海厦体系的解读文本。
2.1 数据规格
| 项目 | 说明 |
|------|------|
| 样本数量 | 518,400 条 |
| 总大小 | 压缩后 5.5 GB(分 3 卷),解压后 33.1 GB |
| 体系 | 倪海厦《天纪》正统(纯飞星派已下线) |
| 内容 | 命盘 JSON + 13 主题解读文本(命格总览、财运、事业、感情、健康等) |
| 验证 | 男女命差异化 100%、健康含子午流注 100%、女命含妇科保养 100% |
| 口径 | 由 v3 版排盘引擎 + 当期断语库生成;线上引擎在持续更新,新版输出与本数据集可能有差异 |
字段口径(每条样本由 birthInfo 生成,常被看错的是 hour):
| 字段 | 含义 |
|------|------|
| birthInfo.year / month / day | 公历出生日期:1924–1983 年(一个完整甲子),每月取 1–30 日 |
| birthInfo.hour | 时辰序号 0–11,不是 0–23 点钟:子 = 0、丑 = 1 …… 亥 = 11 |
| birthInfo.gender | male / female |
| birthInfo.longitude | 固定 120(东经 120°,未做各地真太阳时校正) |
| 文件名 YYYY-MM-DD-hHH-性别.json | 其中 hHH 同样是时辰序号,例如 h11 是亥时,不是上午 11 点 |
时辰序号与钟点对照:
| 序号 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 时辰 | 子 | 丑 | 寅 | 卯 | 辰 | 巳 | 午 | 未 | 申 | 酉 | 戌 | 亥 |
| 钟点 | 23–1 | 1–3 | 3–5 | 5–7 | 7–9 | 9–11 | 11–13 | 13–15 | 15–17 | 17–19 | 19–21 | 21–23 |
23:00–23:59 出生(晚子时)按次日排盘、时辰取 0;00:00–00:59 出生(早子时)按当日排盘、时辰同样取 0。
已知问题:约 2,520 条样本的日期并不存在。 生成时每个月都取了 1–30 日,所以 2 月 30 日,以及非闰年的 2 月 29 日也生成了样本,共 105 个日期 × 12 时辰 × 2 性别 = 2,520 条,占 0.49%。v3 引擎遇到这类日期不报错,而是顺延成 3 月 1–2 日排盘,所以这些样本的内容与对应的 3 月 1–2 日样本重复。使用时请过滤掉:month = 2 且 day = 30,或 month = 2 且 day = 29 且该年不是闰年。引擎从 2026-10-03 起会直接拒绝不存在的日期,下一版数据集不会再有这类样本。
2.2 下载方式
前往 Releases 下载以下文件:
ziwei-samples-v3-part1.zip.001 (1.9 GB)
ziwei-samples-v3-part2.zip.002 (1.9 GB)
ziwei-samples-v3-part3.zip.003 (1.8 GB)
SHA256SUMS.txt (校验文件)
下载后合并解压:
macOS / Linux
cat ziwei-samples-v3-part.zip. > combined.zip
unzip combined.zip
Windows (PowerShell)
Get-Content ziwei-samples-v3-part.zip. -Encoding Byte -ReadCount 0 | Set-Content combined.zip -Encoding Byte
Expand-Archive combined.zip
2.3 用途
微调小模型的训练语料(51.8 万 input-output 配对)
AI 对话的 RAG 检索源
修改 patterns.ts 后做 A/B 基线对比
紫微斗数研究与数据分析
2.4 数据许可与引用
📂 完全开源 · 可自由商用 —— 你可以在任何项目里使用这套数据,包括但不限于:
商业产品 / SaaS / 付费应用
AI 模型微调(开源或闭源模型均可)
二次开发、再分发、衍生数据集
学术研究、技术博客、教学课程
无需付费、无需申请、无需事先告知。
唯一的要求是保留数据来源标注(attribution):
本项目使用了 紫微斗数开源样本数据集 v3.0(518,400 条)
来源:https://github.com/Renhuai123/ziwei-doushu
作者:王多鱼AI
放在哪里都行:
网页 / 产品:About 页 / 关于我们 / 数据来源 / 页脚,写一行链接即可
AI 模型:模型卡(Model Card)或数据集卡(Dataset Card)的 "Training Data" 字段
学术论文:参考文献或致谢章节
二次发布的数据集:README 或 metadata 文件里注明上游来源
仅此一条,其余都自由。完整条款见 DATASET-LICENSE。希望这套数据能帮你做出好东西 —— 做出来记得来小红书 / 抖音 / 闲鱼 @王多鱼AI 打个招呼 👋
三、快速开始
克隆
git clone https://github.com/Renhuai123/ziwei-doushu.git
cd ziwei-doushu
安装依赖
npm install
配置环境变量(只看排盘可以跳过;AI 配置仅在你自己实现了 /api/* 接口时才用得上)
cp .env.example .env.local
启动开发服务器
npm run dev
本地验证:
npm run typecheck # TypeScript 全量类型检查
npm test # 排盘引擎回归(768 盘 × 紫微铁律、夏令时、立春边界、红鸾天喜、样本时辰一致性、时辰序号边界、日期合法性、同宫双四化)
每次 push 与 PR 都会在 GitHub Actions 上跑同一套(见 .github/workflows/ci.yml)。
注意:开源版不含后端 API 路由。排盘、命盘展示、合盘起盘都在浏览器里用本仓库的引擎完成,不需要任何 API Key。AI 解读(/api/interpret)和合盘 AI 分析(/api/heming)需要你自己实现接口;没实现之前,这两处会直接提示「开源版不含该接口」,配置 API Key 也不会变成可用(#30 就是这个原因)。
四、排盘引擎
排盘内核全部在 lib/ziwei/。
4.1 能做到什么(与常见排盘库的差异)
| 能力 | 说明 |
|------|------|
| 真太阳时校正 | 按出生地经度算时差 + 均时差,避免东西向差一个时辰 |
| 中国夏令时 | 1986–1991 年的夏令时区间自动判定(只判定、不自动扣除;钟表读数由用户确认后用 clock-adjust.ts 换成标准时间) |
| 闰月四种口径 | 闰月归前月 / 归后月 / 按日切分 / 按本月,可配置,不写死一派 |
| 晚子时换日 | 23:00–23:59 按次日排盘、00:00–00:59 按本日;填了出生地时按真太阳时判断(与时辰同一口径);换日策略可切换 |
| 星曜亮度 7 档 | 庙 / 旺 / 得 / 利 / 平 / 不 / 陷,另保留 3 档粗分类做显示降级 |
| 亮度流派可切换 | 不同流派(含主流排盘软件的不同版本)对辅星亮度判法不一致,做成开关而非写死 |
| 四化与飞星 | 生年四化、大限 / 流年四化、飞星自化 |
| 十二神煞 | 本命层按生年支起,流年层改按流年支起 |
| 格局判定 | 1100+ 行规则库(紫府同宫、日月并明、七杀朝斗等) |
4.2 文件怎么分
| 文件 | 说明 |
|------|------|
| algorithm.ts | 完整排盘流程:安命宫、定五行局、安十四主星、安辅星、排大限流年 |
| constants.ts | 天干地支、十四主星、辅星常量 |
| sihua.ts | 四化飞星系统(禄权科忌),含各天干四化对照表 |
| patterns.ts | 1100+ 行格局知识库:紫府同宫、日月并明、七杀朝斗等经典格局判定规则 |
| heming-knowledge.ts | 合盘方法论:倪师体系下双盘比对逻辑 |
| types.ts | TypeScript 类型定义 |
| cities.ts | 中国城市经纬度,用于真太阳时校正 |
| famous.ts | 历史名人命盘示例数据 |
| school-data.ts / school-tables.generated.ts / school-config.ts | 星曜亮度流派数据与对照表、闰月与晚子时口径配置 |
| shier-shen.ts | 十二神煞(本命按生年支起、流年层按流年支起) |
| true-solar-time.ts | 真太阳时校正(经度差 + 均时差) |
| dst-cn.ts | 中国 1986–1991 夏令时年份与区间 |
| clock-adjust.ts | 钟表读数按分钟平移成标准时间(跨日不改) |
| yunxian-context.ts | 运限上下文(含童限处理) |
| lunar-solar.ts | 农历 / 公历互转与闰月边界 clamp |
4.3 古籍原文(lib/classics/)
骨髓赋(gusuifu.ts)— 紫微斗数核心歌诀
紫微斗数全集(quanji.ts)— 清代古本
紫微斗数全书(quanshu.ts)— 陈希夷传本
4.4 SEO 知识图谱(lib/seo/)
14 主星 × 12 宫位的结构化知识数据,可用于内容生成或知识库构建。
五、倪师《天纪·紫微斗数》原话
倪海厦《天纪·紫微斗数》一图看全
倪海厦《天纪》紫微斗数部分的原话共 1848 条:正课 14 讲(第 2–15 讲上半)加 2 段补充,按讲分成 16 个文件,放在 docs/tianji-ziwei/。每条都带出处时间,点一下就跳回 B 站原视频的那一秒。
怎么读:先在上图里找到想看的主题,再点进对应那一讲,比如 5上(紫微在子)、13上(杀破狼、科权禄三会)。
从哪来:取自姊妹仓库 nihai-tianji-corpus,以语料库为准,会随语料库同步。
能不能商用:不能。这一章的内容单独采用 CC BY-NC-SA 4.0,详见九、协议。
六、界面是一份 Demo
界面代码在 app/ 与 components/。仓库里的界面是一套最小可运行示例,作用是把排盘引擎跑起来、把盘画出来,方便你在它基础上做自己的产品。线上商业版的界面不在开源范围内,两者差距很大:
| 页面 / 组件 | 本仓库(Demo) | 线上商业版 |
|------|------|------|
| 排盘页 app/chart/page.tsx | 75 行 | 1227 行 |
| 解读面板 InsightPanel | 467 行 | 5088 行 |
| 命盘方格 ChartBoard | 285 行 | 1334 行 |
| 宫位格 PalaceCell | 201 行 | 1192 行 |
| 合盘页 app/heming/page.tsx | 368 行 | 1937 行 |
Demo 能跑通的:出生信息表单、命盘方格与宫位详情、本命 / 大限 / 流年切换、古籍阅读器(全文搜索)、命理百科(14 主星 × 12 宫位)、亮暗主题、移动端适配。
Demo 里没有的:线上重做过的交互界面、AI 流式解读、合盘图谱、分享卡片,以及断语内容本身(db-analysis.ts 是占位实现)。也就是说,Demo 画得出盘,但给不出线上那套解读。
七、开源边界:什么不在里面
| | 内容 |
|---|---|
| ✅ 开源 | 排盘引擎(lib/ziwei/)、古籍公版原文(lib/classics/)、SEO 知识图谱(lib/seo/)、Demo 界面、51.8 万样本数据集、13 维解读数据集 v4.0 |
| ❌ 不开源 | 断语库(lib/ziwei/db-analysis.ts 是占位,线上是上万行的 13 主题断语)、AI 解读 prompt、后端 API(/api/interpret 等)、用户系统(登录 / 会员 / 支付)、服务端安全(签名、防刷、水印)、部署配置 |
如果你需要 AI 解读能力,可以参考 lib/ziwei/patterns.ts 和 heming-knowledge.ts 里的知识库,结合任意 LLM 自行构建 prompt。
八、维护节奏与贡献
这个仓库是排盘引擎 + 数据集的开放快照,不是一个全职维护的开源产品,说清楚免得大家猜:
引擎同步:随线上发版同步 lib/ziwei/ 的引擎层并打 tag;断语库、AI 解读、商业站前端不在同步范围内。
Issue:会看,但回复可能不及时;带复现步骤或具体盘例(年月日时 + 性别 + 哪一条不对)的问题优先处理。
PR:欢迎,尤其是回归测试、口径修正、文档。动到排盘口径的改动请附上依据(古籍原文或可核对的对照)。
九、协议
本仓库分四部分授权。前三部分是宽松协议,商用没有限制;倪师原话目录不许商用:
| 内容 | 协议 | 简单说 |
|------|------|--------|
| 代码(lib/、app/、components/) | MIT License | 拿去随便用,保留 LICENSE 文件即可 |
| 数据(Releases 中的 51.8 万样本数据集 v3.0、13 维解读数据集 v4.0) | CC BY 4.0 · 要求 attribution | 商用也行,注明数据来源即可 |
| 古籍原文(骨髓赋、紫微斗数全集 / 全书等) | Public Domain | 古书都是公有领域,不存在版权 |
| 倪师原话(docs/tianji-ziwei/) | CC BY-NC-SA 4.0 | 可以引用、转载,注明出处;不许商用,改编后用同样协议 |
一句话:代码和数据拿去用,商用也行,把来源链接带上就行;倪师原话只限非商业的学习研究(数据集解读里引用的倪师原话同样不在数据授权范围内)。
十、关于与联系
项目理念
见本页开头。想自己搭?代码都在这里,拿去用。嫌麻烦?来 ouranic.cn 直接用。
技术栈
框架:Next.js 16(App Router)
语言:TypeScript
样式:Tailwind CSS + CSS Variables 设计系统
排盘:基于 iztro + lunar-javascript
动画:Framer Motion
联系
线上平台:ouranic.cn(已完成 ICP 备案:京ICP备2026069066号-1)
提问题、提修复:见 CONTRIBUTING.md;使用交流请到 讨论区
💕 发财的小手点一下:小红书 / 抖音 / 闲鱼 / X 关注 王多鱼AI,第一时间看上线 + 解锁更多紫微干货~
TypeScript17.2K4.2K
9
Renhuai123/ziwei-doushu
紫微斗数 · 开源排盘引擎
算法是公开的传统智慧,不应该被锁在围墙里
CI
License: MIT
Dataset: CC BY 4.0
中文 · English
一、项目理念:紫微斗数是中国传统命理学的瑰宝,倪海厦老师在《天纪》中系统梳理了正宗的紫微斗数体系。我们希望通过技术手段让更多人接触和学习这门学问。
开源排盘算法和知识库,是因为我们相信:算法是公开的传统智慧,不应该被锁在围墙里。真正的价值在于解读的深度、用户体验的打磨、以及持续运营的积累。
二、项目信息:基于倪海厦《天纪》教学体系的紫微斗数排盘系统,包含完整排盘算法、四化系统、格局知识库、古籍原文数据,以及一套完整开源的紫微斗数解读数据:v4.0 解读数据集——67.5 万张命盘 × 13 维 = 877 万段解读,正文约 204 亿字,解压后 56.6 GB(2026-10-15 发布)。
| 数据集 | 命盘 | 解读段数 | 解压后 | 覆盖年份 | 每张盘解读字数 |
|---|---|---|---|---|---|
| v4.0 解读数据集(2026-10-15) | 674,976 | 8,774,688 | 56.6 GB | 1950–2026(只含真实日期) | 约 3.0 万字 |
| v3.0 样本数据集 | 518,400 | 6,739,200 | 33.1 GB | 1924–1983 | 约 2.1 万字 |
| 变化 | +30% | +30% | +71% | +17 年 | +44% |
v3.0 每张盘解读字数按 2,160 张盘抽样估算,其余数字为全量统计;两版每张盘都是 13 维。
在线体验:ouranic.cn,排盘、AI 解读、命盘历史全部开放。
注:关于六亲判断
紫微斗数在六亲(父母、兄弟、子女等)判断上存在一定局限。倪师在《天纪》中指出:“斗数批六亲本来就比较差一点。”(2上 · 00:25:27)在传统术数中,铁板神数在核对六亲方面有其独特优势(2上 · 00:03:15);倪师仍以紫微斗数为核心,是因为它能结合地理、环境与人事进行综合判断,形成“上知天文、下知地理、中知人事”的完整体系(2上 · 00:25:43)。因此,与六亲相关的分析仅供参考;ouranic.cn 上父母、兄弟、子女三个维度也附有同样的说明。
目录
| | 章节 | 一句话 |
|---|------|--------|
| 一 | 本轮更新 | 13 维断语按倪师原话与《全书》逐句校正,发布 67.5 万命盘 × 13 维解读数据集 v4.0 |
| 二·新 | 13 维解读数据集 v4.0 | 2026-10-15 新版断语,67.5 万命盘,按年份下载 |
| 二 | 51.8 万命盘样本数据集 | 规格、下载、用途、许可 |
| 三 | 快速开始 | 克隆到跑起来 |
| 四 | 排盘引擎 | 能做到什么、文件怎么分、古籍数据 |
| 五 | 倪师《天纪·紫微斗数》原话 | 14 讲 + 2 段补充、1848 条,一图看全,每条可回放 |
| 六 | 界面是一份 Demo | 不是线上那套,差距写明 |
| 七 | 开源边界 | 什么开源、什么不开源 |
| 八 | 维护节奏与贡献 | 同步节奏、issue / PR 口径 |
| 九 | 协议 | 代码 MIT / 数据 CC BY 4.0 / 古籍公版 / 倪师原话非商用 |
| 十 | 关于与联系 | 项目理念、技术栈、联系方式 |
一、本轮更新(2026-10-15)
本轮跟随网站 2026-10-15 发版(网站内容版本 ca268829f7a9):
本轮更新总览
1. 发布 13 维解读数据集 v4.0 —— 674,976 张命盘(公历 1950–2026 年每一个真实日期 × 12 时辰 × 男女)× 13 维 = 8,774,688 段解读,正文约 204 亿字。解压后 56.6 GB(v3.0 为 33.1 GB,增加 71%),压缩后只有 161 MB,按年份分 77 个文件,可以只下需要的年份,也可以一次下全年份总包。下载见 Release v4.0-13d,规格和字段见第二·新章。发布前 77 个文件逐个解压,与原始数据逐字节比对一致。
2. 13 维断语按倪师原话与《全书》原文逐句校正(断语库仍不开源,校正结果体现在 v4.0 数据集里):
标着倪师或《全书》却查不到出处的引文,删掉或换成逐字可查的原话;倪师原话注明《天纪》第几集、几分几秒
不会发生的四化(如七杀化权、紫微化忌)相关的句子删去;只在某种条件下才成立的断语补上条件
「力量强时……落陷时……」这类两头说的句子,改为按命盘只显示成立的那一种
健康:哪个脏腑要留意,改按倪师的看法——全盘杀星最集中的那一宫,按它的地支对应脏腑;不再按星的五行推脏器
网站知识库「古籍引证」由 244 处增至 405 处,每一处都能在《紫微斗数全书》原文里逐字找到
3. 排盘引擎同步(PR #39)—— dst-cn.ts 新增 chinaDSTSpan(year),查某年中国夏令时起止;cities.ts 补全省直辖县级单位与新疆兵团各市的经度(神农架、海南各市县、阿拉尔等),出生地选这些城市时真太阳时校正可用。
4. 许可 —— DATASET-LICENSE 适用范围加上 v4.0;写明解读里引用的倪师原话不在数据授权范围内,与第五章倪师原话的 CC BY-NC-SA 4.0 一致。v3.0 样本数据集及其条款不变。
2026-11-08 补充:新开公开仓 nishi-ziwei-video-reading——用多家大模型把倪师《天纪》紫微 17 集共 160 万帧逐帧精读一遍,方案、脚本、考试成绩和踩过的坑全过程公开,边做边更新,近期动态看那里。
2026-11-02 补充:晚子时换日改按真太阳时判断,与时辰支同一口径(#63)——填了出生地时,东经 100° 钟表 23:30(真太阳时 22:10,亥时)留在本日,不再排成「次日亥时」;不填出生地不做校正,结果不变,线上 ouranic.cn 也是这个口径。闰月归属参数写错时当场报错,不再静默按「归本月」排盘(#71)。感谢 Bortlesboat、xunguangzlj-cloud 提交,Verchiel666 复核。
2026-10-31 补充:线上平台更名 OURANIC,网址由 metisziwei.com 迁到 ouranic.cn(运营主体北京王多鱼科技有限责任公司,京ICP备2026069066号-1);旧网址会自动跳转,本仓库的代码、数据集与许可都不变。
2026-10-27 补充:排盘引擎同步——true-solar-time.ts 支持海外出生地:传 utcOffsetMinutes(出生地时区的固定标准偏移),按当地时区中央经线做经度修正,国内不传时结果逐位不变;新增 clock-adjust.ts,把夏令时、或当年时区与现在不同时的钟表读数换成标准时间(跨日不改,交给用户),建议做成用户亲手点、可撤销的按钮,不要自动改。顺带更正:中国夏令时引擎只判定、从不自动扣除,此前「引擎能力」表写成「自动扣除」,有误。
2026-10-24 补充:项目理念移到页首——标题下居中一句「算法是公开的传统智慧,不应该被锁在围墙里」,紧接两段理念原文(前标「项目理念」),原有介绍段前标「项目信息」;第十章「项目理念」改为指向页首。
2026-10-20 补充:星曜亮度默认改为《斗数全书》,与主流排盘软件默认一致,此前默认的「现代修正 v2」仍可在流派设置里选;补齐天姚、天刑、天喜、大耗、解神、截空、副截、旬空的亮度,月德不再标亮度。用 5 张金标准盘逐宫核对,星曜落宫与亮度全部吻合。注意:v4.0 数据集(10-15)是按旧默认「现代修正 v2」生成的,其中亮度字和少量随亮度变化的解读句会与新默认不同。
2026-10-06 ~ 10-07 补充:README 加「注:关于六亲判断」(倪师原话 + 出处链接,中英两份);网站链接加渠道码 ?from=;同步倪师原话语料勘误(主星南斗、北斗归属)。
上一轮更新(2026-09-21)
2026-10-03 补充:倪师《天纪·紫微斗数》原话 1848 条单独成章(第五章);合并外部贡献 #29(时辰序号校验);引擎拒绝不存在的公历日期,数据集补字段口径与已知问题;提交 package-lock.json;站点地址改为可配置;合盘演示改用本地引擎起盘、AI 接口缺失时明确提示;补齐贡献指南、行为准则、问题与 PR 模板;新增英文简介 README.en.md;去掉两个用不上的部署工具包(vercel CLI、@cloudflare/next-on-pages),依赖从 483 个减到 185 个;随后升级到 Next.js 16 修掉 postcss 漏洞,GitHub 安全提醒从 51 条清零。
本轮更新总览
时隔三个月,本仓库完成一次完整更新(PR #28,26 个文件、+2736 / −108 行):
1. 排盘引擎同步到线上口径 —— algorithm.ts 从 181 行到 641 行,另更新 sihua / types / constants / patterns / cities / famous;新增 8 个模块(1367 行):
| 模块 | 作用 |
|------|------|
| true-solar-time.ts | 真太阳时校正(经度差 + 均时差) |
| dst-cn.ts | 中国 1986–1991 夏令时 |
| clock-adjust.ts | 钟表读数换成标准时间(夏令时 / 当年时区不同) |
| lunar-solar.ts | 农历 / 公历互转与闰月边界 clamp |
| school-data.ts / school-tables.generated.ts / school-config.ts | 星曜亮度流派数据与对照表、闰月与晚子时口径配置 |
| shier-shen.ts | 十二神煞 |
| yunxian-context.ts | 运限上下文(含童限) |
2. 补上回归测试与 CI —— 此前本仓库没有任何测试。现在 5 条排盘回归,npm test 一条命令跑完,每次 push 与 PR 在 GitHub Actions 上自动跑。
3. 修掉样本时辰注释错位(#26)—— famous.ts 里 11 条名人样本有 7 条的时辰注释与 hour 索引不符(hour 一直是时辰地支索引 0–11,不是 0–23 的小时数)。已改正并加回归钉住。
4. 积压 issue 从 18 条清到 4 条,留下的都是还在走的。
5. 文档与许可 —— 新增 DATASET-LICENSE;README 补齐引擎能力清单、维护节奏、开源边界;修正两处不实描述(数据集「口径与线上完全一致」、界面「完整的 Next.js 15 前端」)。
二·新、13 维解读数据集 v4.0(2026-10-15)
下载位置:本仓库右侧 Releases → v4.0-13d
v4.0 用 2026-10-15 版网站断语库重新生成:13 个分析维度的断语已按倪海厦《天纪》逐字稿与《紫微斗数全书》原文逐句校正——查不到出处的引文删去或换成逐字可查的原话(倪师原话注明《天纪》集数与时间码),不会发生的四化相关句子删去,有条件的断语写明条件。
规格
| 项目 | 说明 |
|------|------|
| 命盘数 | 674,976 张(公历 1950–2026 年 × 真实每月天数 × 12 时辰 × 男女) |
| 解读段数 | 8,774,688 段(每张盘 13 维) |
| 维度 | 命格总览、性格、感情、事业、财运、健康、兄弟、子女、迁移、人际、田宅、福德、父母 |
| 大小 | 解压后 56.6 GB;压缩后 161 MB(77 个年份文件,zstd;另有一个全年份总包 ziwei-interp-v4-all.tar) |
| 正文 | 约 204 亿字,每张盘约 3.0 万字 |
| 生成方式 | 排盘引擎 + 断语库确定性生成,不经 AI,同一输入恒得同一输出 |
| 内容版本 | ca268829f7a9(与网站同期的 ANALYSIS_CONTENT_VERSION) |
每行一张盘(JSON Lines),字段:
| 字段 | 含义 |
|------|------|
| k | 键:YYYY-MM-DD-时辰序号-性别,如 1990-01-01-0-male |
| y / m / d | 公历出生日期;只含真实存在的日期(不再有 2 月 30 日之类) |
| h | 时辰序号 0–11(子 = 0 …… 亥 = 11),不是钟点;对照表见上一节 |
| g | male / female |
| ms | 命宫第一颗主星;命宫无主星时为 null |
| t | 各维字数 |
| c | 13 维解读全文(Markdown),键为 overview / personality / love / career / wealth / health / family / children / move / friends / home / spirit / parents |
口径说明
是本命盘视图的解读;网站上按读者当前年龄改写的句子、各维末尾附加的倪师法则段、AI 解读都不在数据集里。
按时辰序号直接排盘,未按出生地做真太阳时校正。
下载与解压
一次下全部:gh release download v4.0-13d --repo Renhuai123/ziwei-doushu -p "ziwei-interp-v4-all.tar"
只要某几年就只下那几年,例如 1990 年
zstd -d --long=27 year-1990.jsonl.zst # 得到 year-1990.jsonl
shasum -a 256 -c SHA256SUMS.txt --ignore-missing # 校验
--long=27 必须带上(压缩时用了长窗口)。Windows 可用 zstd 官方发布包 里的 zstd.exe,参数相同。
引文说明
解读里引用的倪海厦《天纪》原话不属于本数据集的授权范围:它们是为说明断语出处而注明集数与时间码的简短引用,著作权归原权利人;要把这些原话单独成批使用,按第五章倪师原话的 CC BY-NC-SA 4.0 处理。《紫微斗数全书》原文属公有领域。
许可
与 v3.0 相同:CC BY 4.0,可自由商用,唯一要求是保留来源标注(上面「引文说明」里的倪师原话除外),完整条款见 DATASET-LICENSE。引用时请写:
本项目使用了 紫微斗数开源解读数据集 v4.0(674,976 张命盘 × 13 维)
来源:https://github.com/Renhuai123/ziwei-doushu
作者:王多鱼AI
二、51.8 万命盘样本数据集
下载位置:本仓库右侧 Releases 页面
我们开源了一套完整的紫微斗数命盘样本数据集,覆盖 51.8 万种排盘组合(年 60 × 月 12 × 日 30 × 时 12 × 性别 2),每条样本包含完整的命盘结构和基于倪海厦体系的解读文本。
2.1 数据规格
| 项目 | 说明 |
|------|------|
| 样本数量 | 518,400 条 |
| 总大小 | 压缩后 5.5 GB(分 3 卷),解压后 33.1 GB |
| 体系 | 倪海厦《天纪》正统(纯飞星派已下线) |
| 内容 | 命盘 JSON + 13 主题解读文本(命格总览、财运、事业、感情、健康等) |
| 验证 | 男女命差异化 100%、健康含子午流注 100%、女命含妇科保养 100% |
| 口径 | 由 v3 版排盘引擎 + 当期断语库生成;线上引擎在持续更新,新版输出与本数据集可能有差异 |
字段口径(每条样本由 birthInfo 生成,常被看错的是 hour):
| 字段 | 含义 |
|------|------|
| birthInfo.year / month / day | 公历出生日期:1924–1983 年(一个完整甲子),每月取 1–30 日 |
| birthInfo.hour | 时辰序号 0–11,不是 0–23 点钟:子 = 0、丑 = 1 …… 亥 = 11 |
| birthInfo.gender | male / female |
| birthInfo.longitude | 固定 120(东经 120°,未做各地真太阳时校正) |
| 文件名 YYYY-MM-DD-hHH-性别.json | 其中 hHH 同样是时辰序号,例如 h11 是亥时,不是上午 11 点 |
时辰序号与钟点对照:
| 序号 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 时辰 | 子 | 丑 | 寅 | 卯 | 辰 | 巳 | 午 | 未 | 申 | 酉 | 戌 | 亥 |
| 钟点 | 23–1 | 1–3 | 3–5 | 5–7 | 7–9 | 9–11 | 11–13 | 13–15 | 15–17 | 17–19 | 19–21 | 21–23 |
23:00–23:59 出生(晚子时)按次日排盘、时辰取 0;00:00–00:59 出生(早子时)按当日排盘、时辰同样取 0。
已知问题:约 2,520 条样本的日期并不存在。 生成时每个月都取了 1–30 日,所以 2 月 30 日,以及非闰年的 2 月 29 日也生成了样本,共 105 个日期 × 12 时辰 × 2 性别 = 2,520 条,占 0.49%。v3 引擎遇到这类日期不报错,而是顺延成 3 月 1–2 日排盘,所以这些样本的内容与对应的 3 月 1–2 日样本重复。使用时请过滤掉:month = 2 且 day = 30,或 month = 2 且 day = 29 且该年不是闰年。引擎从 2026-10-03 起会直接拒绝不存在的日期,下一版数据集不会再有这类样本。
2.2 下载方式
前往 Releases 下载以下文件:
ziwei-samples-v3-part1.zip.001 (1.9 GB)
ziwei-samples-v3-part2.zip.002 (1.9 GB)
ziwei-samples-v3-part3.zip.003 (1.8 GB)
SHA256SUMS.txt (校验文件)
下载后合并解压:
macOS / Linux
cat ziwei-samples-v3-part.zip. > combined.zip
unzip combined.zip
Windows (PowerShell)
Get-Content ziwei-samples-v3-part.zip. -Encoding Byte -ReadCount 0 | Set-Content combined.zip -Encoding Byte
Expand-Archive combined.zip
2.3 用途
微调小模型的训练语料(51.8 万 input-output 配对)
AI 对话的 RAG 检索源
修改 patterns.ts 后做 A/B 基线对比
紫微斗数研究与数据分析
2.4 数据许可与引用
📂 完全开源 · 可自由商用 —— 你可以在任何项目里使用这套数据,包括但不限于:
商业产品 / SaaS / 付费应用
AI 模型微调(开源或闭源模型均可)
二次开发、再分发、衍生数据集
学术研究、技术博客、教学课程
无需付费、无需申请、无需事先告知。
唯一的要求是保留数据来源标注(attribution):
本项目使用了 紫微斗数开源样本数据集 v3.0(518,400 条)
来源:https://github.com/Renhuai123/ziwei-doushu
作者:王多鱼AI
放在哪里都行:
网页 / 产品:About 页 / 关于我们 / 数据来源 / 页脚,写一行链接即可
AI 模型:模型卡(Model Card)或数据集卡(Dataset Card)的 "Training Data" 字段
学术论文:参考文献或致谢章节
二次发布的数据集:README 或 metadata 文件里注明上游来源
仅此一条,其余都自由。完整条款见 DATASET-LICENSE。希望这套数据能帮你做出好东西 —— 做出来记得来小红书 / 抖音 / 闲鱼 @王多鱼AI 打个招呼 👋
三、快速开始
克隆
git clone https://github.com/Renhuai123/ziwei-doushu.git
cd ziwei-doushu
安装依赖
npm install
配置环境变量(只看排盘可以跳过;AI 配置仅在你自己实现了 /api/* 接口时才用得上)
cp .env.example .env.local
启动开发服务器
npm run dev
本地验证:
npm run typecheck # TypeScript 全量类型检查
npm test # 排盘引擎回归(768 盘 × 紫微铁律、夏令时、立春边界、红鸾天喜、样本时辰一致性、时辰序号边界、日期合法性、同宫双四化)
每次 push 与 PR 都会在 GitHub Actions 上跑同一套(见 .github/workflows/ci.yml)。
注意:开源版不含后端 API 路由。排盘、命盘展示、合盘起盘都在浏览器里用本仓库的引擎完成,不需要任何 API Key。AI 解读(/api/interpret)和合盘 AI 分析(/api/heming)需要你自己实现接口;没实现之前,这两处会直接提示「开源版不含该接口」,配置 API Key 也不会变成可用(#30 就是这个原因)。
四、排盘引擎
排盘内核全部在 lib/ziwei/。
4.1 能做到什么(与常见排盘库的差异)
| 能力 | 说明 |
|------|------|
| 真太阳时校正 | 按出生地经度算时差 + 均时差,避免东西向差一个时辰 |
| 中国夏令时 | 1986–1991 年的夏令时区间自动判定(只判定、不自动扣除;钟表读数由用户确认后用 clock-adjust.ts 换成标准时间) |
| 闰月四种口径 | 闰月归前月 / 归后月 / 按日切分 / 按本月,可配置,不写死一派 |
| 晚子时换日 | 23:00–23:59 按次日排盘、00:00–00:59 按本日;填了出生地时按真太阳时判断(与时辰同一口径);换日策略可切换 |
| 星曜亮度 7 档 | 庙 / 旺 / 得 / 利 / 平 / 不 / 陷,另保留 3 档粗分类做显示降级 |
| 亮度流派可切换 | 不同流派(含主流排盘软件的不同版本)对辅星亮度判法不一致,做成开关而非写死 |
| 四化与飞星 | 生年四化、大限 / 流年四化、飞星自化 |
| 十二神煞 | 本命层按生年支起,流年层改按流年支起 |
| 格局判定 | 1100+ 行规则库(紫府同宫、日月并明、七杀朝斗等) |
4.2 文件怎么分
| 文件 | 说明 |
|------|------|
| algorithm.ts | 完整排盘流程:安命宫、定五行局、安十四主星、安辅星、排大限流年 |
| constants.ts | 天干地支、十四主星、辅星常量 |
| sihua.ts | 四化飞星系统(禄权科忌),含各天干四化对照表 |
| patterns.ts | 1100+ 行格局知识库:紫府同宫、日月并明、七杀朝斗等经典格局判定规则 |
| heming-knowledge.ts | 合盘方法论:倪师体系下双盘比对逻辑 |
| types.ts | TypeScript 类型定义 |
| cities.ts | 中国城市经纬度,用于真太阳时校正 |
| famous.ts | 历史名人命盘示例数据 |
| school-data.ts / school-tables.generated.ts / school-config.ts | 星曜亮度流派数据与对照表、闰月与晚子时口径配置 |
| shier-shen.ts | 十二神煞(本命按生年支起、流年层按流年支起) |
| true-solar-time.ts | 真太阳时校正(经度差 + 均时差) |
| dst-cn.ts | 中国 1986–1991 夏令时年份与区间 |
| clock-adjust.ts | 钟表读数按分钟平移成标准时间(跨日不改) |
| yunxian-context.ts | 运限上下文(含童限处理) |
| lunar-solar.ts | 农历 / 公历互转与闰月边界 clamp |
4.3 古籍原文(lib/classics/)
骨髓赋(gusuifu.ts)— 紫微斗数核心歌诀
紫微斗数全集(quanji.ts)— 清代古本
紫微斗数全书(quanshu.ts)— 陈希夷传本
4.4 SEO 知识图谱(lib/seo/)
14 主星 × 12 宫位的结构化知识数据,可用于内容生成或知识库构建。
五、倪师《天纪·紫微斗数》原话
倪海厦《天纪·紫微斗数》一图看全
倪海厦《天纪》紫微斗数部分的原话共 1848 条:正课 14 讲(第 2–15 讲上半)加 2 段补充,按讲分成 16 个文件,放在 docs/tianji-ziwei/。每条都带出处时间,点一下就跳回 B 站原视频的那一秒。
怎么读:先在上图里找到想看的主题,再点进对应那一讲,比如 5上(紫微在子)、13上(杀破狼、科权禄三会)。
从哪来:取自姊妹仓库 nihai-tianji-corpus,以语料库为准,会随语料库同步。
能不能商用:不能。这一章的内容单独采用 CC BY-NC-SA 4.0,详见九、协议。
六、界面是一份 Demo
界面代码在 app/ 与 components/。仓库里的界面是一套最小可运行示例,作用是把排盘引擎跑起来、把盘画出来,方便你在它基础上做自己的产品。线上商业版的界面不在开源范围内,两者差距很大:
| 页面 / 组件 | 本仓库(Demo) | 线上商业版 |
|------|------|------|
| 排盘页 app/chart/page.tsx | 75 行 | 1227 行 |
| 解读面板 InsightPanel | 467 行 | 5088 行 |
| 命盘方格 ChartBoard | 285 行 | 1334 行 |
| 宫位格 PalaceCell | 201 行 | 1192 行 |
| 合盘页 app/heming/page.tsx | 368 行 | 1937 行 |
Demo 能跑通的:出生信息表单、命盘方格与宫位详情、本命 / 大限 / 流年切换、古籍阅读器(全文搜索)、命理百科(14 主星 × 12 宫位)、亮暗主题、移动端适配。
Demo 里没有的:线上重做过的交互界面、AI 流式解读、合盘图谱、分享卡片,以及断语内容本身(db-analysis.ts 是占位实现)。也就是说,Demo 画得出盘,但给不出线上那套解读。
七、开源边界:什么不在里面
| | 内容 |
|---|---|
| ✅ 开源 | 排盘引擎(lib/ziwei/)、古籍公版原文(lib/classics/)、SEO 知识图谱(lib/seo/)、Demo 界面、51.8 万样本数据集、13 维解读数据集 v4.0 |
| ❌ 不开源 | 断语库(lib/ziwei/db-analysis.ts 是占位,线上是上万行的 13 主题断语)、AI 解读 prompt、后端 API(/api/interpret 等)、用户系统(登录 / 会员 / 支付)、服务端安全(签名、防刷、水印)、部署配置 |
如果你需要 AI 解读能力,可以参考 lib/ziwei/patterns.ts 和 heming-knowledge.ts 里的知识库,结合任意 LLM 自行构建 prompt。
八、维护节奏与贡献
这个仓库是排盘引擎 + 数据集的开放快照,不是一个全职维护的开源产品,说清楚免得大家猜:
引擎同步:随线上发版同步 lib/ziwei/ 的引擎层并打 tag;断语库、AI 解读、商业站前端不在同步范围内。
Issue:会看,但回复可能不及时;带复现步骤或具体盘例(年月日时 + 性别 + 哪一条不对)的问题优先处理。
PR:欢迎,尤其是回归测试、口径修正、文档。动到排盘口径的改动请附上依据(古籍原文或可核对的对照)。
九、协议
本仓库分四部分授权。前三部分是宽松协议,商用没有限制;倪师原话目录不许商用:
| 内容 | 协议 | 简单说 |
|------|------|--------|
| 代码(lib/、app/、components/) | MIT License | 拿去随便用,保留 LICENSE 文件即可 |
| 数据(Releases 中的 51.8 万样本数据集 v3.0、13 维解读数据集 v4.0) | CC BY 4.0 · 要求 attribution | 商用也行,注明数据来源即可 |
| 古籍原文(骨髓赋、紫微斗数全集 / 全书等) | Public Domain | 古书都是公有领域,不存在版权 |
| 倪师原话(docs/tianji-ziwei/) | CC BY-NC-SA 4.0 | 可以引用、转载,注明出处;不许商用,改编后用同样协议 |
一句话:代码和数据拿去用,商用也行,把来源链接带上就行;倪师原话只限非商业的学习研究(数据集解读里引用的倪师原话同样不在数据授权范围内)。
十、关于与联系
项目理念
见本页开头。想自己搭?代码都在这里,拿去用。嫌麻烦?来 ouranic.cn 直接用。
技术栈
框架:Next.js 16(App Router)
语言:TypeScript
样式:Tailwind CSS + CSS Variables 设计系统
排盘:基于 iztro + lunar-javascript
动画:Framer Motion
联系
线上平台:ouranic.cn(已完成 ICP 备案:京ICP备2026069066号-1)
提问题、提修复:见 CONTRIBUTING.md;使用交流请到 讨论区
💕 发财的小手点一下:小红书 / 抖音 / 闲鱼 / X 关注 王多鱼AI,第一时间看上线 + 解锁更多紫微干货~
TypeScript
17.2K
stars
4.2K
forks
What users love
Strict implementation of 49 rules across four pattern tables in Volume 1 of The Complete Book of Zi Wei Dou Shu, including six proofs of unsatisfiable star placements.
Zi Wei Dou Shu knowledge-base construction and chart-generation functionality.
Areas for improvement
A user questions whether the official website supports charting the Twelve Shen Sha (symbolic stars), indicating unclear availability.
What users love
Strict implementation of 49 rules across four pattern tables in Volume 1 of The Complete Book of Zi Wei Dou Shu, including six proofs of unsatisfiable star placements.
Zi Wei Dou Shu knowledge-base construction and chart-generation functionality.
Areas for improvement
A user questions whether the official website supports charting the Twelve Shen Sha (symbolic stars), indicating unclear availability.
10
D4Vinci/Scrapling
🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Python100.2K8.3K
10
D4Vinci/Scrapling
🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Python
100.2K
stars
8.3K
forks
What users love
Ability to send PlayWright an init script
Screenshot feature
Functionality to automatically detect pagination URLs
Areas for improvement
StealthyFetcher waits indefinitely for embedded Turnstile
UnicodeEncodeError in Selector Parser
Problem with CamoufoxConfig in Python 3.14
Error when using StealthyFetcher
DynamicFetcher Bug
What users love
Ability to send PlayWright an init script
Screenshot feature
Functionality to automatically detect pagination URLs
Areas for improvement
StealthyFetcher waits indefinitely for embedded Turnstile
UnicodeEncodeError in Selector Parser
Problem with CamoufoxConfig in Python 3.14
Error when using StealthyFetcher
DynamicFetcher Bug


































