{"id":19081379,"url":"https://github.com/openark/zookeepercli","last_synced_at":"2025-04-30T07:45:05.515Z","repository":{"id":140436051,"uuid":"145525249","full_name":"openark/zookeepercli","owner":"openark","description":"Simple, lightweight, dependable CLI for ZooKeeper ","archived":false,"fork":false,"pushed_at":"2024-01-27T18:10:53.000Z","size":111,"stargazers_count":5,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T22:51:49.856Z","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/openark.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":"2018-08-21T07:36:51.000Z","updated_at":"2024-04-30T01:39:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e4edc55-9da4-48af-a8ad-ca81df2f053e","html_url":"https://github.com/openark/zookeepercli","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openark%2Fzookeepercli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openark%2Fzookeepercli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openark%2Fzookeepercli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openark%2Fzookeepercli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openark","download_url":"https://codeload.github.com/openark/zookeepercli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251664954,"owners_count":21624220,"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-11-09T02:34:46.524Z","updated_at":"2025-04-30T07:45:05.449Z","avatar_url":"https://github.com/openark.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zookeepercli\n\n[![downloads](https://img.shields.io/github/downloads/outbrain/zookeepercli/total.svg)](https://github.com/outbrain/zookeepercli/releases) \n\nSimple, lightweight, dependable CLI for ZooKeeper\n\n**zookeepercli** is a non-interactive command line client for [ZooKeeper](http://zookeeper.apache.org/). It provides with:\n\n * Basic CRUD-like operations: `create`, `set`, `delete` (aka `rm`), `exists`, `get`, `ls` (aka `children`).\n * Extended operations: `lsr` (ls recursive), `creater` (create recursively), `deleter` (aka `rmr`, delete recursively)\n * Well formatted and controlled output: supporting either `txt` or `json` format\n * Single, no-dependencies binary file, based on a native Go ZooKeeper library \n   by [github.com/samuel/go-zookeeper](http://github.com/samuel/go-zookeeper) ([LICENSE](https://github.com/outbrain/zookeepercli/blob/master/go-zookeeper-LICENSE))\n\n### Download \u0026 Install\n\nThere are [pre built binaries](https://github.com/outbrain/zookeepercli/releases) for download.\nYou can find `RPM` and `deb` packages, as well as pre-compiled, dependency free `zookeepercli` executable binary.\nIn fact, the only file installed by the pre-built `RPM` and `deb` packages is said executable binary file. \n\nOtherwise the source code is freely available; you will need `git` installed as well as `go`, and you're on your own.\n\n  \n### Usage:\n\n    $ zookeepercli --help\n    Usage of zookeepercli:\n      -acls=\"31\": optional, csv list [1|,2|,4|,8|,16|,31]\n      -auth_pwd=\"\": optional, digest scheme, pwd\n      -auth_usr=\"\": optional, digest scheme, user\n      -c=\"\": command (exists|get|ls|lsr|create|creater|set|delete|rm|deleter|rmr|getacl|setacl)\n      -debug=false: debug mode (very verbose)\n      -force=false: force operation\n      -format=\"txt\": output format (txt|json)\n      -servers=\"\": srv1[:port1][,srv2[:port2]...]\n      -stack=false: add stack trace upon error\n      -verbose=false: verbose\n    \n\n### Examples:\n    \n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c create /demo_only some_value\n    \n    # Default port is 2181. The above is equivalent to:\n    $ zookeepercli --servers srv-1:2181,srv-2:2181,srv-3:2181 -c create /demo_only some_value\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 --format=txt -c get /demo_only\n    some_value\n    \n    # Same as above, JSON format output:\n    $ zookeepercli --servers srv-1,srv-2,srv-3 --format=json -c get /demo_only\n    \"some_value\"\n    \n    # exists exits with exit code 0 when path exists, 1 when path does not exist \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c exists /demo_only\n    true\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c set /demo_only another_value\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 --format=json -c get /demo_only\n    \"another_value\"\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c delete /demo_only\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c get /demo_only\n    2014-09-15 04:07:16 FATAL zk: node does not exist\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c create /demo_only \"path placeholder\"\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c create /demo_only/key1 \"value1\"\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c create /demo_only/key2 \"value2\"\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c create /demo_only/key3 \"value3\"\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c ls /demo_only\n    key3\n    key2\n    key1\n    \n    # Same as above, JSON format output:\n    $ zookeepercli --servers srv-1,srv-2,srv-3 --format=json -c ls /demo_only\n    [\"key3\",\"key2\",\"key1\"]\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c delete /demo_only\n    2014-09-15 08:26:31 FATAL zk: node has children\n    \n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c delete /demo_only/key1\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c delete /demo_only/key2\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c delete /demo_only/key3\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c delete /demo_only\n\n    # /demo_only path now does not exist.\n    \n    # Create recursively a path:\n    $ zookeepercli --servers=srv-1,srv-2,srv-3 -c creater \"/demo_only/child/key1\" \"val1\"\n    $ zookeepercli --servers=srv-1,srv-2,srv-3 -c creater \"/demo_only/child/key2\" \"val2\"\n    \n    # \"-c creater\" is same as \"-c create --force\"\n\n    $ zookeepercli --servers=srv-1,srv-2,srv-3 -c get \"/demo_only/child/key1\"\n    val1\n\n    # This path was auto generated due to recursive create:\n    $ zookeepercli --servers=srv-1,srv-2,srv-3 -c get \"/demo_only\" \n    zookeepercli auto-generated\n    \n    # ls recursively a path and all sub children:\n    $ zookeepercli --servers=srv-1,srv-2,srv-3 -c lsr \"/demo_only\" \n    child\n    child/key1\n    child/key2\n\n    # set value with read and write acl using digest authentication\n    $ zookeepercli --servers 192.168.59.103 --auth_usr \"someuser\" --auth_pwd \"pass\" --acls 1,2 -c create /secret4 value4\n    \n    # get value using digest authentication\n    $ zookeepercli --servers 192.168.59.103 --auth_usr \"someuser\" --auth_pwd \"pass\" -c get /secret4\n\n    # create a value with custom acls\n    $ zookeepercli --servers 192.168.59.103 -c create /secret5 value5 world:anyone:rw,digest:someuser:hashedpw:crdwa\n\n    # view the current acl on a path\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c create /demo_acl \"some value\"\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c getacl /demo_acl\n    world:anyone:cdrwa\n\n    # set an acl with world and digest authentication\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c setacl /demo_acl \"world:anyone:rw,digest:someuser:hashedpw:crdwa\"\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -c getacl /demo_acl\n    world:anyone:rw\n    digest:someuser:hashedpw:cdrwa\n\n    # set an acl with world and digest authentication creating the node if it doesn't exist\n    $ zookeepercli --servers srv-1,srv-2,srv-3 -force -c setacl /demo_acl_create \"world:anyone:rw,digest:someuser:hashedpw:crdwa\"\n\nThe tool was built in order to allow with shell scripting seamless integration with ZooKeeper. \nThere is another, official command line tool for ZooKeeper that the author found inadequate \nin terms of output format and output control, as well as large footprint. \n**zookeepercli** overcomes those limitations and provides with quick, well formatted output as well as\nenhanced functionality. \n\n### Docker\n\nYou can also build and run **zookeepercli** in a Docker container. To build the image:\n\n    $ docker build -t zookeepercli .\n\nNow, you can run **zookeepercli** from a container. Examples:\n\n    $ docker run --rm -it zookeepercli --servers $ZK_SERVERS -c create /docker_demo \"test value\"\n    $ docker run --rm -it zookeepercli --servers $ZK_SERVERS -c get /docker_demo\n    test value\n    $ docker run --rm -it zookeepercli --servers $ZK_SERVERS -c ls /\n    docker_demo\n    zookeeper\n\n### License\n\nRelease under the [Apache 2.0 license](https://github.com/outbrain/zookeepercli/blob/master/LICENSE)\n\nAuthored by [Shlomi Noach](https://github.com/shlomi-noach) at [Outbrain](https://github.com/outbrain)\n \n \n \n \n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenark%2Fzookeepercli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenark%2Fzookeepercli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenark%2Fzookeepercli/lists"}