{"id":20103822,"url":"https://github.com/ancientlore/demon","last_synced_at":"2025-09-17T15:51:01.219Z","repository":{"id":57578647,"uuid":"124178494","full_name":"ancientlore/demon","owner":"ancientlore","description":"A little thing to use for demos","archived":false,"fork":false,"pushed_at":"2025-03-29T18:32:17.000Z","size":1524,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-04T10:04:30.143Z","etag":null,"topics":["demo","golang","websocket"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ancientlore.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-07T04:21:44.000Z","updated_at":"2025-03-29T18:32:00.000Z","dependencies_parsed_at":"2024-04-19T13:44:30.516Z","dependency_job_id":"574e79c1-3877-4bb1-8fd1-962dcaadd7d8","html_url":"https://github.com/ancientlore/demon","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ancientlore/demon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fdemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fdemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fdemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fdemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ancientlore","download_url":"https://codeload.github.com/ancientlore/demon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ancientlore%2Fdemon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275622021,"owners_count":25498322,"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-09-17T02:00:09.119Z","response_time":84,"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":["demo","golang","websocket"],"created_at":"2024-11-13T17:38:35.277Z","updated_at":"2025-09-17T15:51:01.187Z","avatar_url":"https://github.com/ancientlore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# demon\n\n👿\n\nOr, demo-N. A utility to let you orchestrate steps of a demonstration.\n\n`demon` is a simple web server that presents several windows. Each window is either a _site_ (presented in an iframe) or a _process_ attached via websockets. The server is meant to be run locally - it's not designed to secure access to the attached processes.\n\nBy default `demon` will look for a demo config called `demo.json` in the current directory. When the demo is done, simply press return and it will attempt a clean exit.\n\n## Configuration\n\nEach demo is configured with a simple JSON file containing _sites_, _processes_, and _steps_.\n\n### Top-Level settings\n\nYou can give the demo a title using `title` and define which box holds the steps by setting `stepsPosition`.\n\n### Sites\n\nSites are specified using a map of a site name and data about the site. `title` is the title for the box, `url` specifies the URL of the site to load in the `iframe`, and `position` specifies where to place the box.\n\n\u003e Note: `url` may optionally be a single environment variable preceded with a `$`, like `\"url\": \"$MYURL\"`.\n\n### Processes\n\nProcesses are specified using a map of a process name and data about the process. `title` specifies the title for the box, and `position` specifies where to place the box.\n\n`command` is an array containing a command to launch and its arguments. `stdin`, `stdout`, and `stdout` are piped using websockets.\n\n`dir` specifies what directory to start the process in.\n\n`exitInput` allows you send a \"last command\" before terminating the process, for instance `exit`.\n\n\u003e Note: Any element of the `command` array may be a single environment variable preceded with a `$`. For example, `\"command\": [ \"kubectl\", \"exec\", \"-i\", \"$POD\", \"/bin/sh\"]`.\n\n### Steps\n\nSteps represent input commands that are sent to processes that were started. Steps are listed in a JSON array.\n\n`title` specifies the overall title to show on steps box, while `desc` lets you add (smaller) text with more details.\n\n`input` is optional and specifies what text to send to the process when the RUN button is pressed for the current step. `id` specifies which process gets the command. This is nice because you demo steps can easily switch between different processes.\n\n### Example\n\n    {\n        \"title\": \"httpbin demo\",\n        \"stepsPosition\": 1,\n        \"sites\": {\n            \"webnull\": {\n                \"title\": \"httpbin\",\n                \"url\": \"http://httpbin.org/\",\n                \"position\": 0\n            }\n        },\n        \"processes\": {\n            \"bash\": {\n                \"title\": \"bash\",\n                \"command\": [\"bash\"],\n                \"dir\": \"\",\n                \"position\": 2,\n                \"exitInput\": \"exit\"\n            }\n        },\n        \"steps\": [\n            {\n                \"title\": \"Demo of httpbin\",\n                \"desc\": \"This demo shows some things that you can do with httpbin.\",\n                \"id\": \"\",\n                \"input\": \"\"\n            },\n            {\n                \"title\": \"Get your IP address\",\n                \"desc\": \"Returns the origin IP address\",\n                \"id\": \"bash\",\n                \"input\": \"curl -s http://httpbin.org/ip\"\n            },\n            {\n                \"title\": \"Get a UUID4\",\n                \"desc\": \"Returns a new UUID.\",\n                \"id\": \"bash\",\n                \"input\": \"curl -s http://httpbin.org/uuid\"\n            },\n            {\n                \"title\": \"Get some XML\",\n                \"desc\": \"Returns some XML.\",\n                \"id\": \"bash\",\n                \"input\": \"curl -s http://httpbin.org/xml\"\n            },\n            {\n                \"title\": \"Summary\",\n                \"desc\": \"Try some commands of your own, based on the documentation above!\",\n                \"id\": \"\",\n                \"input\": \"\"\n            }\n        ]\n    }\n\n## Screen Shot\n\n![Screen Shot](media/demo_solved.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fancientlore%2Fdemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fancientlore%2Fdemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fancientlore%2Fdemon/lists"}