Registry / devops / mysql-ddl-scout

mysql-ddl-scout

JSON →
library1.0.1jsnpmunverified

A blazing fast, lightweight Node.js CLI tool for parsing MySQL DDL scripts and extracting structured metadata as clean JSON, without requiring a running MySQL instance. Version 1.0.1 is current. Designed for developers, automation scripts, and LLM agents (Claude Code, Cursor IDE) to inspect, validate, and understand complex database schemas offline. Features include table existence checking, column listing, granular field inspection, relational map engine (primary keys, indexes, foreign keys), and AST dump. Released under MIT license with active maintenance.

npm install mysql-ddl-scout
INSTALL
IMPORT
SIG · MYSQL-DDL-SCOUT
M
mysql-ddl-scout
devopsjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI interface
mysql-ddl-scout <folder_path> [options]
npx mysql-ddl-scout <folder_path> [options] (works but not the primary usage pattern)
The package is a CLI tool, not a library. Use via command line after global install or npx.
Agent skill
npx skills add marceloxp/mysql-ddl-scout
npm install @skills/mysql-ddl-scout
The skill is not a separate npm package; it's added via the skills CLI.
Programmatic usage (if any)
import { parse } from 'mysql-ddl-scout'
const scout = require('mysql-ddl-scout')
Not officially documented; package primarily CLI. No programmatic API guaranteed.

Check existence of MySQL DDL files for given table names in current directory.

mysql-ddl-scout . --exists customers customer_addresses missing_table
Debug
Known issues
gotchaThe CLI exits with code 0 even if some tables are missing when using --exists; errors only affect the specific table entry.
fix
Always check the `exists` field in each result object, not just exit code.
affects: >=1.0.0
gotchaWhen --fields fails for one table, the command exits with code 1, but results for other tables are still printed.
fix
Parse JSON output even when exit code is 1; handle partial results.
affects: >=1.0.0
breakingVersion 1.0.0 was initial release; no breaking changes between 1.0.0 and 1.0.1.
fix
N/A
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'node-sql-parser'
Missing peer dependency when using programmatic API without proper install
fix
npm install mysql-ddl-scout (includes node-sql-parser as dependency)
bash: mysql-ddl-scout: command not found
CLI not installed globally or not in PATH
fix
npm install -g mysql-ddl-scout
SyntaxError: Unexpected token < in JSON at position 0
Running CLI without --exists or --fields outputs non-JSON diagnostics
fix
Use `--exists` or `--fields` flags for JSON output
Error: ENOENT: no such file or directory, open '...'
DDL file path does not exist
fix
Verify folder path and DDL file names match table names exactly
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
node-sql-parserrequiredMySQL DDL parsing engine
Agent activity
2 hits · last 30 days
node
2
Resources
mysql-ddl-scout — npm install mysql-ddl-scout · libregistry