EkLine CLI
Run documentation checks locally or in CI pipelines using the command-line interface. Supports configuration files for team consistency.
The EkLine CLI lets you run documentation checks locally, in CI/CD pipelines, or as part of custom integrations. Store your configuration in a file for team consistency.
Installation
Section titled “Installation”Download the EkLine binary for your operating system from the Release Page.
# Download and extractcurl -L https://github.com/ekline-io/ekline-cli-binaries/releases/latest/download/ekline-cli-macos.tar.gz | tar xz
# Make executable and move to PATHchmod +x ekline-clisudo mv ekline-cli /usr/local/bin/# Download and extractcurl -L https://github.com/ekline-io/ekline-cli-binaries/releases/latest/download/ekline-cli-linux.tar.gz | tar xz
# Make executable and move to PATHchmod +x ekline-clisudo mv ekline-cli /usr/local/bin/Download ekline-cli-windows.zip from the Release Page and add to your PATH.
Quick start
Section titled “Quick start”Run EkLine on your documentation:
ekline-cli --ek-token YOUR_TOKEN --content-directory ./docsGet your token from the EkLine Dashboard.
Configuration file
Section titled “Configuration file”Instead of passing flags every time, create an ekline.config.json file in your project root. This ensures consistent settings across your team.
Creating the config file
Section titled “Creating the config file”Create ekline.config.json in your project root:
{ "contentDirectory": ["docs"], "styleGuide": "google", "ignore": ["EK00001"], "excludeDirectories": ["node_modules", "dist"]}Then run:
ekline-cli --ek-token YOUR_TOKENEkLine automatically discovers and uses the config file.
Config file discovery
Section titled “Config file discovery”EkLine searches for ekline.config.json starting from your current directory and walking up the directory tree. This supports monorepo setups where the config file lives at the root.
my-monorepo/├── ekline.config.json ← Found and used├── packages/│ └── docs/│ └── guide.md ← Running CLI here still finds root config└── apps/ └── web/Configuration precedence
Section titled “Configuration precedence”CLI arguments override config file values. This lets you use a shared config while customizing specific runs:
# Uses config file, but overrides styleGuide for this runekline-cli --ek-token YOUR_TOKEN --style-guide microsoftOrder of precedence, from highest to lowest:
- CLI arguments
ekline.config.json- Default values
All config options
Section titled “All config options”| Option | Type | Description |
|---|---|---|
contentDirectory | string[] | Directories to scan for documentation files |
styleGuide | string | Style guide to enforce: google, microsoft, or marketing |
ignore | string[] | Rule IDs to skip (for example, ["EK00001", "EK00004"]) |
excludeDirectories | string[] | Directories to exclude from scanning |
excludeFiles | string[] | Specific files to exclude |
output | string | Output path (.jsonl or .csv) |
framework | string | Documentation framework: mintlify, astro, fern, docusaurus, or gitbook |
openapiSpec | string | Path to OpenAPI spec for API terminology validation |
changedFiles | string[] | Only check specific files (useful in CI) |
changedLines | string | Path to JSON file containing changed files and their line numbers |
aiSuggestions | boolean | Enable AI-powered documentation suggestions (default: false) |
suggestion | boolean | Enable suggestions in output (default: true) |
Example configurations
Section titled “Example configurations”Minimal config:
{ "contentDirectory": ["docs"]}Mintlify project:
{ "contentDirectory": ["."], "framework": "mintlify", "excludeDirectories": ["node_modules", "api-reference"], "styleGuide": "google"}Monorepo with many doc sources:
{ "contentDirectory": ["docs", "packages/sdk/docs", "guides"], "excludeFiles": ["CHANGELOG.md"], "ignore": ["EK00042"]}Full configuration:
{ "contentDirectory": ["docs"], "framework": "astro", "styleGuide": "microsoft", "ignore": ["EK00001", "EK00004"], "excludeDirectories": ["node_modules", "dist", ".astro"], "excludeFiles": ["README.md"], "output": "ekline-report.jsonl", "aiSuggestions": true}CI/CD optimized config:
{ "contentDirectory": ["docs"], "output": "results.jsonl", "changedLines": "git-diff-output.json", "suggestion": true}Framework support
Section titled “Framework support”If you use a documentation framework like Mintlify, Docusaurus, or Astro, set the framework option to improve MDX file analysis.
Why this matters
Section titled “Why this matters”Documentation frameworks use custom MDX components such as <Note>, <Card>, and <Tabs> that contain prose. Without framework awareness, EkLine might skip content inside these components.
Without framework set:
<Note> This text mite not be checked for spelling errors.</Note>The spelling error “mite” could be missed because EkLine doesn’t know <Note> has prose.
With framework: "mintlify":
EkLine recognizes that <Note> is a prose component and checks the content inside, catching the “mite” → “might” error.
Supported frameworks
Section titled “Supported frameworks”| Framework | Value |
|---|---|
| Mintlify | mintlify |
| Astro | astro |
| Fern | fern |
| Docusaurus | docusaurus |
| GitBook | gitbook |
Configuring framework support
Section titled “Configuring framework support”Via config file, recommended:
{ "contentDirectory": ["."], "framework": "mintlify"}Via CLI flag:
ekline-cli --ek-token YOUR_TOKEN --framework mintlifyFor detailed framework setup guides, see Framework Support.
CLI options reference
Section titled “CLI options reference”Commonly used options
Section titled “Commonly used options”| Option | Short | Description |
|---|---|---|
--ek-token <token> | -et | Your EkLine integration token (required) |
--content-directory <paths> | -cd | Directories to scan (comma-separated) |
--style-guide <guide> | -sg | Style guide: google, microsoft, marketing |
--ignore <rules> | -i | Rule IDs to ignore (comma-separated) |
--output <file> | -o | Output file (.jsonl or .csv) |
--framework <name> | -fw | Documentation framework |
All options
Section titled “All options”| Option | Short | Description | Default |
|---|---|---|---|
--ek-token <token> | -et | EkLine integration token | — |
--content-directory <paths> | -cd | Directories to scan | . |
--style-guide <guide> | -sg | Style guide to enforce | — |
--ignore <rules> | -i | Rule IDs to skip | — |
--exclude-directories <dirs> | -ed | Directories to exclude | — |
--exclude-files <files> | -ef | Files to exclude | — |
--output <file> | -o | Output path (.jsonl, .csv, or terminal) | Terminal |
--framework <name> | -fw | Documentation framework | — |
--openapi-spec <path> | -oas | OpenAPI spec for terminology | — |
--changed-files <files> | -cf | Only check these files | — |
--changed-lines <path> | — | Path to JSON file with changed lines | — |
--ai-suggestions | — | Enable AI-powered suggestions | false |
--no-suggestion | -ns | Disable suggestions in output | — |
--version | -v | Show version | — |
--help | -h | Show help | — |
Examples
Section titled “Examples”Basic usage
Section titled “Basic usage”# Check docs folder with Google style guideekline-cli --ek-token YOUR_TOKEN -cd ./docs --style-guide googleIgnore specific rules
Section titled “Ignore specific rules”# Skip passive voice and sentence length rulesekline-cli --ek-token YOUR_TOKEN -cd ./docs -i EK00001,EK00004Export results to file
Section titled “Export results to file”# JSON Lines format (recommended for CI)ekline-cli --ek-token YOUR_TOKEN -cd ./docs -o results.jsonl
# CSV formatekline-cli --ek-token YOUR_TOKEN -cd ./docs -o results.csvMintlify project
Section titled “Mintlify project”ekline-cli --ek-token YOUR_TOKEN -cd . --framework mintlify --exclude-directories api-referenceCI/CD integration
Section titled “CI/CD integration”# Only check changed files (for PR workflows)ekline-cli --ek-token YOUR_TOKEN --changed-files "docs/guide.md,docs/api.md"AI-powered analysis
Section titled “AI-powered analysis”# Get AI suggestions in JSON Lines formatekline-cli --ek-token YOUR_TOKEN -cd ./docs --ai-suggestions -o report.jsonlIncremental CI checks
Section titled “Incremental CI checks”# Check only specific lines that changed (for large repos)ekline-cli --ek-token YOUR_TOKEN --changed-lines git-diff-changes.jsonObtaining your token
Section titled “Obtaining your token”- Go to the EkLine Dashboard
- Click View Integration Token
- Copy the token.
Troubleshooting
Section titled “Troubleshooting””Token required” error
Section titled “”Token required” error”Ensure you’re passing --ek-token or have EK_TOKEN set as an environment variable.
Config file not found
Section titled “Config file not found”EkLine looks for ekline.config.json in the current directory and parent directories. Verify the file exists and is valid JSON.
Framework components not being checked
Section titled “Framework components not being checked”Make sure you’ve set the correct framework option. Verify your ekline.config.json has the right framework value.
Issues in MDX files not detected
Section titled “Issues in MDX files not detected”If you’re using a documentation framework, set the framework option to enable proper MDX parsing. See Framework Support.
Next steps
Section titled “Next steps”- Ignoring Rules — Handle false positives with inline comments or config
- Framework Support — Detailed setup for Mintlify, Astro, Fern, and more
- GitHub Actions Integration — Automate checks on every PR
- VS Code Extension — Real-time feedback while writing