{"id":13591900,"url":"https://github.com/c4pt0r/tcli","last_synced_at":"2025-04-07T11:32:49.997Z","repository":{"id":45166183,"uuid":"393094567","full_name":"c4pt0r/tcli","owner":"c4pt0r","description":"The ultimate CLI tool for TiKV","archived":false,"fork":false,"pushed_at":"2024-05-15T22:46:28.000Z","size":397,"stargazers_count":57,"open_issues_count":5,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T17:44:16.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c4pt0r.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}},"created_at":"2021-08-05T15:36:12.000Z","updated_at":"2024-12-20T08:53:02.000Z","dependencies_parsed_at":"2024-01-16T22:01:58.876Z","dependency_job_id":"51a1e908-7c85-485a-8619-a6d53b23af57","html_url":"https://github.com/c4pt0r/tcli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4pt0r%2Ftcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4pt0r%2Ftcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4pt0r%2Ftcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4pt0r%2Ftcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c4pt0r","download_url":"https://codeload.github.com/c4pt0r/tcli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247645074,"owners_count":20972404,"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":[],"created_at":"2024-08-01T16:01:03.513Z","updated_at":"2025-04-07T11:32:49.543Z","avatar_url":"https://github.com/c4pt0r.png","language":"Go","readme":"# tcli\nThe ultimate CLI tool for TiKV, for human being :).\n\n(Only support Transaction KV API now)\n\n```\nCommands:\n  .stores      list tikv stores in cluster\n  backup       dumps kv pairs to a csv file\n  bench        bench [type], type: ycsb\n  clear        clear the screen\n  count        count keys or keys with specific prefix\n  del          delete a single kv pair\n  delall       remove all key-value pairs, DANGEROUS\n  delp         delete kv pairs with specific prefix\n  echo         echo $\u003cvarname\u003e\n  env          print env variables\n  exit         exit the program\n  get          get [key]\n  head         scan keys from $head, equals to \"scan $head limit=N\", usage: head \u003climit\u003e\n  help         display help\n  hexdump      hexdump \u003cstring\u003e\n  loadcsv      load csv file, use \"loadcsv --help\" for more details\n  put          put [key] [value]\n  scan         Scan keys from start key, use \"scan --help\" for more details\n  scanp        scan keys with prefix, equals to \"scan [key prefix] strict-prefix=true\"\n  sysenv       print system env variables\n  sysvar       set system variables, usage:\n                 sysvar \u003cvarname\u003e=\u003cstring value\u003e, variable name and value are both string\n                 example: scan $varname or get $varname\n  var          set variables, usage:\n                 var \u003cvarname\u003e=\u003cstring value\u003e, variable name and value are both string\n                 example: scan $varname or get $varname\n```\n\nHave a try:\n\n1. Install `tiup` \n\n`curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh`\n\n2. Deploy TiKV using `tiup`\n\n`tiup playground --mode tikv-slim`\n\n3. Launch `tcli`\n\n```\n$ tcli -pd localhost:2379\n2021/10/24 14:57:19 main.go:98: I | pd instance info: name:\"pd-0\" member_id:3474484975246189105 peer_urls:\"http://127.0.0.1:2380\" client_urls:\"http://127.0.0.1:2379\"\n2021/10/24 14:57:19 main.go:105: I | tikv instance info: store_id:\"1\" version:\"5.2.1\" addr:\"127.0.0.1:20160\" state:\"Up\" status_addr:\"127.0.0.1:20180\"\n\u003e\u003e\u003e\n```\n4. Have a try:\n\n```\n\u003e\u003e\u003e put hello world\nInput: put hello world\nSuccess, Elapse: 33 ms\n\n\u003e\u003e\u003e get hello\nInput: get hello\n|-------|-------|\n|  KEY  | VALUE |\n|-------|-------|\n| hello | world |\n|-------|-------|\n1 Record Found\nSuccess, Elapse: 8 ms\n\n\u003e\u003e\u003e put hello_world world\nInput: put hello_world world\nSuccess, Elapse: 7 ms\n\n\u003e\u003e\u003e scanp hello\nInput: scanp hello\n|-------------|-------|\n|     KEY     | VALUE |\n|-------------|-------|\n| hello       | world |\n| hello_world | world |\n|-------------|-------|\n2 Records Found\nSuccess, Elapse: 5 ms\n```","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc4pt0r%2Ftcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc4pt0r%2Ftcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc4pt0r%2Ftcli/lists"}