{"id":15001276,"url":"https://github.com/tobilg/duckerd","last_synced_at":"2025-04-06T13:08:51.337Z","repository":{"id":256948519,"uuid":"856821318","full_name":"tobilg/duckerd","owner":"tobilg","description":"CLI to create an ER Diagram from DuckDB database files","archived":false,"fork":false,"pushed_at":"2025-03-12T05:52:20.000Z","size":209,"stargazers_count":117,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T12:06:37.906Z","etag":null,"topics":["cli","database-diagram","duckdb","erd","erdiagram"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobilg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T09:14:20.000Z","updated_at":"2025-03-29T23:44:27.000Z","dependencies_parsed_at":"2024-09-14T03:08:41.506Z","dependency_job_id":"28c32f48-6f6f-4a6a-b654-a6b34e398535","html_url":"https://github.com/tobilg/duckerd","commit_stats":null,"previous_names":["tobilg/duckerd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fduckerd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fduckerd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fduckerd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fduckerd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobilg","download_url":"https://codeload.github.com/tobilg/duckerd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","database-diagram","duckdb","erd","erdiagram"],"created_at":"2024-09-24T18:01:46.558Z","updated_at":"2025-04-06T13:08:51.310Z","avatar_url":"https://github.com/tobilg.png","language":"TypeScript","readme":"# DuckERD CLI\n\nA CLI tool for generating ERD diagrams from DuckDB databases.\n\n## Prerequisites\n\n- Node.js (v18.19.0 or later)\n\n## Installation\n\nTo install the CLI tool, run:\n\n```\nnpm install -g duckerd\n```\n\n## Usage\n\n```\nduckerd [options]\n```\n\nGenerate an ERD diagram of the database schemas.\n\n#### Options:\n\n- `-d, --database \u003cpath\u003e`: Path to the database file\n- `-t, --theme [theme]`: Theme of the chart (choices: `default`, `forest`, `dark`, `neutral`, default: `default`)\n- `-o, --output \u003cpath\u003e`: Path to the output file\n- `-w, --width [width]`: Width of the page (default: `1024`)\n- `-H, --height [height]`: Height of the page (default: `768`)\n- `-f, --outputFormat [format]`: Output format for the generated image (choices: `svg`, `png`, `pdf`, default: `png`)\n\n#### Example:\n\n```bash\nduckerd -d ./mydb.duckdb -o ./erd.png -f png -t neutral -w 1600\n```\n\n**It's possible that you need to re-run the command after the first execution, because the DuckERD CLI automatically installs the `@mermaid-js/mermaid-cli` package globally when it's missing on your system.**\n\n## Usage example\n\n### Download the example database\nFor this example we use the [AWS IAM database](https://raw.githubusercontent.com/tobilg/aws-iam-data/main/data/db/iam.duckdb) from the [AWS IAM Data](https://github.com/tobilg/aws-iam-data) project.\n\n```bash\ncurl -LO https://raw.githubusercontent.com/tobilg/aws-iam-data/main/data/db/iam.duckdb\n```\n\n### Generate the ERD\nThen, we can generate the ERD as PNG with the `neutral` theme and otherwise default settings:\n\n```bash\nduckerd -d ./iam.duckdb -f png -t neutral\n```\n\n### Result\n\n![ERD of the AWS IAM DuckDB database](docs/iam_erd.png)\n","funding_links":[],"categories":["Resources","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fduckerd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobilg%2Fduckerd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fduckerd/lists"}