{"id":31923847,"url":"https://github.com/chainsafe/typescript-cli-generator","last_synced_at":"2025-10-13T23:58:16.182Z","repository":{"id":54131240,"uuid":"343022987","full_name":"ChainSafe/TypeScript-Cli-Generator","owner":"ChainSafe","description":"A TypeScript CLI Template","archived":false,"fork":false,"pushed_at":"2021-03-08T18:49:18.000Z","size":360,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T07:09:29.495Z","etag":null,"topics":[],"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/ChainSafe.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}},"created_at":"2021-02-28T04:49:12.000Z","updated_at":"2021-11-20T20:23:50.000Z","dependencies_parsed_at":"2022-08-13T07:10:29.498Z","dependency_job_id":null,"html_url":"https://github.com/ChainSafe/TypeScript-Cli-Generator","commit_stats":null,"previous_names":["chainsafe/typescript-cli-template"],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/ChainSafe/TypeScript-Cli-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2FTypeScript-Cli-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2FTypeScript-Cli-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2FTypeScript-Cli-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2FTypeScript-Cli-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChainSafe","download_url":"https://codeload.github.com/ChainSafe/TypeScript-Cli-Generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2FTypeScript-Cli-Generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017168,"owners_count":26086019,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-13T23:58:11.047Z","updated_at":"2025-10-13T23:58:16.176Z","avatar_url":"https://github.com/ChainSafe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeScript CLI Template Generator\n\nThe template that is used was a port of the [Lodestar CLI](https://github.com/ChainSafe/lodestar/), and thus heavily inspired by the design patters of Lodestar.\n\n### Available Commands\n\n```bash\nCommands:\n  generate  Generates the CLI from a template.\n  config    Creates an empty configuration file.\n\nOptions:\n  -h, --help     Show help\n  -v, --version  Show version number\n```\n\n### Using the generator\nThe generator requires a configuration file, `config.example.json` is provided as guidance. It can be run as followed:\n```bash\nnpx @chainsafe/ts-cli generate --config ./\u003clocal_file\u003e -o ./my-cli\n```\n\n#### Configuration File\nThe configuration file follows the following interface pattern:\n```TypeScript\ninterface Config {\n    name: string;               // Name of the CLI\n    globalOptions: IOption[];   // Options available at the global scope\n    commands: ICommand[];       // List of commands\n}\n\ninterface IOption {             \n    name: string;               // Name of the option, eg: --\u003cname\u003e\n    description: string;        // Provides a description when --help is used\n    type: string;               // Valid TypeScript type in strings, eg: number\n    default: string;            // The default value\n}\n\ninterface ICommand {\n    name: string;               // Name of the command\n    description: string;        // Provides a description when --help is used\n    options: IOption[];         // Options available at the command level\n    subCommands: ICommand[];    // Optional sub-commands\n}\n```\n\n#### Modifications\nAlthough there is a lot that can be changed, the bulk of the setup has been done for you. The main things that need updating can be searched for by looking up `// TODO: change this!`. After that, the world is your oyster.\n\n### Roadmap\n- [x] Cli generator\n- [ ] ?","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Ftypescript-cli-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainsafe%2Ftypescript-cli-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsafe%2Ftypescript-cli-generator/lists"}