PTC is your expert AI translator. It learns your app, researches unclear texts, translates in your own style and tests the results.
Your agent needs both: the PTC MCP and this CLI (the agent runs it to scan your repo and report what it finds). There is no MCP-only path. Tested with Claude Code; any agent that speaks MCP and can run a shell command should work.
Sign up to PTC and open PTC's agent token page (https://app.ptc.wpml.org/dashboard/agent-tokens). Your agent token is yours (one per user): PTC mints it the first time you need it, and you can only rotate it, never add a second one. It is how your agent identifies itself to PTC.
The MCP endpoint is https://app.ptc.wpml.org/mcp.
Copy the setup for your agent from the agent token page: it has a ready block for Claude Code, Cursor, VS Code and any other MCP client, with your token already filled in. Paste it as it is.
Codex — first export PTC_API_TOKEN in your shell with the value the agent
token page shows you (Codex reads the token from that variable), then:
codex mcp add ptc --url https://app.ptc.wpml.org/mcp --bearer-token-env-var PTC_API_TOKENFrom the repository root:
mkdir -p .ptc/bin && curl -fsSL https://app.ptc.wpml.org/cli/ptc-cli.sh -o .ptc/bin/ptc-cli.sh && chmod +x .ptc/bin/ptc-cli.shEvery ptc command in these docs is .ptc/bin/ptc-cli.sh run from the
repository root (alias it as ptc if you like). .ptc/ is the CLI's own
git-ignored folder, so later syncs reuse the script with no reinstall.
Needs bash and curl; the agent commands also need python3 (>= 3.6).
Then save your agent token for the CLI yourself (your agent asks you to; the token never goes through it):
.ptc/bin/ptc-cli.sh auth loginIt signs you in through the browser: it prints a link and a code (and opens
the link), you approve the code on PTC, signed in as yourself, and the CLI
receives your agent token; you type no token and nothing is shown. On a machine
with no browser, open the link on any device. --paste pastes the token from
the agent token page instead (nothing is shown as you paste), and a token piped
on stdin is read as before. It checks the token with PTC and saves it, readable
by you only (mode 600), to
%APPDATA%\ptc\credentials on Windows (Git Bash, MSYS, Cygwin) or
~/.config/ptc/credentials elsewhere ($XDG_CONFIG_HOME/ptc/credentials when
set). A token PTC refuses is not saved. PTC_API_TOKEN or PTC_AGENT_TOKEN in
the environment, or --api-token, still win over the file.
Localize this app into German and Spanish with PTC.
That is the whole instruction. PTC guides your agent through the rest.
- Your agent scans the repository (
ptc scan). PTC learns the app, its features and its terminology. - PTC asks you only what the code can't answer. The questions arrive in your agent's chat; decisions such as which languages to translate into stop the run until you answer. PTC shows the price and waits for a yes before any paid work; a trial continues within its free cap.
- PTC translates with your terminology and reviews every language in your app's context.
- Before delivering, PTC asks whether you want the translations as a merge request (PTC set up in your CI) or via the API. Answer merge request and PTC hands your agent the CI file with that answer; the agent adds it to your repository (see CI). Answer API and your agent delivers with
ptc sync.
- Agent commands: how PTC drives your agent, and the CLI commands it runs along the way.
- CLI reference: usage, options, configuration file, workflow, exit codes, troubleshooting.
- CI: pinning the CLI, GitHub Actions, GitLab CI.
MIT License