{"id":22519713,"url":"https://github.com/rerost/es-cli","last_synced_at":"2025-08-03T18:32:46.842Z","repository":{"id":47664301,"uuid":"156725215","full_name":"rerost/es-cli","owner":"rerost","description":"Elasticsearch's operation wrapper tool","archived":false,"fork":false,"pushed_at":"2023-02-25T00:12:54.000Z","size":179,"stargazers_count":6,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T17:50:55.725Z","etag":null,"topics":["cli","elasticsearch","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rerost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-08T15:11:28.000Z","updated_at":"2023-02-04T16:20:07.000Z","dependencies_parsed_at":"2024-06-19T06:12:13.020Z","dependency_job_id":"9e861d74-ab0f-4cfd-8e81-1b1a2593dc05","html_url":"https://github.com/rerost/es-cli","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rerost%2Fes-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rerost%2Fes-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rerost%2Fes-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rerost%2Fes-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rerost","download_url":"https://codeload.github.com/rerost/es-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228561217,"owners_count":17937165,"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","go","golang"],"created_at":"2024-12-07T04:26:01.397Z","updated_at":"2024-12-07T04:26:02.191Z","avatar_url":"https://github.com/rerost.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# es-cli\n[![CircleCI](https://circleci.com/gh/rerost/es-cli/tree/master.svg?style=svg\u0026circle-token=df496b759fd684d97bf6f94c9251763960fcc049)](https://circleci.com/gh/rerost/es-cli/tree/master)\n\nThis tool is **still under development**.\n\nIt's high useage elasticsearch's operation wrapper tool.\nFor example, creating index and add/remove alias operations is frequently performed, but JSON API is too complicated(I can not remember).\nSo I create this tool\n\n## Term\nI said `details` is for `mappings`, `settings`, and `aliases`.\nIts for creating indecies.\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html\n\n## Installation\n`go get -u github.com/rerost/es-cli`\n\n## Usage\n### Format\n```\n$ es-cli \u003coperation\u003e \u003ctarget\u003e args...\n$ es-cli [--host=HOST] [--user=BASIC_AUTH_USER] [--pass=BASIC_AUTH_PASSWORD] [--type=ELASTICSEARCH_DOCUMENT_TYPE] \u003coperation\u003e \u003ctarget\u003e args...\n```\n\n### Index API\n```\n$ es-cli list index\n$ es-cli create index \u003cindex_name\u003e \u003cdetail_json_file\u003e\n$ es-cli create index \u003cindex_name\u003e # Read detail json by stdin\n$ es-cli copy index \u003csrc_index_name\u003e \u003cdst_index_name\u003e\n$ es-cli count index \u003cindex_name\u003e # Return total count of documents\n$ es-cli delete index \u003cindex_name\u003e\n$ es-cli dump index \u003cindex_name\u003e # Dump details \u0026 docs\n$ es-cli restore index \u003cdumped_file\u003e # Insert docs from dumped doc file(Without details)\n$ es-cli restore index # Insert docs from dumped doc file(Without details)\n```\n\n\n### Detail API\n```\n$ es-cli get detail \u003cindex_name\u003e # Get settings, alias, mappings for creat index\n$ es-cli update detail \u003calias_name\u003e \u003cdetail_json_file\u003e # Zero downtime(without write) update detail\n$ es-cli update detail \u003calias_name\u003e # Read detail json by stdin\n```\n\n### Alias API\n```\n$ es-cli add alias \u003calias_name\u003e \u003cindex_name1\u003e \u003cindex_name2\u003e ...\n$ es-cli remove alias \u003calias_name\u003e \u003cindex_name1\u003e \u003cindex_name2\u003e ...\n$ es-cli list alias \u003calias_name\u003e\n```\n\n## Configuration\nYou can use configuration file.\nes-cli see options order by command options \u003e current directory.\n\nconfigrutaion file name is \"`escli.json`\nthe configuration file's format is json.\ne.g\n```\n{\n  \"user\": \"user\", \n  \"pass\": \"pass\",\n  \"host\": \"http://localhost:9200\",\n  \"type\": \"_doc\"\n}\n```\n\nwhen use multiple elasticsearch, use namespace\ne.g.\n```\n{\n  \"production\": {\n    \"host\": \"http://prod-es\"\n  },\n  \"qa\": {\n    \"host\": \"http://qa-es\"\n  }\n}\n```\nand exec `es-cli -n production list index`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frerost%2Fes-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frerost%2Fes-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frerost%2Fes-cli/lists"}