> For the complete documentation index, see [llms.txt](https://developer.frontitude.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.frontitude.com/developer-cli/configuration-file.md).

# Configuration file

## Overview

The Frontitude CLI uses a local configuration file called `frontituderc.json` to determine which text sources to pull from your Frontitude workspace and where to write the output.

> **Note:** This file is managed by the Frontitude CLI. While you can edit it manually, it's recommended to run `frontitude init`, or `frontitude source set` if you’ve already completed `init`, to updated it.

## File location

`frontituderc.json` is created at the root of your project directory. It is safe — and recommended — to commit this file to version control so that your team shares the same CLI configuration.

## Properties

| Property       | Type      | Required | Description                                        |
| -------------- | --------- | -------- | -------------------------------------------------- |
| `filePath`     | `string`  | Yes      | Relative path to the output strings file.          |
| `library`      | `boolean` | No       | Whether to include texts from the Copy Library.    |
| `projects`     | `array`   | No       | Frontitude projects to pull texts from.            |
| `folders`      | `array`   | No       | Frontitude workspace folders to pull texts from.   |
| `xliffVersion` | `string`  | No       | XLIFF version when using `.xlf` / `.xliff` output. |

> At least one text source (`library`, `projects`, or `folders`) must be configured for `frontitude pull` to work.

#### `filePath`

**Type:** `string`

The relative path where the CLI writes the pulled texts (e.g. `./strings.json`). The file extension determines the output format:

| Extension  | Format        |
| ---------- | ------------- |
| `.json`    | JSON          |
| `.xml`     | Android XML   |
| `.xlf`     | XLIFF         |
| `.xliff`   | XLIFF         |
| `.strings` | Apple Strings |

**Default:** `./strings.json`

#### `library`

**Type:** `boolean`

Set to `true` to include texts from your workspace's Copy Library as a source. When `false` or omitted, the Copy Library is not included.

#### `projects`

**Type:** `Array<{ name: string, id: string }>`

A list of Frontitude projects to pull texts from. Each entry contains:

* `name` — The display name of the project. Stored for readability so you can identify entries without looking up UUIDs. Not sent to the API.
* `id` — The unique project identifier used by the CLI to fetch texts.

These values are populated automatically by `frontitude init` or `frontitude source set` — you should not need to look up or edit IDs manually. If a project is renamed in Frontitude, the `name` in the config will be stale until you re-run `frontitude source set`.

#### `folders`

**Type:** `Array<{ name: string, id: string }>`

A list of workspace folders to pull texts from. When a folder is selected, all projects inside that folder are included at pull time. Each entry contains:

* `name` — The display name of the folder. Stored for readability only and not sent to the API.
* `id` — The unique folder identifier used by the CLI to resolve projects at pull time.

As with projects, if a folder is renamed in Frontitude the `name` here will be stale until you re-run `frontitude source set`.

#### `xliffVersion`

**Type:** `string` — `"1.2"` or `"2.0"`

Only relevant when `filePath` uses a `.xlf` or `.xliff` extension. Specifies which version of the XLIFF standard to use for the output file. Defaults to `"1.2"` if not set.

## Examples

#### Full example

```json
{
  "filePath": "./locales/strings.json",
  "library": true,
  "projects": [
    {
      "name": "Authentication feature",
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ],
  "folders": [
    {
      "name": "Mobile",
      "id": "79a64273-69c3-40bb-8a6a-5e405981707c"
    }
  ]
}
```

#### Minimal example

```json
{
  "filePath": "./strings.json",
  "library": false,
  "projects": [
    {
      "name": "My Project",
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ]
}
```

#### XLIFF output

```json
{
  "filePath": "./translations/strings.xlf",
  "xliffVersion": "1.2",
  "library": false,
  "projects": [
    {
      "name": "My Project",
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ]
}
```

## How it's generated

Running `frontitude init` walks you through an interactive setup:

1. **Select sources:** pick which projects, folders, or the Copy Library to pull texts from.
2. **Set output path:** choose the file path and format for the pulled strings.

The CLI writes your selections to `frontituderc.json`. To update your sources later without re-running the full init flow, use `frontitude source set`.

## Working with multiple config files

{% hint style="info" %}
Available from CLI version 1.4.0 and above.
{% endhint %}

By default the CLI reads `frontituderc.json` from the directory you run it in. The `--config <path>` flag points it at a different config file instead. The path can be absolute or relative, and the flag works on every command (`pull`, `push`, `init`, and so on).

Relative `filePath` values inside the config file are resolved against that file's own directory, so `--config` behaves exactly as if you had changed into that directory before running the CLI. Each invocation uses exactly one config file; to drive several, run the CLI once per file and let an npm script handle the orchestration.

### Monorepo: one install, many packages

Install the CLI once at the repository root and give each package its own config file (`packages/<name>/frontituderc.json`). A root npm script can then pull or push every package in one command:

```json
{
  "scripts": {
    "i18n:pull:web": "frontitude pull --config packages/web/frontituderc.json",
    "i18n:pull:mobile": "frontitude pull --config packages/mobile/frontituderc.json",
    "i18n:pull:admin": "frontitude pull --config packages/admin/frontituderc.json",
    "i18n:pull": "npm run i18n:pull:web && npm run i18n:pull:mobile && npm run i18n:pull:admin"
  }
}
```

### Multiple config profiles in one project

The same mechanism lets a single project keep several strings files side by side — for example a workspace-level Copy Library alongside a project-scoped file, or one file per project. Create a config file per profile and point `--config` at each in turn:

```json
{
  "scripts": {
    "i18n:pull:library": "frontitude pull --config frontituderc.library.json",
    "i18n:pull:app": "frontitude pull --config frontituderc.app.json",
    "i18n:pull": "npm run i18n:pull:library && npm run i18n:pull:app"
  }
}
```

Config files in the same directory are fully independent — they can target different projects, the Copy Library, or different output files without interfering with each other.

> **Note:** To create a new config file at a specific path, run `frontitude init --config path/to/frontituderc.json`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.frontitude.com/developer-cli/configuration-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
