@rhfan2019/smart-kit-cli
v0.6.0
Published
Development tool for smart-kit: generates CSDL from a PostgreSQL schema and checks hand-written annotation files.
Maintainers
Readme
@rhfan2019/smart-kit-cli
Development tool for smart-kit. The command smart-kit:
smart-kit generate— reads a PostgreSQL schema (tables, keys, foreign keys, comments) and writes the OData CSDL and the storage mapping for@rhfan2019/smart-kit-server, then checks that your hand-written annotation file still matches;smart-kit check --strict— the same check without a database (for CI);smart-kit agents— writes an index of the smart-kit docs shipped innode_modulesintoAGENTS.md(and@AGENTS.mdintoCLAUDE.md) so that coding agents such as Codex and Claude Code read them.
npm install -D @rhfan2019/smart-kit-cli
npx smart-kit generate --config smart-kit.config.json{
"connection": "postgresql://reader@localhost:5432/shop",
"schema": "shop",
"namespace": "Shop",
"output": { "csdl": "generated/shop.csdl.xml", "storage": "generated/shop.storage.json" },
"annotations": ["annotations/shop.annotations.xml"]
}Views have no foreign keys: declare their navigations in navigations, e.g.
"user_roles": { "from": "user_list", "to": "user_role_list", "on": { "id": "user_id" }, "toMany": "_Roles" }.
Naming rules and all options: docs/README.md in the package. Node ≥ 24. MIT License.
