{"id":21193571,"url":"https://github.com/moqsien/goktrl","last_synced_at":"2026-02-15T14:32:32.812Z","repository":{"id":60030957,"uuid":"538553116","full_name":"moqsien/goktrl","owner":"moqsien","description":"A powerful shell for process management. |  goktrl 是一个用于本地进程管理的交互式shell。","archived":false,"fork":false,"pushed_at":"2023-11-28T13:45:06.000Z","size":6390,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-18T02:58:05.560Z","etag":null,"topics":["go","golang","info","interactive","management","process","shell","table","terminal"],"latest_commit_sha":null,"homepage":"","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/moqsien.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":"2022-09-19T14:51:23.000Z","updated_at":"2023-07-23T08:51:10.000Z","dependencies_parsed_at":"2023-01-20T17:46:44.714Z","dependency_job_id":null,"html_url":"https://github.com/moqsien/goktrl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqsien%2Fgoktrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqsien%2Fgoktrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqsien%2Fgoktrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqsien%2Fgoktrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moqsien","download_url":"https://codeload.github.com/moqsien/goktrl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225615164,"owners_count":17496946,"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":["go","golang","info","interactive","management","process","shell","table","terminal"],"created_at":"2024-11-20T19:14:47.891Z","updated_at":"2026-02-15T14:32:27.781Z","avatar_url":"https://github.com/moqsien.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Introduction to [goktrl](https://github.com/moqsien/goktrl) \n\n------------------\n[Zh_CN](https://github.com/moqsien/goktrl/blob/main/docs/ReadMeZh.md)\n\ngoktrl is a powerful interactive shell designed to probe into your multi-processing go projects by using unix domain sockets.\n\n### Characteristics\n------------------\n- interactive shell\n- nice hints for args and options\n- use struct tags for configuration of options\n- automatically parse and verify args and options\n- automatically render table for terminal if enabled\n- automatically handle and print data if enabled(including table data)\n- connect to your process using unix domain sockets\n- dispatching requests easily\n- very intuitive and flexible\n\n### Usage\n------------------\n```shell\ngo get -u \"github.com/moqsien/goktrl@v1.3.6\"\n```\n- [More examples](https://github.com/moqsien/goktrl/tree/main/examples/ktrl)\n- A simple One:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/moqsien/goktrl\"\n)\n\n/*\n  A very simple example by implementing goktrl.\n  Even a hook for the shell is not required.\n*/\n\nfunc Handler(c *goktrl.Context) {\n\tfmt.Printf(\"$$ server: args = %v\\n\", c.Args) // args are automatically parsed and stored in c.Args\n\tResult := map[string]string{\n\t\t\"hello\": \"info\",\n\t}\n\tc.Send(Result)\n}\n\nfunc ShowInfo() *goktrl.Ktrl {\n\tkt := goktrl.NewKtrl()\n\tkt.AddKtrlCommand(\u0026goktrl.KCommand{\n\t\tName:            \"info\",          // name of your shell command\n\t\tHelp:            \"show info\",     // help info for your shell command\n\t\tKtrlHandler:     Handler,         // view controller for server side\n\t\tAuto:            true,            // automatically show results or not\n\t})\n\treturn kt\n}\n\nfunc main() {\n\tkt := ShowInfo()\n\tif len(os.Args) \u003e 1 {\n\t\tkt.RunShell()\n\t} else {\n\t\tkt.RunCtrl()\n\t}\n}\n```\n\n- Some Exibitions\n![shell-0](https://github.com/moqsien/goktrl/blob/main/docs/0.png)\n![shell-1](https://github.com/moqsien/goktrl/blob/main/docs/1.png)\n![shell-2](https://github.com/moqsien/goktrl/blob/main/docs/2.png)\n\n### License\n[MIT](https://github.com/moqsien/goktrl/blob/main/LICENSE)\n\n### Thanks To\n\n------------------\n[dmicro](https://github.com/osgochina/dmicro)\n\n[goframe](https://github.com/gogf/gf)\n\n[gin](https://github.com/gin-gonic/gin)\n\n[ishell](https://github.com/abiosoft/ishell)\n\n[table](https://github.com/aquasecurity/table)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoqsien%2Fgoktrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoqsien%2Fgoktrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoqsien%2Fgoktrl/lists"}