{"id":27933165,"url":"https://github.com/zmoog/es","last_synced_at":"2025-12-25T09:36:41.467Z","repository":{"id":172143896,"uuid":"648907887","full_name":"zmoog/es","owner":"zmoog","description":"Elasticsearch CLI tool","archived":false,"fork":false,"pushed_at":"2025-10-31T05:39:19.000Z","size":12973,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T07:23:46.152Z","etag":null,"topics":["cli","elasticsearch"],"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/zmoog.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-03T06:53:47.000Z","updated_at":"2025-06-16T10:02:59.000Z","dependencies_parsed_at":"2025-05-07T04:39:25.868Z","dependency_job_id":null,"html_url":"https://github.com/zmoog/es","commit_stats":null,"previous_names":["zmoog/elasticsearch-cli","zmoog/es"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zmoog/es","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoog%2Fes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoog%2Fes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoog%2Fes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoog%2Fes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmoog","download_url":"https://codeload.github.com/zmoog/es/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmoog%2Fes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28025728,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"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","elasticsearch"],"created_at":"2025-05-07T04:27:40.364Z","updated_at":"2025-12-25T09:36:41.460Z","avatar_url":"https://github.com/zmoog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# es\n\nSimple CLI tool to interact with [Elasticsearch REST APIs](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) from the terminal.\n\nCurrently, it supports only a fraction of the Elasticsearch REST APIs.\n\n## Installation\n\n### Using Homebrew (macOS and Linux)\n\nInstall this tool using Homebrew:\n\n```sh\nbrew install zmoog/homebrew-es/es\n```\n\n### Using Go\n\nInstall this tool using Go:\n\n    go install github.com/zmoog/es@latest\n\n## Usage\n\n### Docs\n\nFor sending a single document to an Elasticseach cluster, run:\n\n    es docs index --doc \"{\\\"@timestamp\\\": \\\"2023-06-11T07:43:48+0200\\\", \\\"name\\\": \\\"Maurizio Branca\\\"}\"\n\nFor sending multiple documents to an Elasticsearch cluster, run:\n\n    es docs bulk --file docs.json\n\nYou can also send documents from stdin (use `-` as the filename):\n\n    cat docs.json | es docs bulk -f -\n\n### Search\n\nFor searching documents in an Elasticsearch cluster, run:\n\n    $ es search my_index -q '{\"query\": {\"match_all\": {}}}' | jq\n    {\n      \"took\": 0,\n      \"timed_out\": false,\n      \"_shards\": {\n        \"total\": 1,\n        \"successful\": 1,\n        \"skipped\": 0,\n        \"failed\": 0\n      },\n      \"hits\": {\n        \"total\": {\n          \"value\": 2,\n          \"relation\": \"eq\"\n        },\n        \"max_score\": 1.0,\n        \"hits\": [\n          {\n            \"_index\": \".ds-logs-test-default-2025.01.08-000001\",\n            \"_id\": \"638aSJQBashsspu13aIM\",\n            \"_score\": 1.0,\n            \"_source\": {\n              \"name\": \"Maurizio Branca\",\n              \"@timestamp\": \"2025-01-08T22:48:27.659837121Z\"\n            }\n          },\n          {\n            \"_index\": \".ds-logs-test-default-2025.01.08-000001\",\n            \"_id\": \"0X8DSJQBashsspu145t7\",\n            \"_score\": 1.0,\n            \"_source\": {\n              \"name\": \"Maurizio Branca\",\n              \"@timestamp\": \"2025-01-08T22:23:21.211245339Z\"\n            }\n          }\n        ]\n      }\n    }\n\n### Data Stream\n\nFor deleting a data stream and its backing indices, run:\n\n    es datastream delete logs-test-default\n\nYou can also use wildcard patterns to delete multiple data streams:\n\n    es datastream delete 'logs-*'\n\nTo skip the confirmation prompt, use the `--force` flag:\n\n    es datastream delete logs-test-default --force\n\n### Version\n\nFor printing the application version, run:\n\n    es version\n\n### Configuration\n\nYou have the flexibility to set the app setting using the following methods (increasing priority):\n\n- config file\n- env vars\n- CLI option flags\n\n#### Config file\n\nFor example, I want to have a default config in a file (low priority):\n\n    api:\n      endpoints: https://localhost:9200\n      key: [redacted]\n      client:\n      max-retries: 1\n      retry-on-status:\n        - 502\n        - 503\n        - 504\n        - 429\n      ca-cert-path: /Users/zmoog/.elastic-package/profiles/default/certs/ca-cert.pem\n\n#### Env vars\n\nIn addition, I want to override any setting using an env var (mid priority)\n\n    export ES_API_ENDPOINTS=\"another endpoint\"\n    export ES_API_KEY=\"another key\"\n\n    cat docs.json | es docs bulk -f -\n\n#### CLI flags\n\nIn addition, I want to override any setting using a flag (high priority):\n\n    cat docs.json | es docs bulk -f - --api-key \"[yet another key]\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmoog%2Fes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmoog%2Fes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmoog%2Fes/lists"}