{"id":22203911,"url":"https://github.com/hashibuto/nilshell","last_synced_at":"2026-02-14T18:31:42.692Z","repository":{"id":64301983,"uuid":"573302798","full_name":"hashibuto/nilshell","owner":"hashibuto","description":"Shell for golang which provides only the bare interface for processing a command","archived":false,"fork":false,"pushed_at":"2024-09-29T03:22:12.000Z","size":1538,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-19T00:02:08.401Z","etag":null,"topics":["cli","go","golang","readline","shell"],"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/hashibuto.png","metadata":{"files":{"readme":"README.md","changelog":"historymanager.go","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":"2022-12-02T06:20:19.000Z","updated_at":"2024-09-29T03:21:48.000Z","dependencies_parsed_at":"2024-05-15T12:35:09.095Z","dependency_job_id":"37adabed-b811-4561-8701-f17664082705","html_url":"https://github.com/hashibuto/nilshell","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/hashibuto/nilshell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashibuto%2Fnilshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashibuto%2Fnilshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashibuto%2Fnilshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashibuto%2Fnilshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashibuto","download_url":"https://codeload.github.com/hashibuto/nilshell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashibuto%2Fnilshell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29452371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cli","go","golang","readline","shell"],"created_at":"2024-12-02T17:15:00.584Z","updated_at":"2026-02-14T18:31:42.678Z","avatar_url":"https://github.com/hashibuto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nilshell\nCommand shell for golang which provides a minimal line editor and command processing loop.  Here's what you get with NilShell:\n\n- Line editor (type, insert, delete)\n- Command history (up/down to navigate, load/export)\n- Reverse search (simple pattern match, most recent history first)\n- Tab completion hook\n- Handling of terminal resize\n\nWhat it doesn't do\n\n- Any sort of argument parsing / tokenization\n\nFor a full CLI parser implementation using nilshell, check out [Commander](https://github.com/hashibuto/commander)\n\n## Usage\n\n```\nimport (\n    ns \"github.com/hashibuto/nilshell\"\n)\n\nconfig := ns.ReaderConfig{\n\n    CompletionFunction: func(beforeCursor string, afterCursor string, full string) *ns.Suggestions {\n        // This is where you would return tab completion suggestions based on the input before the cursor, perhaps after the\n        // cursor, or even the entire line buffer.\n\n        return \u0026ns.Suggestions{\n            Total: 0\n            Items: []*ns.Suggestion{}\n        }\n    },\n\n    ProcessFunction: func(text string) error {\n        // text contains the command to be processed by your own command interpreter\n        return nil\n    }\n\n    // implement your own history manager if you want to persist history across multiple invocations, or use the default (nil)\n\tHistoryManager: nil,\n\n    PromptFunction: func() string {\n        // Return a prompt with terminal escape chars to add style\n\n        return \"$ \"\n    },\n\n    Debug: false,\n\n    // enable the log file to dump debugging info to a tailable log file\n    LogFile: \"\",\n}\n\nr := NewReader(config)\n\n// block until the process captures SIGINT or SIGTERM\nr.ReadLoop()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashibuto%2Fnilshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashibuto%2Fnilshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashibuto%2Fnilshell/lists"}