---
title: "Overview"
description: "Run the diglot command to extract sources, compare them with their manifests, validate records and build bundles."
canonical_url: "https://diglot.sh/workflow/cli/overview"
---
# Overview

> Run the diglot command to extract sources, compare them with their manifests, validate records and build bundles.

`@diglot/cli` provides the `diglot` command. It covers the parts of the workflow that don't need a model: fetching sources, extracting segments, reporting changes, checking records and building the bundles your site reads. Machine translation is the job of the [Action](https://diglot.sh/workflow/action/overview).

Run it without installing anything, or add it to a project:

```bash
pnpm dlx @diglot/cli <command>
```

<package-info directory="packages/cli" install="pnpm add -D @diglot/cli" name="@diglot/cli">



</package-info>

It needs Node.js 22.18 or later. Once installed, call `diglot` from your scripts.

## Commands

<table>
<thead>
  <tr>
    <th>
      Command
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a href="https://diglot.sh/workflow/cli/checkout">
        <code>
          diglot checkout [sources...]
        </code>
      </a>
    </td>
    
    <td>
      Exports each source as plain files under <code>
        .diglot/sources/<source>
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://diglot.sh/workflow/cli/extract">
        <code>
          diglot extract
        </code>
      </a>
    </td>
    
    <td>
      Extracts the segments of each source and writes its manifest
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://diglot.sh/workflow/cli/diff">
        <code>
          diglot diff
        </code>
      </a>
    </td>
    
    <td>
      Shows added, removed and modified segments compared with the manifests
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://diglot.sh/workflow/cli/validate">
        <code>
          diglot validate
        </code>
      </a>
    </td>
    
    <td>
      Checks every record against its source segments
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://diglot.sh/workflow/cli/build">
        <code>
          diglot build
        </code>
      </a>
    </td>
    
    <td>
      Writes <code>
        dist/<locale>.json
      </code>
      
       for each locale
    </td>
  </tr>
  
  <tr>
    <td>
      <a href="https://diglot.sh/workflow/cli/status">
        <code>
          diglot status
        </code>
      </a>
    </td>
    
    <td>
      Reports translation coverage per locale and source
    </td>
  </tr>
</tbody>
</table>

## The working directory

Every command reads `diglot.config.ts` and `sources.yml` from the directory given with `--cwd`, which defaults to `.`. Run the command from the root of your translations repository, or pass the path:

```bash
pnpm dlx @diglot/cli status --cwd ../translations
```

## A typical sequence

After a source changes, `extract` refreshes the manifests, `status` shows what is missing, and `validate` and `build` prepare the output. `diff` is the one to run before `extract` when you want to see what changed, because it compares against the manifests that `extract` overwrites.

```bash
pnpm dlx @diglot/cli diff
pnpm dlx @diglot/cli extract
pnpm dlx @diglot/cli validate
pnpm dlx @diglot/cli build
```

The Action performs the equivalent steps itself, so you only need the CLI for local work, for CI checks, and for building bundles when the Action's `build-dist` is `false`.


## Sitemap

See the full [sitemap](https://diglot.sh/sitemap.md) for all pages.
