build
Install, compile, and verify a clean Elastic CLI checkout.
Source facts
- Repository
- elastic/cli
- Last source activity
- September 28, 2026 at 18:54
- Detected SKILL.md language
- English
- Stars
- 47
- Forks
- 27
Install options
The review-first prompt is selected by default. You can switch to a direct command or download a local copy.
Review the source files
Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview- name
- build
- description
- Install, compile, and verify a clean Elastic CLI checkout.
# Build
Node.js 22+. If `tsc` OOMs, set `NODE_OPTIONS=--max-old-space-size=8192`.
```bash
npm ci
npm run build
npm test
```
`npm test` already runs `npm run build` then unit tests. `npm ci` for CI and clean checkouts; `npm install` is fine locally.
```bash
npx tsc --noEmit
npm run test:lint
node scripts/generate-notice.mjs
npm run build:schema
```
Commit `NOTICE.txt` after dependency changes and `docs/cli/schema.json` after command or flag changes.
Do not edit `src/es/apis/*.ts`, `src/es/api-manifest.ts`, `src/kb/apis.ts`, or `src/kb/api-manifest.ts`. Unset `ELASTIC_CLI_CONFIG_FILE` before running the built binary against a real cluster.
View on GitHub