{"id":19000427,"url":"https://github.com/typesense/typesense-collection-schema-generator","last_synced_at":"2025-08-22T13:33:46.603Z","repository":{"id":221034613,"uuid":"753303793","full_name":"typesense/typesense-collection-schema-generator","owner":"typesense","description":"A CLI utility to generate a first-draft Typesense Collection schema given a JSON sample object","archived":false,"fork":false,"pushed_at":"2024-02-05T21:34:27.000Z","size":52,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T04:04:04.685Z","etag":null,"topics":["typesense"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/typesense.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-02-05T21:21:14.000Z","updated_at":"2024-06-29T10:43:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2f98312-a786-4f23-b162-fc0b3e8adf9f","html_url":"https://github.com/typesense/typesense-collection-schema-generator","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"8ff84b6feee075c09de429398f98884511aeb72d"},"previous_names":["typesense/typesense-collection-schema-generator"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-collection-schema-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-collection-schema-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-collection-schema-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesense%2Ftypesense-collection-schema-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typesense","download_url":"https://codeload.github.com/typesense/typesense-collection-schema-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249847555,"owners_count":21333992,"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":["typesense"],"created_at":"2024-11-08T18:07:11.065Z","updated_at":"2025-04-22T17:06:18.916Z","avatar_url":"https://github.com/typesense.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typesense Collection Schema Generator\n\nGiven a JSON object, this CLI utility gives you a **first-draft** Typesense Collection schema for the JSON object, that you can edit to suit your needs. \n\n## Usage:\n\n```bash\nnpx typesense-collection-schema-generator \u003cpath_to_input_json_document_file\u003e \u003cpath_to_output_typesense_collection_schema_json_file\u003e\n```\n\nAn input JSON file like this:\n\n```json\n{\n  \"id\": 133,\n  \"organization_name\": \"Acme Inc\",\n  \"country\": \"USA\",\n  \"full_name\": \"John Herrero\",\n  \"address_string\": \"123 ABC Street\",\n  \"address\": {\n    \"line1\": \"123 ABC Street\"\n  },\n  \"addresses\": [\n    {\"line1\": \"123 ABC Street\"},\n    {\"line1\": \"234 ABC Street\"}\n  ],\n  \"tags\": [\"TagA\", \"TagB\", \"TagC\"]\n}\n```\n\nWill generate an output schema like this:\n\n```json\n{\n  \"name\": \"your_collection_name\",\n  \"fields\": [\n    { \"name\": \"organization_name\", \"type\": \"string\", \"optional\": true },\n    { \"name\": \"country\", \"type\": \"string\", \"optional\": true },\n    { \"name\": \"full_name\", \"type\": \"string\", \"optional\": true },\n    { \"name\": \"address_string\", \"type\": \"string\", \"optional\": true },\n    { \"name\": \"address\", \"type\": \"object\", \"optional\": true },\n    { \"name\": \"addresses\", \"type\": \"object[]\", \"optional\": true },\n    { \"name\": \"tags\", \"type\": \"string[]\", \"optional\": true }\n  ]\n}\n```\n\n\u003e [!IMPORTANT]  \n\u003e This schema is not meant to be used as-is. You want to review the generated schema, add `facet: true` for any facet fields, remove any un-indexed fields, or consider using auto-schema detection. Consider using regex field names for repeated field definitions. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesense%2Ftypesense-collection-schema-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypesense%2Ftypesense-collection-schema-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesense%2Ftypesense-collection-schema-generator/lists"}