Author:
    Creation:2026-09-23Last update:2026-11-13

    Upgrade Intlayer Packages

    bash
    npx intlayer upgrade
    

    The upgrade command lists the Intlayer packages declared in every package.json of your project, including monorepo workspaces, and upgrades them to the latest published version: framework integrations, eslint-plugin-intlayer, prettier-plugin-intlayer, intlayer-editor, @intlayer/mcp and every other @intlayer/* package. It then brings the tooling around them up to date.

    Arguments:

    • --project-root [projectRoot] - Optional. The project root directory. By default, the command starts from the nearest package.json above the current working directory.
    • --dry-run - Optional. Lists the packages and their target version without modifying any file.
    • --tag <tag> - Optional. The npm dist-tag to upgrade to (for example canary). Defaults to latest.
    • --no-eslint - Optional. Do not install or register the Intlayer lint rules.
    • --no-prettier - Optional. Do not install or register the Intlayer Prettier plugin.

    What it does:

    1. Lists the Intlayer packages - Scans every package.json of the project (skipping node_modules and build outputs) for intlayer, @intlayer/*, *-intlayer and intlayer-* dependencies and dev dependencies.
    2. Fetches the target version - Reads the version of the selected dist-tag (latest by default) of each package from the npm registry.
    3. Rewrites the ranges - Updates each outdated range in place, keeping its operator (^, ~ or none) and the file indentation.
    4. Installs once - Runs a single install from the workspace root (the nearest directory with a lock file), using the package manager that owns the lock file:
    Lock fileCommand
    bun.lock / bun.lockbbun install
    pnpm-lock.yamlpnpm install
    yarn.lockyarn install
    package-lock.json or no locknpm install

    If there is no lock file, the packageManager field of package.json (for example "bun@1.2.0") is used before falling back to npm.

    Ranges that do not point to the registry, such as workspace:*, file:, link:, catalog: or git URLs, are never modified.

    1. Lint and Prettier plugins - When the project lints with ESLint / oxlint or formats with Prettier, installs eslint-plugin-intlayer / prettier-plugin-intlayer if missing and registers them: ...intlayer.configs.recommended in the ESLint flat config, the rules in .oxlintrc.json, and the plugin in the Prettier config (JSON, YAML, JavaScript or TypeScript). A config whose shape cannot be edited safely gets the snippet to paste instead.
    2. MCP server - Points the stdio Intlayer MCP entries of the project (.mcp.json, .cursor/mcp.json, .vscode/mcp.json…) at @intlayer/mcp@<tag>, so npx starts the upgraded server instead of a cached copy.

    Examples:

    List the available upgrades without applying them:

    bash
    npx intlayer upgrade --dry-run
    

    Upgrade to the canary release:

    bash
    npx intlayer upgrade --tag canary
    

    Example output:

    bash
    npx intlayer upgrade
    Intlayer packages:
      package.json
        intlayer ^9.0.0 → ^9.5.7
      apps/web/package.json
        next-intlayer ^9.5.7 (latest)
        vite-intlayer ~9.2.0 → ~9.5.7
    Running bun install...
    ✓ Upgraded 2 Intlayer dependencies to latest
    

    Notes:

    • Run the command from the root of your repository to upgrade every workspace. Run it from a workspace to upgrade that workspace only.
    • Packages whose version cannot be fetched (offline, private or unpublished package) are listed and left unchanged.
    • If the install fails, the upgraded ranges are kept in package.json. Run your package manager's install command manually.