Skip to content

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.

Download the EkLine binary for your operating system from the Release Page.

Terminal window
# Download and extract
curl -L https://github.com/ekline-io/ekline-cli-binaries/releases/latest/download/ekline-cli-macos.tar.gz | tar xz
# Make executable and move to PATH
chmod +x ekline-cli
sudo mv ekline-cli /usr/local/bin/

Run EkLine on your documentation:

Terminal window
ekline-cli --ek-token YOUR_TOKEN --content-directory ./docs

Get your token from the EkLine Dashboard.


Instead of passing flags every time, create an ekline.config.json file in your project root. This ensures consistent settings across your team.

Create ekline.config.json in your project root:

{
"contentDirectory": ["docs"],
"styleGuide": "google",
"ignore": ["EK00001"],
"excludeDirectories": ["node_modules", "dist"]
}

Then run:

Terminal window
ekline-cli --ek-token YOUR_TOKEN

EkLine automatically discovers and uses the config file.

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/

CLI arguments override config file values. This lets you use a shared config while customizing specific runs:

Terminal window
# Uses config file, but overrides styleGuide for this run
ekline-cli --ek-token YOUR_TOKEN --style-guide microsoft

Order of precedence, from highest to lowest:

  1. CLI arguments
  2. ekline.config.json
  3. Default values
OptionTypeDescription
contentDirectorystring[]Directories to scan for documentation files
styleGuidestringStyle guide to enforce: google, microsoft, or marketing
ignorestring[]Rule IDs to skip (for example, ["EK00001", "EK00004"])
excludeDirectoriesstring[]Directories to exclude from scanning
excludeFilesstring[]Specific files to exclude
outputstringOutput path (.jsonl or .csv)
frameworkstringDocumentation framework: mintlify, astro, fern, docusaurus, or gitbook
openapiSpecstringPath to OpenAPI spec for API terminology validation
changedFilesstring[]Only check specific files (useful in CI)
changedLinesstringPath to JSON file containing changed files and their line numbers
aiSuggestionsbooleanEnable AI-powered documentation suggestions (default: false)
suggestionbooleanEnable suggestions in output (default: true)

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
}

If you use a documentation framework like Mintlify, Docusaurus, or Astro, set the framework option to improve MDX file analysis.

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.

FrameworkValue
Mintlifymintlify
Astroastro
Fernfern
Docusaurusdocusaurus
GitBookgitbook

Via config file, recommended:

{
"contentDirectory": ["."],
"framework": "mintlify"
}

Via CLI flag:

Terminal window
ekline-cli --ek-token YOUR_TOKEN --framework mintlify

For detailed framework setup guides, see Framework Support.


OptionShortDescription
--ek-token <token>-etYour EkLine integration token (required)
--content-directory <paths>-cdDirectories to scan (comma-separated)
--style-guide <guide>-sgStyle guide: google, microsoft, marketing
--ignore <rules>-iRule IDs to ignore (comma-separated)
--output <file>-oOutput file (.jsonl or .csv)
--framework <name>-fwDocumentation framework
OptionShortDescriptionDefault
--ek-token <token>-etEkLine integration token
--content-directory <paths>-cdDirectories to scan.
--style-guide <guide>-sgStyle guide to enforce
--ignore <rules>-iRule IDs to skip
--exclude-directories <dirs>-edDirectories to exclude
--exclude-files <files>-efFiles to exclude
--output <file>-oOutput path (.jsonl, .csv, or terminal)Terminal
--framework <name>-fwDocumentation framework
--openapi-spec <path>-oasOpenAPI spec for terminology
--changed-files <files>-cfOnly check these files
--changed-lines <path>Path to JSON file with changed lines
--ai-suggestionsEnable AI-powered suggestionsfalse
--no-suggestion-nsDisable suggestions in output
--version-vShow version
--help-hShow help

Terminal window
# Check docs folder with Google style guide
ekline-cli --ek-token YOUR_TOKEN -cd ./docs --style-guide google
Terminal window
# Skip passive voice and sentence length rules
ekline-cli --ek-token YOUR_TOKEN -cd ./docs -i EK00001,EK00004
Terminal window
# JSON Lines format (recommended for CI)
ekline-cli --ek-token YOUR_TOKEN -cd ./docs -o results.jsonl
# CSV format
ekline-cli --ek-token YOUR_TOKEN -cd ./docs -o results.csv
Terminal window
ekline-cli --ek-token YOUR_TOKEN -cd . --framework mintlify --exclude-directories api-reference
Terminal window
# Only check changed files (for PR workflows)
ekline-cli --ek-token YOUR_TOKEN --changed-files "docs/guide.md,docs/api.md"
Terminal window
# Get AI suggestions in JSON Lines format
ekline-cli --ek-token YOUR_TOKEN -cd ./docs --ai-suggestions -o report.jsonl
Terminal window
# Check only specific lines that changed (for large repos)
ekline-cli --ek-token YOUR_TOKEN --changed-lines git-diff-changes.json

  1. Go to the EkLine Dashboard
  2. Click View Integration Token
  3. Copy the token.

Ensure you’re passing --ek-token or have EK_TOKEN set as an environment variable.

EkLine looks for ekline.config.json in the current directory and parent directories. Verify the file exists and is valid JSON.

Make sure you’ve set the correct framework option. Verify your ekline.config.json has the right framework value.

If you’re using a documentation framework, set the framework option to enable proper MDX parsing. See Framework Support.