{"id":20800360,"url":"https://github.com/maxtermax/hermes-io-cli","last_synced_at":"2026-04-25T19:31:33.769Z","repository":{"id":203436646,"uuid":"703786877","full_name":"Maxtermax/hermes-io-cli","owner":"Maxtermax","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-30T12:10:38.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T02:41:31.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Maxtermax.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":"2023-10-11T23:22:38.000Z","updated_at":"2023-10-11T23:24:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd6eeda1-c491-47e5-b5e5-bc91a52035ea","html_url":"https://github.com/Maxtermax/hermes-io-cli","commit_stats":null,"previous_names":["maxtermax/hermes-io-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maxtermax/hermes-io-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxtermax%2Fhermes-io-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxtermax%2Fhermes-io-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxtermax%2Fhermes-io-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxtermax%2Fhermes-io-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maxtermax","download_url":"https://codeload.github.com/Maxtermax/hermes-io-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxtermax%2Fhermes-io-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32274982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-17T18:13:35.440Z","updated_at":"2026-04-25T19:31:33.754Z","avatar_url":"https://github.com/Maxtermax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nThis CLI is the official scaffolding generator for [hermes-io](https://www.npmjs.com/package/hermes-io#get-started), its generates a simple folder structure that guaranty separation of concerns encompassing pivotal elements such as: [contexts](https://github.com/Maxtermax/hermes-io#context), [hooks](https://github.com/Maxtermax/hermes-io#useobserver-hook) and [observers](https://github.com/Maxtermax/hermes-io#observer).\n\n# Summary\n- [Installation](#installation)\n- [Context](#context)\n- [Observer](#observer)\n- [useObserver](#use-observer)\n\n## Installation\n```\nnpm install hermes-io-cli -g\n```\n\n## Usage\n\nThis CLI has a set of commands for generate folders and files for hermes-io entities.\n\n###  Context\nBy passing the **context** argument a newly created folder named as '**contexts**' is automatically generated. Within this folder, a brand-new [Context](https://github.com/Maxtermax/hermes-io#context) file is generated, adopting the provided value as its designated name.\n```\nhermes-io-cli --context=\"MyContext\"\n```\nresult:\n```\n/contexts/MyContext.js\n```\n```javascript\nimport { Context } from 'hermes-io';\nexport const MyContext = new Context('MyContext'); \n```\n\n###  Observer\nBy passing the **observer** argument a newly created folder named as '**observers**' is automatically generated. Within this folder, a brand-new  [Observer](https://github.com/Maxtermax/hermes-io#observer) file is generated, adopting the provided value as its designated name.\n```\nhermes-io-cli --observer=\"MyObserver\"\n```\nresult:\n```\n/observers/MyObserver.js\n```\n```javascript\nimport { Observer } from 'hermes-io';\nexport const MyObserver = new Observer('MyObserver'); \n```\nNote: To simplify things you can generate one or more entities by passing the correspondings arguments in a single command, for example: \n```\nhermes-io-cli --observer=\"MyObserver\" --context=\"MyContext\"\n```\nresult:\n```\n/contexts/MyContext.js\n```\n```\n/observers/MyObserver.js\n```\n\n###  Use observer\n\nBy passing the **hook** argument a newly created folder named as '**hooks**' is automatically generated. Within this folder, a brand-new  [observer hook](https://github.com/Maxtermax/hermes-io#useobserver-hook) file is generated, adopting the provided value as its designated name:\n```\nhermes-io-cli --hook=\"useCustom\"\n```\nresult:\n```\n/hooks/useCustom.js\n```\n```javascript\nimport { useObserver, Context, Observer } from 'hermes-io';\n\nexport const CustomContext = new Context('CustomContext'); \nexport const CustomObserver = new Context('CustomObserver'); \n\nexport const UseCustom = () =\u003e {\n  const handleUseCustomNotification = (payload) =\u003e {\n    /* handle notification */ \n  };\n  useObserver({\n    contexts: [CustomContext],\n    observer: CustomObserver,\n    listener: handleUseCustomNotification,\n  });\n};\n```\nNote: Is posible to link existing observers or contexts to a newly generated **useObserver** if the name of any match with the name of the custom hook, for example:\n```\nhermes-io-cli --hook=\"useCustom\" --context=\"Custom\" --observer=\"Custom\"\n```\nresult:\n```\n/hooks/useCustom.js\n```\n/observers/Custom.js\n```\n/contexts/Custom.js\n```\n\n```javascript\nimport { useObserver } from 'hermes-io';\nimport { Custom as ObserverCustom } from \"../observers/Custom\";\nimport { Custom as ContextCustom } from \"../contexts/Custom\";\n\nexport const UseCustom = () =\u003e {\n  const handleUseCustomNotification = (event) =\u003e {\n    /* handle notification */\n    console.log(event);\n  };\n  useObserver({\n    contexts: [ContextCustom],\n    observer: ObserverCustom,\n    listener: handleUseCustomNotification,\n  });\n}\n```\n\n###  Root folder\nBy default the folders are generated using the current path as a base (typically at the root of the project), this can be changed by using the root argument:\n```\nhermes-io-cli --root=\"./output\" --context=\"MyContext\" --observer=\"MyObserver\"\n```\nresult:\n```\n/output/contexts/MyContext.js\n```\n```\n/output/observers/MyObserver.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxtermax%2Fhermes-io-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxtermax%2Fhermes-io-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxtermax%2Fhermes-io-cli/lists"}