{"id":13409970,"url":"https://github.com/c-bata/go-prompt","last_synced_at":"2026-10-18T23:47:31.796Z","repository":{"id":37850241,"uuid":"100285497","full_name":"c-bata/go-prompt","owner":"c-bata","description":"Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.","archived":false,"fork":false,"pushed_at":"2025-08-12T09:07:32.000Z","size":413,"stargazers_count":5501,"open_issues_count":115,"forks_count":376,"subscribers_count":53,"default_branch":"master","last_synced_at":"2026-10-14T13:43:45.465Z","etag":null,"topics":["cli","command-line","interactive","prompt","terminal","vt100"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/c-bata/go-prompt","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/c-bata.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-08-14T16:02:09.000Z","updated_at":"2026-10-13T18:06:16.000Z","dependencies_parsed_at":"2024-04-22T03:33:02.067Z","dependency_job_id":"969c46cc-1431-422b-936e-f1645eacaeed","html_url":"https://github.com/c-bata/go-prompt","commit_stats":{"total_commits":318,"total_committers":29,"mean_commits":10.96551724137931,"dds":"0.23899371069182385","last_synced_commit":"82a912274504477990ecf7c852eebb7c85291772"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/c-bata/go-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fgo-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fgo-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fgo-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fgo-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-bata","download_url":"https://codeload.github.com/c-bata/go-prompt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fgo-prompt/sbom","scorecard":{"id":260701,"data":{"date":"2025-08-11","repo":{"name":"github.com/c-bata/go-prompt","commit":"82a912274504477990ecf7c852eebb7c85291772"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":4,"reason":"Found 7/17 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/c-bata/go-prompt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/c-bata/go-prompt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/c-bata/go-prompt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/c-bata/go-prompt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/c-bata/go-prompt/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/c-bata/go-prompt/test.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T10:46:15.495Z","repository_id":37850241,"created_at":"2025-08-17T10:46:15.495Z","updated_at":"2025-08-17T10:46:15.495Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38343425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"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":["cli","command-line","interactive","prompt","terminal","vt100"],"created_at":"2024-07-30T20:01:04.287Z","updated_at":"2026-10-18T23:47:31.549Z","avatar_url":"https://github.com/c-bata.png","language":"Go","funding_links":[],"categories":["Misc","HarmonyOS","命令行","语言资源库","开源类库","Go","Command Line","Open source library","User Interface","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`","Build Automation","CLI Utilities","高级控制台UI"],"sub_categories":["Windows Manager","高级控制台用户界面","go","命令行","Advanced Console UIs","Command Line","Terminal and Console UI","标准 CLI"],"readme":"# go-prompt\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/c-bata/go-prompt)](https://goreportcard.com/report/github.com/c-bata/go-prompt)\n![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)\n[![GoDoc](https://godoc.org/github.com/c-bata/go-prompt?status.svg)](https://godoc.org/github.com/c-bata/go-prompt) \n![tests](https://github.com/c-bata/go-prompt/workflows/tests/badge.svg)\n\nA library for building powerful interactive prompts inspired by [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit),\nmaking it easier to build cross-platform command line tools using Go.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/c-bata/go-prompt\"\n)\n\nfunc completer(d prompt.Document) []prompt.Suggest {\n\ts := []prompt.Suggest{\n\t\t{Text: \"users\", Description: \"Store the username and age\"},\n\t\t{Text: \"articles\", Description: \"Store the article text posted by user\"},\n\t\t{Text: \"comments\", Description: \"Store the text commented to articles\"},\n\t}\n\treturn prompt.FilterHasPrefix(s, d.GetWordBeforeCursor(), true)\n}\n\nfunc main() {\n\tfmt.Println(\"Please select table.\")\n\tt := prompt.Input(\"\u003e \", completer)\n\tfmt.Println(\"You selected \" + t)\n}\n```\n\n#### Projects using go-prompt\n\n* [c-bata/kube-prompt : An interactive kubernetes client featuring auto-complete written in Go.](https://github.com/c-bata/kube-prompt)\n* [rancher/cli : The Rancher Command Line Interface (CLI)is a unified tool to manage your Rancher server](https://github.com/rancher/cli)\n* [kubicorn/kubicorn : Simple, cloud native infrastructure for Kubernetes.](https://github.com/kubicorn/kubicorn)\n* [cch123/asm-cli : Interactive shell of assembly language(X86/X64) based on unicorn and rasm2](https://github.com/cch123/asm-cli)\n* [ktr0731/evans : more expressive universal gRPC client](https://github.com/ktr0731/evans)\n* [CrushedPixel/moshpit: A Command-line tool for datamoshing.](https://github.com/CrushedPixel/moshpit)\n* [last-ent/testy-go: Testy Go: A tool for easy testing!](https://github.com/last-ent/testy-go)\n* [tiagorlampert/CHAOS: a PoC that allow generate payloads and control remote operating systems.](https://github.com/tiagorlampert/CHAOS)\n* [abs-lang/abs: ABS is a scripting language that works best on terminal. It tries to combine the elegance of languages such as Python, or Ruby, to the convenience of Bash.](https://github.com/abs-lang/abs)\n* [takashabe/btcli: btcli is a CLI client for the Bigtable. Has many read options and auto-completion.](https://github.com/takashabe/btcli)\n* [ysn2233/kafka-prompt: An interactive kafka-prompt(kafka-shell) built on existing kafka command client](https://github.com/ysn2233/kafka-prompt)\n* [fishi0x01/vsh: HashiCorp Vault interactive shell](https://github.com/fishi0x01/vsh)\n* [mstrYoda/docker-shell: A simple interactive prompt for docker](https://github.com/mstrYoda/docker-shell)\n* [c-bata/gh-prompt: An interactive GitHub CLI featuring auto-complete.](https://github.com/c-bata/gh-prompt)\n* [docker-slim/docker-slim: Don't change anything in your Docker container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)](https://github.com/docker-slim/docker-slim)\n* [rueyaa332266/ezcron: Ezcron is a CLI tool, helping you deal with cron expression easier.](https://github.com/rueyaa332266/ezcron)\n* [qingstor/qsctl: Advanced command line tool for QingStor Object Storage.](https://github.com/qingstor/qsctl)\n* [segmentio/topicctl: Tool for declarative management of Kafka topics](https://github.com/segmentio/topicctl)\n* [chriswalz/bit: Bit is a modern Git CLI](https://github.com/chriswalz/bit)\n* (If you create a CLI utility using go-prompt and want your own project to be listed here, please submit a GitHub issue.)\n\n## Features\n\n### Powerful auto-completion\n\n[![demo](https://github.com/c-bata/assets/raw/master/go-prompt/kube-prompt.gif)](https://github.com/c-bata/kube-prompt)\n\n(This is a GIF animation of kube-prompt.)\n\n### Flexible options\n\ngo-prompt provides many options. Please check [option section of GoDoc](https://godoc.org/github.com/c-bata/go-prompt#Option) for more details.\n\n[![options](https://github.com/c-bata/assets/raw/master/go-prompt/prompt-options.png)](#flexible-options)\n\n### Keyboard Shortcuts\n\nEmacs-like keyboard shortcuts are available by default (these also are the default shortcuts in Bash shell).\nYou can customize and expand these shortcuts.\n\n[![keyboard shortcuts](https://github.com/c-bata/assets/raw/master/go-prompt/keyboard-shortcuts.gif)](#keyboard-shortcuts)\n\nKey Binding          | Description\n---------------------|---------------------------------------------------------\n\u003ckbd\u003eCtrl + A\u003c/kbd\u003e  | Go to the beginning of the line (Home)\n\u003ckbd\u003eCtrl + E\u003c/kbd\u003e  | Go to the end of the line (End)\n\u003ckbd\u003eCtrl + P\u003c/kbd\u003e  | Previous command (Up arrow)\n\u003ckbd\u003eCtrl + N\u003c/kbd\u003e  | Next command (Down arrow)\n\u003ckbd\u003eCtrl + F\u003c/kbd\u003e  | Forward one character\n\u003ckbd\u003eCtrl + B\u003c/kbd\u003e  | Backward one character\n\u003ckbd\u003eCtrl + D\u003c/kbd\u003e  | Delete character under the cursor\n\u003ckbd\u003eCtrl + H\u003c/kbd\u003e  | Delete character before the cursor (Backspace)\n\u003ckbd\u003eCtrl + W\u003c/kbd\u003e  | Cut the word before the cursor to the clipboard\n\u003ckbd\u003eCtrl + K\u003c/kbd\u003e  | Cut the line after the cursor to the clipboard\n\u003ckbd\u003eCtrl + U\u003c/kbd\u003e  | Cut the line before the cursor to the clipboard\n\u003ckbd\u003eCtrl + L\u003c/kbd\u003e  | Clear the screen\n\n### History\n\nYou can use \u003ckbd\u003eUp arrow\u003c/kbd\u003e and \u003ckbd\u003eDown arrow\u003c/kbd\u003e to walk through the history of commands executed.\n\n[![History](https://github.com/c-bata/assets/raw/master/go-prompt/history.gif)](#history)\n\n### Multiple platform support\n\nWe have confirmed go-prompt works fine in the following terminals:\n\n* iTerm2 (macOS)\n* Terminal.app (macOS)\n* Command Prompt (Windows)\n* gnome-terminal (Ubuntu)\n\n## Links\n\n* [Change Log](./CHANGELOG.md)\n* [GoDoc](http://godoc.org/github.com/c-bata/go-prompt)\n* [gocover.io](https://gocover.io/github.com/c-bata/go-prompt)\n\n## Author\n\nMasashi Shibata\n\n* Twitter: [@c\\_bata\\_](https://twitter.com/c_bata_/)\n* Github: [@c-bata](https://github.com/c-bata/)\n\n## License\n\nThis software is licensed under the MIT license, see [LICENSE](./LICENSE) for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-bata%2Fgo-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-bata%2Fgo-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-bata%2Fgo-prompt/lists"}