{"id":15314257,"url":"https://github.com/barelyhuman/knex-types","last_synced_at":"2026-02-16T06:31:18.561Z","repository":{"id":230052342,"uuid":"777904996","full_name":"barelyhuman/knex-types","owner":"barelyhuman","description":"Auto Generate Types for your database schema from your knex instance. ","archived":false,"fork":false,"pushed_at":"2024-06-25T06:36:07.000Z","size":312,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-07T19:56:32.271Z","etag":null,"topics":["autogenerate","database","generate","knex","models","types","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barelyhuman.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"liberapay":"reaper","ko_fi":"barelyreaper","github":"barelyhuman","custom":"https://barelyreaper.gumroad.com/coffee"}},"created_at":"2024-03-26T18:10:10.000Z","updated_at":"2024-06-25T06:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"35b292de-1d24-47ef-975f-b3d25ad58fb3","html_url":"https://github.com/barelyhuman/knex-types","commit_stats":null,"previous_names":["barelyhuman/knex-types"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/barelyhuman/knex-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fknex-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fknex-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fknex-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fknex-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barelyhuman","download_url":"https://codeload.github.com/barelyhuman/knex-types/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fknex-types/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29501914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["autogenerate","database","generate","knex","models","types","typescript"],"created_at":"2024-10-01T08:44:53.033Z","updated_at":"2026-02-16T06:31:18.542Z","avatar_url":"https://github.com/barelyhuman.png","language":"JavaScript","funding_links":["https://liberapay.com/reaper","https://ko-fi.com/barelyreaper","https://github.com/sponsors/barelyhuman","https://barelyreaper.gumroad.com/coffee"],"categories":[],"sub_categories":[],"readme":"# @barelyhuman/knex-types\n\n\u003e Generate Model types from Knex\n\n- [@barelyhuman/knex-types](#barelyhumanknex-types)\n  - [Schema Support](#schema-support)\n  - [Usage](#usage)\n  - [License](#license)\n\n## Schema Support\n\nWhile the below checklist mentions **Partial**, most of what the library can generate should be usable. It says partial because things like `enum` and other constraints that can be used to generate better types and models for knex are still not done.\n\n- [x] Sqlite\n- [ ] Postgres (Partial)\n- [ ] MSSQL (Partial)\n- [ ] Oracle (Partial)\n\n## Usage\n\n```js\n// in CJS\nconst { generateTypes } = require(\"@barelyhuman/knex-types\");\nconst knexInstance = knex(config);\n\ngenerateTypes(knexInstance, {\n  output: \"./types.d.ts\",\n}).then((d) =\u003e {\n  // Done\n});\n```\n\n```js\n// in ESM\nimport { generateTypes } from \"@barelyhuman/knex-types\";\nconst knexInstance = knex(config);\nawait generateTypes(knexInstance, {\n  output: \"./types.d.ts\",\n});\n```\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fknex-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarelyhuman%2Fknex-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fknex-types/lists"}