{"id":19176510,"url":"https://github.com/dergoogler/cmdmodule","last_synced_at":"2026-06-17T08:31:28.557Z","repository":{"id":65559850,"uuid":"519510844","full_name":"DerGoogler/CmdModule","owner":"DerGoogler","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-18T20:45:55.000Z","size":179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-04T02:25:49.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/DerGoogler.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}},"created_at":"2022-07-30T12:29:01.000Z","updated_at":"2022-07-30T12:29:43.000Z","dependencies_parsed_at":"2023-01-29T14:55:10.041Z","dependency_job_id":null,"html_url":"https://github.com/DerGoogler/CmdModule","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerGoogler%2FCmdModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerGoogler%2FCmdModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerGoogler%2FCmdModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerGoogler%2FCmdModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DerGoogler","download_url":"https://codeload.github.com/DerGoogler/CmdModule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254288,"owners_count":19772392,"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":[],"created_at":"2024-11-09T10:28:49.624Z","updated_at":"2026-06-17T08:31:28.519Z","avatar_url":"https://github.com/DerGoogler.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CmdModule\n\nTODO: Add description\n\n\u003e This library is in development, everything can CHANGE!\n\n## Quickstart\n\n```ts\nimport CmdModule, { css } from \"cmdmodule\";\n\nconst shell = new CmdModule({\n  prompt: css.array(\"\", [css.fg.green`CLI`, \"$ \"]),\n});\n\nshell.on(\"echo\", (self, args) =\u003e {\n  if (args.includes(\"--name\")) {\n    return self.print(self.name);\n  }\n  return self.print(args[0]);\n});\n\nshell.on(\"arg\", (self, args) =\u003e {\n  self.print(args.join(\",\"));\n});\n\nshell.on(\n  \"run\",\n  (self, args) =\u003e {\n    shell.spawn(\"npm\", [\"run\", args[0]], {\n      workingDirectory: \"./\",\n    });\n  },\n  {\n    disableReprompt: true,\n  }\n);\n\nshell.default(self =\u003e {\n  self.print(css.array(\" \", [css.fg.red`${self.name}`, css.fg.yellow`command not found`]));\n});\n\n// Build the shell\nshell.run();\n```\n\n\u003e Run it by `npx ts-node cli.ts`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdergoogler%2Fcmdmodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdergoogler%2Fcmdmodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdergoogler%2Fcmdmodule/lists"}