{"id":16271132,"url":"https://github.com/hans00/initial-cli","last_synced_at":"2026-02-26T02:36:02.271Z","repository":{"id":33605073,"uuid":"159920331","full_name":"hans00/initial-cli","owner":"hans00","description":"Initialize project command","archived":false,"fork":false,"pushed_at":"2023-04-29T23:37:19.000Z","size":3792,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T23:35:46.307Z","etag":null,"topics":["cli","initial-cli","initialize","template"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/initial-cli","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/hans00.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":"2018-12-01T07:30:10.000Z","updated_at":"2019-04-29T15:38:58.000Z","dependencies_parsed_at":"2024-10-24T01:18:30.341Z","dependency_job_id":"6e0e6cf9-94cf-46d9-8cd9-fe284fae5811","html_url":"https://github.com/hans00/initial-cli","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"194b43724c2fc953665cfe9fb4864f7690187288"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hans00%2Finitial-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hans00%2Finitial-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hans00%2Finitial-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hans00%2Finitial-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hans00","download_url":"https://codeload.github.com/hans00/initial-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730069,"owners_count":20986404,"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","initial-cli","initialize","template"],"created_at":"2024-10-10T18:12:35.023Z","updated_at":"2025-10-11T22:01:52.037Z","avatar_url":"https://github.com/hans00.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# initial-cli\n\nA project initializer.\n\n---\n\n## How to use\n\n### from GitHub\n\n```sh\ninitial [github/]\u003cowner\u003e/\u003cslug\u003e[#branch] \u003cproject name\u003e\n```\n\n### from GitLab\n\n```sh\ninitial gitlab/\u003cowner\u003e/\u003cslug\u003e[#branch] \u003cproject name\u003e\n```\n\n### from other git repo\n\n```sh\ninitial \u003cgit repo url\u003e[#branch] \u003cproject name\u003e\n// or pre-set short name\ninitial \u003cshort name\u003e/\u003cowner\u003e/\u003cslug\u003e[#branch] \u003cproject name\u003e\n```\n\n### alias git repo\n\n\u003e Edit the configure file before use this.\n\n```sh\ninitial \u003calias name\u003e \u003cproject name\u003e\n```\n\n### Configure file\n\n#### `$HOME`/.init/config.json\n\n```json\n{\n    \"short_name\": {\n        \"private-git\": \"https://example.com/{owner}/{slug}.git\"\n    },\n    \"alias\": {\n    \t\"example\": \"private-git/owner/template\"\n    }\n}\n```\n\n## How create template\n\n### Assets file\n\n\u003e The asset files will remove after initialized.\n\u003e You can put the option files in it.\n\u003e \n\u003e The directory name is `.init-assets`.\n\n### Initialize file\n\n\u003e File name: `.init.js`\n\u003e \n\u003e Inquire uses module who names `Inquirer.js`.\n\n```js\n// you can require: fs, path, glob, rimraf, and other core modules\nexports.questions = [\n    {} // your questions, see: Inquirer.js\n];\nexports.preprocess = function (answer, module) {\n    // the JS codes\n    // you can copy the file from assets\n    // module.rm =\u003e rimraf.sync\n    // module.copy =\u003e fs.copySync\n}\n```\n\n### Template files\n\n\u003e All `*.*` file except `.init.js` or under `.init-assets`\n\u003e \n\u003e All question answer and project_name will pass into the template processor.\n\nUsage\n\n```js\n// direct output variable using syntax as %var_name%\ntitle = \"%project_name%\"\n// boolean condition\n#if boolVal#\n#endif#\n#if boolVar eq true#\n#endif#\n// string condition\n#if strVar eq 'value'#\n#endif#\n#if strVar ne 'value'#\n#endif#\n// list condition\n#if listVar has 'value'#\n#endif#\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhans00%2Finitial-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhans00%2Finitial-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhans00%2Finitial-cli/lists"}