Skip to content

YakuCheck documentation

YakuCheck checks the Japanese in your next-intl / i18next message files. You can use it now in the browser (Try it now), via the API and over MCP. AI translation and review run only when you provide an API key. The GitHub Action and the npm CLI are coming soon.

Quick start

  1. Try it now: paste en.json and ja.json and check them (no account; runs in your browser and sends nothing).
  2. Sign up free, create a key and use the API or MCP below to check, translate and review (1,000 AI keys/month free).
  3. The GitHub Action and the CLI are coming soon. Once released, adding the YAML below gives you PR annotations and suggestions.

GitHub Action (coming soon)

Coming soon. The following describes how it will work once released.

# .github/workflows/yakucheck.yml
name: yakucheck
on: pull_request
permissions:
  contents: read
  pull-requests: write   # PR に直した案を付ける / post suggestions
jobs:
  ja:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: SBGGCSAIX1/yakucheck-action@v1
        with:
          source: messages/en.json
          target: messages/ja.json
          src: app,components     # キーが使われる場所 / where keys are used
          # api-key: ${{ secrets.YAKUCHECK_API_KEY }}   # AI review (optional)

uses: SBGGCSAIX1/yakucheck-action@v1. A single bundled node20 file that loads no third-party code at runtime. Pin @v1 or a commit SHA.

inputdefaultdescription
source / targetsource and Japanese files
filespattern with {lang} (public/locales/{lang}/*.json)
srcapp,src,components,pages,libwhere keys are used (role detection, read locally)
config.yakucheck.jsonconfig file
langenlanguage of messages (en/ja)
fail-onerrorerror / warning / never
commenttruepost summary + inline suggestions
api-keyAI review / translation (optional)
reviewtruewith a key, AI-review changed keys
translatefalsewith a key, translate missing keys into the summary
writefalsewrite translations to the file (commit in a later step)

Outputs: errors, warnings, suggestions. On PRs from forks the token is read-only, so you get annotations and the job summary only.

CLI (coming soon)

Coming soon on npm. The following describes how it will work once released.

npx yakucheck check                       # rules only, offline, free
npx yakucheck check --reporter sarif > yakucheck.sarif
YAKUCHECK_API_KEY=ykc_live_... npx yakucheck translate --write   # fill missing keys
YAKUCHECK_API_KEY=ykc_live_... npx yakucheck review              # AI review

Reporters: text (default), json, sarif (code scanning), github (annotations), markdown. Exit code 1 when findings exceed --fail-on.

npx yakucheck init writes a config and a workflow.

Config (.yakucheck.json)

{
  "files": "messages/{lang}.json",
  "sourceLang": "en",
  "targetLang": "ja",
  "src": [
    "app",
    "components"
  ],
  "keepTerms": [
    "GitHub",
    "Stripe"
  ],
  "glossary": {
    "workspace": "ワークスペース"
  },
  "ignoreKeys": [
    "legal.*"
  ],
  "rules": {
    "JA109": "off"
  }
}
  • keepTerms:terms kept as-is (product names). Not flagged as untranslated; YC204 if missing from the translation
  • glossary:fixed translations; YC203 when not used
  • style:auto / desu-masu / plain
  • rules:per-rule severity (error, warning, info, off)

UI role detection

YakuCheck scans src for t("key"), useTranslations("Ns"), useTranslation() and <Trans i18nKey>, and infers the role from the surrounding code: inside <button>/<Button> = button, toast.success() = toast, toast.error()/throw new Error()/setError() = error, <h1>–<h3>/<DialogTitle> = heading, placeholder= = placeholder, aria-label=/<label> = label. Otherwise it falls back to key names (errors.*, *.title, cta.*).

API

Auth: Authorization: Bearer ykc_live_.... OpenAPI

POST /api/v1/checkrule checks (not counted)
POST /api/v1/translateAI translation (counts keys, up to 500 per call)
POST /api/v1/reviewAI review (counts keys)
GET /api/v1/usageusage this month
GET /api/v1/pingverify key
curl -X POST https://yakucheck.com/api/v1/check \
  -H "Authorization: Bearer $YAKUCHECK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source":{"close":"Close","saved":"Saved"},
       "target":{"close":"近い","saved":"保存済み"},
       "roles":{"saved":{"role":"toast"}}}'
curl -X POST https://yakucheck.com/api/v1/translate \
  -H "Authorization: Bearer $YAKUCHECK_API_KEY" -H "Content-Type: application/json" \
  -d '{"items":[{"key":"toolbar.save","source":"Save","role":"button"},
               {"key":"editor.saved","source":"Saved","role":"toast"}],
       "keepTerms":["GitHub"],"product":"A project management app for small teams"}'
# → {"items":[{"key":"toolbar.save","ja":"保存","status":"ok","issues":[]}, ...],
#    "usage":{"counted":2,"used":2,"limit":1000}}

AI output is checked for placeholders and rules before it is returned. Proposals that fail come back as status "needs_review" (see issues). Keys the AI could not process are "failed" and not counted.

MCP

Streamable HTTP (JSON-RPC 2.0). Tools: check_translations, translate_keys, review_translations, list_rules, get_usage (read-only / proposals).

{
  "mcpServers": {
    "yakucheck": {
      "type": "http",
      "url": "https://yakucheck.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ykc_live_..."
      }
    }
  }
}
claude mcp add --transport http yakucheck https://yakucheck.com/api/mcp --header "Authorization: Bearer ykc_live_..."

Limits

  • AI: 1,000 keys/month free, 5,000 on Pro (JST months). Over the limit: 429 quota_exceeded.
  • 120 requests per minute per key (429 rate_limited with Retry-After).
  • Up to 2 MB and 20,000 keys per file; 2,000 characters per string (AI).

Data handling

Rule checks send nothing. AI receives only keys, strings and role names; nothing is stored or used for training. See Data handling & security.

23 rules. See all