# Choose and apply a style guide

import { Aside, Tabs, TabItem, Steps } from '@astrojs/starlight/components';

A style guide tells EkLine which writing standard to enforce. EkLine ships with three built-in style guides and supports a custom standard built from your own rules. This guide helps you choose the right one and apply it consistently everywhere your team reviews documentation.

## Before you start

You need:

- An EkLine account and integration token. Get yours from the [EkLine Dashboard](https://ekline.io/dashboard).
- One review surface set up: the [CLI](/reviewer/quickstart/cli/), a [CI integration](/reviewer/quickstart/), or the [VS Code extension](/reviewer/integrations/vscode-integration/).

---

## Step 1: Choose a style guide

EkLine enforces one style guide at a time. Pick the one that matches the content you write most often.

| Style guide | Value | Best for |
|-------------|-------|----------|
| Google | `google` | Developer documentation, API guides, READMEs, and tutorials. Concise and task-focused. |
| Microsoft | `microsoft` | Product documentation, UI-heavy guides, and enterprise content. Warm and professional. |
| Marketing | `marketing` | Landing pages, blog posts, and release announcements. Brand-voice and promotional copy. |
| Custom | — | A standard built from your own rules and terminology. Available in VS Code and through your account's [custom rules](https://ekline.io/guidelines/rules). |

<Aside type="tip">
If you write developer documentation and aren't sure which to pick, start with `google`. It's EkLine's default and suits most technical content.
</Aside>

To see the individual rules each style guide enforces, browse the [rules reference](https://ekline.io/guidelines/rules).

---

## Step 2: Apply it in the config file

For the CLI and any pipeline that runs the CLI, set the style guide once in `ekline.config.json`. Every team member and every pipeline that uses the file then enforces the same standard.

Add the `styleGuide` field to `ekline.config.json` in your project root:

```json title="ekline.config.json"
{
  "contentDirectory": ["docs"],
  "styleGuide": "google"
}
```

Run a review to apply it:

```bash
ekline-cli --ek-token YOUR_TOKEN
```

EkLine discovers `ekline.config.json` by searching from the current directory up the directory tree, so a single file at your repository root applies to the whole project.

<Aside type="note">
Commit `ekline.config.json` to your repository. This keeps the style guide consistent for everyone who runs the CLI locally or in a pipeline that calls it.
</Aside>

### Override for a single run

CLI arguments take precedence over the config file. Use the `--style-guide` flag to try a different standard without changing the shared config:

```bash
# Uses ekline.config.json, but enforces Microsoft style for this run only
ekline-cli --ek-token YOUR_TOKEN --style-guide microsoft
```

---

## Step 3: Apply it in VS Code

The VS Code extension has its own **Style Guide** setting so writers get the same standard while they work.

<Steps>

1. Open **Settings** > **Extensions** > **EkLine**, or edit `.vscode/settings.json` directly.

2. Set the **Style Guide** to match your config file:

   ```json title=".vscode/settings.json"
   {
     "ekline-vscode.StyleGuide": "Google"
   }
   ```

3. Save. EkLine reviews the active file against the selected style guide.

</Steps>

<Aside type="tip">
Commit `.vscode/settings.json` so everyone on the team opens the workspace with the same style guide already selected.
</Aside>

---

## Verify your style guide is active

Run a review against a file that breaks a rule and confirm the rule ID appears.

<Tabs>
  <TabItem label="CLI">
    ```bash
    ekline-cli --ek-token YOUR_TOKEN --content-directory ./docs
    ```

    Flagged issues include a rule ID in brackets, for example:

    ```
    [EK00005] Where possible, don't structure sentences in future tense. Use present tense instead.
    ```
  </TabItem>
  <TabItem label="VS Code">
    Open a Markdown file and run **EkLine: Review current document** from the Command Palette (`Cmd/Ctrl` + `Shift` + `P`). Suggestions appear in the **EkLine Suggestions** panel.
  </TabItem>
</Tabs>

If the rules that fire match the style guide you chose, the setting is active.

---

## Troubleshooting

### The CLI ignores my style guide

Confirm `ekline.config.json` is valid JSON and sits in the current directory or a parent directory. A `--style-guide` flag on the command line overrides the file, so check for a flag in your scripts or pipeline.

### VS Code and the CLI flag different issues

VS Code reads its **Style Guide** setting, not `ekline.config.json`. Set the same value in both places so local editing and CI enforce one standard.

### I want a standard the built-in guides don't cover

Build a custom standard from your own rules and terminology. See the [rules reference](https://ekline.io/guidelines/rules), then select **Custom** in VS Code or contact [support@ekline.io](mailto:support@ekline.io).

---

## Next steps

- [Add words to your dictionary](/reviewer/configuration/dictionary) — stop the spell-check rule flagging your product names and jargon.
- [Ignoring rules](/reviewer/configuration/ignoring-rules/) — handle false positives from your style guide.
- [Framework support](/reviewer/configuration/framework-support/) — check prose inside MDX components.
- [CLI reference](/reviewer/integrations/cli-integration/) — all configuration options and flags.