{"id":16724858,"url":"https://github.com/rolinh/elastic-go","last_synced_at":"2025-03-23T15:30:59.808Z","repository":{"id":48948211,"uuid":"48370360","full_name":"rolinh/elastic-go","owner":"rolinh","description":"A command-line tool to query the Elasticsearch REST API","archived":false,"fork":false,"pushed_at":"2021-07-04T05:33:39.000Z","size":14,"stargazers_count":25,"open_issues_count":5,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T21:50:53.147Z","etag":null,"topics":["cli","elasticsearch-client","go"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rolinh.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":"2015-12-21T12:22:58.000Z","updated_at":"2024-01-24T06:55:19.000Z","dependencies_parsed_at":"2022-09-24T00:41:58.664Z","dependency_job_id":null,"html_url":"https://github.com/rolinh/elastic-go","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolinh%2Felastic-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolinh%2Felastic-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolinh%2Felastic-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolinh%2Felastic-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rolinh","download_url":"https://codeload.github.com/rolinh/elastic-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245122677,"owners_count":20564355,"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":["cli","elasticsearch-client","go"],"created_at":"2024-10-12T22:46:59.546Z","updated_at":"2025-03-23T15:30:59.565Z","avatar_url":"https://github.com/rolinh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elastic.go - A command-line tool to query the Elasticsearch REST API\n\n`elastic.go` was born to turn commands that look like this:\n\n```\ncurl -XGET 'http://localhost:9200/_nodes/_all/host,ip' | python -m json.tool\n```\n\ninto this:\n\n```\nelastic node list\n```\n\n`elastic` fetches data from your Elasticsearch instance, formats the data\nnicely when it is JSON compressed data, and adds a bit of colors to make it more\nreadable to the human eye. It aims at providing shortcuts for all default\nElasticsearch routes. For instance, you can get the cluster health with\n`elastic cluster health` (or `elastic c he` for short).\n\nOf course, you can still issue any `GET` requests with\n`elastic query \u003cYOUR REQUEST HERE\u003e` (or `elastic q` for short), like\n`elastic q twitter/tweet,user/_search?q=user:kimchy'`.\nBy design, only `GET` requests are allowed. I wanted to make it easy to query\nElasticseach indexes, not deleting them so use the good old `curl -XDELETE ...`\nif this is what you want to achieve.\nThere is currently no support for `PUT` requests either since I have no use for\nit. Pull requests are welcome however.\n\n## Installation\n\nProviding that [Go](https://golang.org) is installed and that `$GOPATH` is set,\nsimply use the following command:\n```\ngo get -u github.com/Rolinh/elastic-go\n```\n\nMake sure that `$GOPATH/bin` is in your `$PATH`.\n\n## Build a Docker image\n\nA `Dockerfile` is provided. Simply run the following command to build the Docker\nimage:\n```\ndocker build -t Rolinh/elastic-go .\n```\n\n## Usage\n\n`elastic help` provides general help:\n```\n$ elastic help\nNAME:\n   elastic - A command line tool to query the Elasticsearch REST API\n\nUSAGE:\n   elastic [global options] command [command options] [arguments...]\n\nVERSION:\n   1.0.0\n\nAUTHOR(S):\n   Robin Hahling \u003crobin.hahling@gw-computing.net\u003e\n\nCOMMANDS:\n   cluster, c   Get cluster information\n   index, i     Get index information\n   node, n      Get cluster nodes information\n   query, q     Perform any ES API GET query\n   stats, s     Get statistics\n   help, h      Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --baseurl \"http://localhost:9200/\"   Base API URL\n   --help, -h                           show help\n   --version, -v                        print the version\n```\n\nHelp works for any subcommand as well. For instance:\n```\n$ elastic index help\nNAME:\n   elastic index - Get index information\n\nUSAGE:\n   elastic index [global options] command [command options] [arguments...]\n\nVERSION:\n   1.0.0\n\nCOMMANDS:\n   docs-count, dc       Get index documents count\n   list, l              List all indexes\n   size, si             Get index size\n   status, st           Get index status\n   verbose, v           List indexes information with many stats\n   help, h              Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h   show help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolinh%2Felastic-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolinh%2Felastic-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolinh%2Felastic-go/lists"}