{"id":20139057,"url":"https://github.com/threeletters/cli-gui","last_synced_at":"2025-03-02T23:16:28.012Z","repository":{"id":57200035,"uuid":"66228465","full_name":"ThreeLetters/CLI-GUI","owner":"ThreeLetters","description":"A way to have a graphical interface for your server through command line","archived":false,"fork":false,"pushed_at":"2017-06-15T18:39:11.000Z","size":88,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T10:11:19.895Z","etag":null,"topics":["cli-gui","nodejs","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cli-gui","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThreeLetters.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":"2016-08-22T00:55:25.000Z","updated_at":"2021-07-17T23:39:13.000Z","dependencies_parsed_at":"2022-09-16T15:00:54.290Z","dependency_job_id":null,"html_url":"https://github.com/ThreeLetters/CLI-GUI","commit_stats":null,"previous_names":["ajs-development/cli-gui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThreeLetters%2FCLI-GUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThreeLetters%2FCLI-GUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThreeLetters%2FCLI-GUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThreeLetters%2FCLI-GUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThreeLetters","download_url":"https://codeload.github.com/ThreeLetters/CLI-GUI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582555,"owners_count":19985846,"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-gui","nodejs","npm-package"],"created_at":"2024-11-13T21:43:49.368Z","updated_at":"2025-03-02T23:16:27.952Z","avatar_url":"https://github.com/ThreeLetters.png","language":"JavaScript","readme":"## CLIGUI2 - https://github.com/ThreeLetters/CLI-GUI2\n\n\n[![NPM](https://img.shields.io/badge/Module-Npm-blue.svg)](https://www.npmjs.com/package/cli-gui)\n[![Donate](https://img.shields.io/badge/Donate-Paypal-brightgreen.svg)](https://paypal.me/andrews54757)\n\n\n![screen shot 2016-09-03 at 12 53 02 pm](https://cloud.githubusercontent.com/assets/13282284/18226358/f9109dec-71d5-11e6-8203-09e54905e78a.png)\n\n# CLI-GUI\nA simple way to have a graphical interface through command line\n\n\n## Usage\n\u003enpm install cli-gui\n\n\n#### Using it in your code\n```\nvar CLIGUI = require('cli-gui')\nvar cligui = new CLIGUI()\n```\n\n### Features\n* File editor\n* list interface\n* checklist\n* prompts\n* popup boxes\n* Works for most operating systems\n\n### Example\n``node examples/example.js``\n\n##### File editor\n```\ncligui.editor('./file.js',function(returnedfile) {\n// your callback\n})\n```\n\n##### List\n```\nvar objects = [\n\"item0\",\n\"item1\",\n\"item2\",\n{option: \"item3\",description: \"You can even add descriptions!\"}\n]\nvar callbacks = [\nfunction() {}, // item0\nfunction() {}, // item1\nfunction() {}, // item2\nfunction() {}  // item3\n]\n/*\nNote that you can even have the callback in this format:\nvar callbacks = function(selected) {\nswitch (selected) {\n case 0:\n \n break;\n case 1:\n \n break;\n case 2\n \n break;\n case 3\n \n break;\n}\n}\n*/\n\ncligui.list(\"menu name\",objects,callbacks)\n```\n\n\nChecklist\n\n\n```\n\nvar objects = [\n\"item0\",\n\"item1\",\n\"item2\",\n{option: \"item3\",description: \"You can add descriptions!\",selected: true} // you can also have it selected by default\n]\nvar callbacks = [\nfunction() {}, // item0\nfunction() {}, // item1\nfunction() {}, // item2\nfunction() {}  // item3\n]\n\n/* \nThe callbacks could also be:\n\nvar callbacks = function(selected) { // selected would be a object (EG: [0,2,3] if 0,2 and 3 is selected)\nif (selected.indexOf(0) != -1) {} // 0\nif (selected.indexOf(1) != -1) {} // 1\nif (selected.indexOf(2) != -1) {} // 2\nif (selected.indexOf(3) != -1) {} // 3\n}\n*/\n\ncligui.checkList(\"checklist title\",options,callbacks)\n```\n\n\nPrompt\n\n\n```\ncligui.prompt(\"Prompt title\", \"prompt description\", function(typed) {\n// callback\n})\n```\n\n\nBasic Popup Box\n\n\n```\ncligui.createInfoBox(30,5,\"Contents of box\",0,0,function() { // createInfoBox(width,height,contents,x,y,callback)\n// callback\n})\n```\n\nCoordinate system\n\n\n```\n(0,0) -\u003e center\n(100,50) -\u003e top right\n(-100,-50) -\u003e bottom left\n\nX: -100 - 100\n\nY: -50 - 50\n\n```\n","funding_links":["https://paypal.me/andrews54757"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeletters%2Fcli-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreeletters%2Fcli-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeletters%2Fcli-gui/lists"}