Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "init only installs the packages and sets up the framework; add one sub-command per setup step; --interactive fails without a terminal"v9.5.1329/09/2026
- "Add init infra sub-command"v9.5.621/09/2026
- "Added --no-gitignore option"v8.6.431/03/2026
- "Added init command content"v7.5.930/12/2025
The content of this page was translated using an AI.
See the last version of the original content in EnglishIf you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
Initialise Intlayer
Copy the code to the clipboard
The init command installs the Intlayer packages and sets up your framework (configuration file, TypeScript, bundler plugin, middleware/proxy, providers). It's the recommended way to get started with Intlayer.
Everything else (CI workflows, AI skills, MCP server, editor tooling, lint rules, CMS, infrastructure) is opt-in: pick it from the --interactive checklist, or run its dedicated sub-command (see below).
Aliases:
npx intlayer init
Arguments:
--project-root [projectRoot]- Optional. Specify the project's root directory. If not provided, the command will search for the project root starting from the current working directory.--no-gitignore- Optional. Skips the automatic update of the.gitignorefile. If this flag is set,.intlayerwill not be added to.gitignore.--no-framework-setup- Optional. Only install the packages, without touching the project files.--routing <routing>- Optional. Locale routing:prefix-no-default(default),prefix-all,no-prefix,search-paramsornone.-i, --interactive- Optional. Pick the setup steps from a checklist (packages, CI, skills, MCP, VS Code, LSP, lint, CMS, infrastructure, …) instead of running the default set. Needs a terminal: without one (AI agent, CI), the command fails and lists the sub-commands to run instead.--no-github-actions- Optional. With--interactive, never scaffold the GitHub Actions workflows, even if selected.
What it does:
The init command performs the following setup tasks:
- Validates project structure - Ensures you are in a valid project directory with a
package.jsonfile. - Installs the packages - Installs the missing Intlayer packages for your stack (e.g.
react-intlayer,vite-intlayer) and upgrades the outdated ones. - Updates
.gitignore- Adds.intlayerto your.gitignorefile to exclude generated files from version control (can be skipped with--no-gitignore). - Configures TypeScript - Updates any
tsconfig.jsonfiles to include the Intlayer type definitions (.intlayer/**/*.ts). - Creates configuration file - Generates
intlayer.config.ts(for TypeScript projects) orintlayer.config.mjs(for JavaScript projects) with default settings. - Updates the bundler / framework config - Adds the Intlayer plugin to your Vite, Next.js, Nuxt, Astro, … configuration, and scaffolds the middleware/proxy and providers when the framework supports it.
Set up one step at a time
Every step of the --interactive checklist has its own sub-command. They never prompt when their values are passed as flags, so they are safe to run from an AI agent or a CI job.
Open the table in a modal to view all data content clearly
| Command | What it sets up |
|---|---|
intlayer init packages | Installs the missing Intlayer packages and upgrades the outdated ones |
intlayer init project [--routing <routing>] | Configuration file, TypeScript, bundler plugin, middleware/proxy, providers and .gitignore |
intlayer init github-actions | The fill and test GitHub Actions workflows |
intlayer init vscode-extension | Recommends the Intlayer extension in .vscode/extensions.json |
intlayer init lsp | The Intlayer language server in .vscode/settings.json |
intlayer init eslint | The Intlayer lint rules (ESLint / oxlint), when the project already lints |
intlayer init skills [--platform <platform>] [--skills <skills…>] | The Intlayer documentation as AI agent skills |
intlayer init mcp [--platform <platform>] [--transport <stdio/sse>] | The Intlayer MCP server |
intlayer init extension [--browser <chrome/firefox>] | Opens the store page of the Intlayer browser extension |
intlayer init cms | Logs in to the Intlayer CMS through your browser and stores the credentials in .env |
intlayer init infra --mode <desktop/docker/compose> | The desktop app or a self-hosted stack |
From an AI agent or a CI job
An AI agent's shell has no terminal, so a prompt cannot be answered. Use the default command, then the sub-commands you need:
Copy the code to the clipboard
Without a terminal:
init skillsinstalls the skills matching your stack unless--skillsis set (e.g.--skills Usage Content React).init skillsandinit mcpuse the detected AI platform (Claude Code, Cursor, VS Code, Windsurf, …) unless--platformis set, and fail with the list of platforms when none is detected.init mcpuses thestdiotransport unless--transportis set.init infrarequires--mode, andinit extensiononly prints the store links unless--browseris set.
The MCP server is always configured inside the project (for Claude Code, in .mcp.json).
Examples:
Basic initialisation:
Copy the code to the clipboard
This initialises Intlayer in the current directory, with automatic project root detection.
Initialisation with a custom project root:
Copy the code to the clipboard
This initialises Intlayer in the specified directory.
Initialisation without updating .gitignore:
Copy the code to the clipboard
This will set up all configuration files but will not modify your .gitignore file.
Set up the infrastructure (desktop app or self-hosting):
Copy the code to the clipboard
Downloads and runs the hosted installer (https://intlayer.org/install.sh, or install.ps1 on Windows), which asks how you want to run Intlayer:
- Desktop app - installs the native dashboard on your machine, connected to the Intlayer Cloud.
- All-in-one Docker - dashboard + API + MongoDB + Redis + MinIO in a single container.
- Docker Compose - one container per service, for scalable self-hosting.
Skip the menu with --mode:
Copy the code to the clipboard
The same step is offered by npx intlayer init --interactive. See the init infra reference for the installer settings, and the self-hosting guide for what each mode sets up.
Output Example:
Copy the code to the clipboard
Notes:
- The command is idempotent - you can safely run it multiple times. Already configured steps will be automatically skipped.
- If a configuration file already exists, it will not be overwritten.
- TypeScript configurations without an
includearray (e.g. solution-style configurations with references) are skipped. - The command stops with an error if no
package.jsonis found in the project root.
