{"id":27125581,"url":"https://github.com/iaseth/tsj-cli","last_synced_at":"2026-05-07T03:37:43.713Z","repository":{"id":286460869,"uuid":"961470404","full_name":"iaseth/tsj-cli","owner":"iaseth","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-06T16:24:02.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T16:36:13.455Z","etag":null,"topics":["cli","interface","json","node","types","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tsj-cli","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/iaseth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-04-06T15:37:27.000Z","updated_at":"2025-04-06T16:24:05.000Z","dependencies_parsed_at":"2025-04-06T16:47:04.597Z","dependency_job_id":null,"html_url":"https://github.com/iaseth/tsj-cli","commit_stats":null,"previous_names":["iaseth/tsj-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaseth%2Ftsj-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaseth%2Ftsj-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaseth%2Ftsj-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaseth%2Ftsj-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iaseth","download_url":"https://codeload.github.com/iaseth/tsj-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977378,"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","interface","json","node","types","typescript"],"created_at":"2025-04-07T15:20:22.705Z","updated_at":"2026-05-07T03:37:43.672Z","avatar_url":"https://github.com/iaseth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# tsj-cli\n\n**tsj-cli** is a lightweight CLI tool that generates TypeScript interfaces or type aliases from a JSON file.\n\n📦 NPM: [`tsj-cli`](https://www.npmjs.com/package/tsj-cli)  \n💻 GitHub: [iaseth/tsj-cli](https://github.com/iaseth/tsj-cli)\n\n## ✨ Features\n\n- Generates TypeScript `interface` or `type` from JSON\n- Supports custom indentation: 2 spaces (default), 4 spaces, or tabs\n- Simple command-line usage\n- Minimal and dependency-free output\n\n## 🚀 Installation\n\n```bash\nnpm i -g tsj-cli@latest\n```\n\n## 🛠 Usage\n\n```bash\ntsj \u003cpaths/to/file.json\u003e [--type | --interface] [--tabs | --spaces]\n```\n\n### Examples\n\n```bash\ntsj user.json                     # default: interface, 2 spaces\ntsj user.json --type             # generates a type alias\ntsj user.json --spaces           # uses 4 spaces for indentation\ntsj user.json --tabs             # uses tabs instead\ntsj user.json --type --tabs      # type alias with tab indentation\n```\n\n### Input (`user.json`)\n\n```json\n{\n  \"id\": 1,\n  \"name\": \"Alice\",\n  \"isAdmin\": false,\n  \"tags\": [\"dev\", \"ts\"],\n  \"profile\": {\n    \"age\": 30,\n    \"location\": \"Earth\"\n  }\n}\n```\n\n### Output (`interface`)\n\n```ts\ninterface User {\n  id: number;\n  name: string;\n  isAdmin: boolean;\n  tags: string[];\n  profile: {\n    age: number;\n    location: string;\n  };\n}\n```\n\n## 📁 Project Structure\n\n```bash\ntsj-cli/\n├── src/             # Source code (written in TypeScript)\n├── dist/            # Transpiled JavaScript output\n├── package.json\n├── tsconfig.json\n├── .gitignore\n├── .npmignore\n└── README.md\n```\n\n## 🧪 Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Test locally\nts-node src/index.ts data.json --type --tabs\n\n# Link globally for local use\nnpm link\ntsj data.json --interface\n```\n\n## 📝 License\n\nMIT © [iaseth](https://github.com/iaseth)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaseth%2Ftsj-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiaseth%2Ftsj-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaseth%2Ftsj-cli/lists"}