{"library":"stricture","title":"Stricture MicroDDL Schema Compiler and Code Generator","type":"library","description":"Stricture 4.0.2 is a multi-target data definition language (MicroDDL) compiler that transforms a Markdown-inspired, line-based schema definition into MySQL scripts, Meadow schema files, relationship diagrams (Graphviz), data dictionaries (Markdown, LaTeX, CSV), and test fixtures. Unlike general-purpose schema tools, Stricture is purpose-built for the Meadow application framework and provides first-class support for audit columns, authorization definitions, and PICT UI definitions. The project follows a service-oriented architecture on the Pict/Fable 3.x stack, with both a Commander-based CLI and a programmatic API. Releases are irregular but stable; v3 introduced a major CLI syntax change (migrating from yargs to Commander subcommands).","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install stricture"],"cli":{"name":"stricture","version":null}},"imports":["import stricture from 'stricture';","import { StrictureCompiler } from 'stricture';","import { MySQLGenerator } from 'stricture';"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/stevenvelozo/stricture","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/stricture","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import stricture from 'stricture';\nimport { MySQLGenerator } from 'stricture';\n\nconst sources = [\n  {\n    'Name': 'Users',\n    'Columns': [\n      { 'Name': 'UserId', 'Type': 'int', 'PrimaryKey': true, 'Identity': true },\n      { 'Name': 'Username', 'Type': 'varchar(255)', 'Nullable': false },\n      { 'Name': 'Email', 'Type': 'varchar(255)', 'Nullable': false },\n      { 'Name': 'CreateDate', 'Type': 'datetime', 'Default': 'now()' }\n    ]\n  },\n  {\n    'Name': 'Posts',\n    'Columns': [\n      { 'Name': 'PostId', 'Type': 'int', 'PrimaryKey': true, 'Identity': true },\n      { 'Name': 'UserId', 'Type': 'int', 'ForeignKey': 'Users.UserId' },\n      { 'Name': 'Title', 'Type': 'varchar(255)', 'Nullable': false },\n      { 'Name': 'Body', 'Type': 'text', 'Nullable': false }\n    ]\n  }\n];\n\nconst model = { 'Tables': sources };\n\nconst compiler = new stricture.StrictureCompiler();\nconst compiled = compiler.compile(model);\n\nconst mysqlGen = new MySQLGenerator();\nconst sql = mysqlGen.generate(compiled);\n\nconsole.log(sql);","lang":"typescript","description":"Programmatically compile a JSON model and generate MySQL DDL using Stricture's ESM API.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}