{"id":14070460,"url":"https://github.com/klarna-incubator/postgres-to-docs","last_synced_at":"2025-04-11T19:40:45.211Z","repository":{"id":46555446,"uuid":"346711831","full_name":"klarna-incubator/postgres-to-docs","owner":"klarna-incubator","description":"The smoooth way to document your postgres database","archived":false,"fork":false,"pushed_at":"2021-10-20T13:13:05.000Z","size":160,"stargazers_count":6,"open_issues_count":3,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-25T15:34:04.794Z","etag":null,"topics":["hacktoberfest","markdown","nodejs","postgres","postgresql","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klarna-incubator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null}},"created_at":"2021-03-11T13:31:02.000Z","updated_at":"2025-01-05T17:34:49.000Z","dependencies_parsed_at":"2022-08-31T12:12:10.827Z","dependency_job_id":null,"html_url":"https://github.com/klarna-incubator/postgres-to-docs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klarna-incubator%2Fpostgres-to-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klarna-incubator%2Fpostgres-to-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klarna-incubator%2Fpostgres-to-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klarna-incubator%2Fpostgres-to-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klarna-incubator","download_url":"https://codeload.github.com/klarna-incubator/postgres-to-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199079,"owners_count":21063641,"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":["hacktoberfest","markdown","nodejs","postgres","postgresql","typescript"],"created_at":"2024-08-13T07:07:46.817Z","updated_at":"2025-04-11T19:40:45.180Z","avatar_url":"https://github.com/klarna-incubator.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# postgres-to-docs\n[![Build Status][ci-image]][ci-url]\n[![License][license-image]][license-url]\n[![Developed at Klarna][klarna-image]][klarna-url]\n\nMake your database documentation smoooth by generating markdown for your schema.\n\n## Usage\n\n1.  Install through npm\n```\nnpm install @klarna/postgres-to-docs\n```\n\n2. Define a `json` config file\n```\n{\n    \"host\": \"localhost\",\n    \"port\": 5432,\n    \"user\": \"user\",\n    \"password\": \"password\",\n    \"database\": \"database\"\n}\n```\n3. Run the tool\n```\npostgres-to-docs --config=config.json --output=schema.md\n```\nWhere `--config` is the path to your config file and `--output`is the path to the output markdown file\n\n\n## Problem\nYou need to get a quick and easy overview of your database schema but don't want to...\n* Open the source code and find the model definitions\n* Start your database and service, install dependencies, have a proper configuration, and open an external tool like TablePlus or DBeaver\n* Read through your migrations directory to find the latest version of your schema\n* Look through external documentation that might be out of date\n\n\n## Introducing postgres-to-docs!\nA Node CLI that renders your schemas as markdown and keeps it up to date! Generates documentation for\n- [X] Tables - PKs, FKs, Nullable and Default values\n- [X] Views\n- [X] User defined types like composites and enums\n\n## Future work\n- [ ] Additional export formats like entity relationship-diagrams\n- [ ] Materialized views\n- [ ] Support for watch-mode to rerun the tool on file change\n\n\n## Development\nClone the repo, then:\n\n```\nnpm install\nnpm run start:dev\n```\n\n## How to contribute\n\nSee our guide on [contributing](.github/CONTRIBUTING.md).\n\n## Release History\n\nSee our [changelog](CHANGELOG.md).\n\n## License\n\nCopyright © 2021 Klarna Bank AB\n\nFor license details, see the [LICENSE](LICENSE) file in the root of this project.\n\n\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\n[ci-image]: https://img.shields.io/badge/build-passing-brightgreen?style=flat-square\n[ci-url]: https://github.com/klarna-incubator/TODO\n[license-image]: https://img.shields.io/badge/license-Apache%202-blue?style=flat-square\n[license-url]: http://www.apache.org/licenses/LICENSE-2.0\n[klarna-image]: https://img.shields.io/badge/%20-Developed%20at%20Klarna-black?labelColor=ffb3c7\u0026style=flat-square\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAALQAAAAAQAAAtAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABCgAwAEAAAAAQAAAA4AAAAA0LMKiwAAAAlwSFlzAABuugAAbroB1t6xFwAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAVBJREFUKBVtkz0vREEUhsdXgo5qJXohkUgQ0fgFNFpR2V5ClP6CQu9PiB6lEL1I7B9A4/treZ47c252s97k2ffMmZkz5869m1JKL/AFbzAHaiRbmsIf4BdaMAZqMFsOXNxXkroKbxCPV5l8yHOJLVipn9/vEreLa7FguSN3S2ynA/ATeQuI8tTY6OOY34DQaQnq9mPCDtxoBwuRxPfAvPMWnARlB12KAi6eLTPruOOP4gcl33O6+Sjgc83DJkRH+h2MgorLzaPy68W48BG2S+xYnmAa1L+nOxEduMH3fgjGFvZeVkANZau68B6CrgJxWosFFpF7iG+h5wKZqwt42qIJtARu/ix+gqsosEq8D35o6R3c7OL4lAnTDljEe9B3Qa2BYzmHemDCt6Diwo6JY7E+A82OnN9HuoBruAQvUQ1nSxP4GVzBDRyBfygf6RW2/gD3NmEv+K/DZgAAAABJRU5ErkJggg==\n[klarna-url]: https://github.com/klarna-incubator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklarna-incubator%2Fpostgres-to-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklarna-incubator%2Fpostgres-to-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklarna-incubator%2Fpostgres-to-docs/lists"}