Canonical: https://thehedgeling.com/docs/agents
Language: en-US

[Documentation](https://thehedgeling.com/docs)

# Hedgeling for coding agents

Hedgeling extracts user-facing strings from source code, wraps supported code at build time, and produces translation artifacts. A coding agent can use the CLI to inspect an application, prepare its catalog, and help a developer review the changes.

Start with the CLI workflow below. MCP is another integration option for environments that already have access to Hedgeling's server packages.

## Prerequisites and product fit

Use Node.js 20 or later, a source checkout, and a Hedgeling seat token. The `@hedgeling/i18n` package installs from Hedgeling's own registry, and every plan, including Free, comes with at least one seat. See [plans and pricing](https://thehedgeling.com/#pricing).

Hedgeling supports extraction from React, Vue, Svelte, Angular, JavaScript/TypeScript, HTML, JSON resources, C#, and XAML. Build-time wrapping varies by framework. Extraction results need review: user-facing strings and program identifiers can look similar.

Install with the seat token from your workspace. Keep seat tokens and translation-provider credentials in private environment or package-manager configuration.

## A CLI workflow for agents

Run commands from the application's root after configuring `.hedgeling/extract.config.json`. The [React + Vite guide](https://thehedgeling.com/docs/react-vite) includes a minimal configuration.

```
npm install @hedgeling/i18n
npx hedgeling extract --json
npx hedgeling diagnostics --json
npx hedgeling extract --write
npx hedgeling translate --no-mt
npx hedgeling check
```

| Command | What to expect |
| --- | --- |
| `extract --json` | Inspect extracted candidates before choosing to write the source catalog. Extraction may update its local cache. |
| `diagnostics --json` | Inspect extraction issues and cases requiring manual treatment. |
| `extract --write` | Write the source catalog and extraction artifacts. Review the Git diff. |
| `translate --no-mt` | Compile state and runtime artifacts without machine-translation calls. Missing translations fall back to source copy. |
| `check` | Run the read-only quality gate. Exit 0 means pass, 1 means a check failed, and 2 means configuration or entitlement needs attention. |

Ordinary `translate` can send source content to the configured provider and incur usage charges. Agree on scope and budget before starting it. Do not treat generated drafts as reviewed translations. Connected projects may contact the console for entitlement and synchronization behavior even when machine translation is disabled.

Before delivering a change, inspect the catalog and diagnostics, review the diff, build the application, and verify the chosen languages in the UI.

## MCP integration: available adapters

The repository includes two private packages using stdio transport. These are not advertised as publicly installable npm packages or as an anonymous hosted MCP endpoint.

- `@hedgeling/mcp-server` provides workspace extraction and translation tools, including `extract_and_translate`, `get_status`, and `import_translations`, alongside console tools.

- `@hedgeling/platform-mcp` adapts the shared platform action contract. It does not contain the workspace extraction engine or a human approval endpoint.

If you have an authorized source checkout and have built the selected package, configure your MCP client to launch Node with the built entry file. Set the working directory to the intended application for workspace tools. Client configuration formats differ; this describes the process settings, not a universal client configuration file.

```
Command: node
Argument: /absolute/path/to/hedgeling/packages/mcp-server/dist/index.js
Working directory: /absolute/path/to/your-application
```

Console actions additionally require `HEDGELING_CONSOLE_URL` and a scoped `HEDGELING_CONSOLE_TOKEN` in the private process environment. Obtain connection details from your administrator. Never put the bearer token in frontend code, Markdown, or a shared MCP configuration.

`extract_and_translate` writes artifacts and may invoke a translation provider. `import_translations` records verified human translations, so use it only for work that has actually been reviewed. Console actions remain subject to server permissions and confirmation rules; an external agent cannot approve itself as a human.

## Evaluate before adopting

Use a representative repository sample and inspect false positives as well as missing strings. Read [how to evaluate extraction](https://thehedgeling.com/docs/evaluate-extraction) and the [published benchmark methodology](https://thehedgeling.com/benchmarks/RESULTS.html). Benchmark results describe those runs, not guaranteed performance on every codebase.

[Read this guide as Markdown](https://thehedgeling.com/docs/agents.md)
