{"id":48295759,"url":"https://github.com/enthus-appdev/esq-cli","last_synced_at":"2026-04-12T11:03:06.480Z","repository":{"id":341834998,"uuid":"1154631725","full_name":"enthus-appdev/esq-cli","owner":"enthus-appdev","description":"CLI tool for querying and inspecting Elasticsearch clusters across multiple environments","archived":false,"fork":false,"pushed_at":"2026-03-03T14:43:23.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-03T18:04:57.077Z","etag":null,"topics":["cli","devtools","elasticsearch","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enthus-appdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2026-02-10T15:56:21.000Z","updated_at":"2026-03-03T14:44:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"788f2d1c-5cfd-42c4-8eca-adac380556f7","html_url":"https://github.com/enthus-appdev/esq-cli","commit_stats":null,"previous_names":["enthus-appdev/esq-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/enthus-appdev/esq-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthus-appdev%2Fesq-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthus-appdev%2Fesq-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthus-appdev%2Fesq-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthus-appdev%2Fesq-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enthus-appdev","download_url":"https://codeload.github.com/enthus-appdev/esq-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthus-appdev%2Fesq-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31419255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","devtools","elasticsearch","elasticsearch-client","go"],"created_at":"2026-04-04T23:32:58.994Z","updated_at":"2026-04-04T23:32:59.666Z","avatar_url":"https://github.com/enthus-appdev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esq - Elasticsearch Query CLI\n\nQuery and inspect Elasticsearch clusters across environments from the command line.\n\n## Installation\n\nRequires Go 1.24+.\n\n```bash\ngo install github.com/enthus-appdev/esq-cli/cmd/esq@latest\n```\n\nEnsure `~/go/bin` is in your `PATH`.\n\n## Setup\n\nAdd your Elasticsearch environments:\n\n```bash\nesq config add prod  --url http://es-prod:9200\nesq config add stage --url http://es-stage:9200\nesq config add local --url http://localhost:9200\nesq config use prod\n```\n\nConfig is stored at `~/.config/esq/config.json`.\n\n## Usage\n\n### Searching\n\n```bash\n# Lucene query string syntax\nesq search my-index \"title:hello\"\nesq search users \"name:John\" --size 50\nesq search logs \"level:error AND service:api\"\n\n# Filter returned fields\nesq search my-index \"title:hello\" --source title,status\n\n# Full Query DSL\nesq query my-index '{\"query\":{\"term\":{\"title\":\"hello\"}},\"_source\":[\"title\",\"status\"]}'\n```\n\n### Getting \u0026 Counting\n\n```bash\nesq get documents doc-42            # Get by _id\nesq count users                     # Count all docs\nesq count logs \"level:error\"        # Count matching\n```\n\n### Cluster Info\n\n```bash\nesq health              # Cluster health + node stats\nesq indices             # List all indices\nesq indices logs        # Filter by name\nesq mapping documents   # Show field mapping\n```\n\n### Environment Override\n\n```bash\nesq health --env stage             # One-off override without switching\nesq search documents \"test\" -e local\n```\n\n### Index Name Resolution\n\nYou don't need to type full versioned index names. Partial names auto-resolve to the latest version:\n\n| You type | Resolves to |\n|----------|-------------|\n| `logs` | `logs_v3.0.0` |\n| `users` | `users_v2.1.0` |\n| `metrics` | `metrics_v1.5.0` |\n\nIf multiple indices match, the latest version is used and alternatives are shown.\n\n### Piping\n\nInfo messages go to stderr, data to stdout — safe for piping:\n\n```bash\nesq search my-index \"title:hello\" | jq '.hits.hits[]._source'\nesq count users 2\u003e/dev/null | jq .count\n```\n\n## Shell Completion\n\n```bash\n# Zsh\nesq completion zsh \u003e \"${fpath[1]}/_esq\"\n\n# Bash\nesq completion bash \u003e /etc/bash_completion.d/esq\n\n# Fish\nesq completion fish \u003e ~/.config/fish/completions/esq.fish\n```\n\n## Development\n\n```bash\ngo build ./cmd/esq              # Build the binary\ngo test -race ./...             # Run tests\ngolangci-lint run               # Lint\n```\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenthus-appdev%2Fesq-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenthus-appdev%2Fesq-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenthus-appdev%2Fesq-cli/lists"}