Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
By integrating the Intlayer MCP Server to your favourite AI assistant can retrieve all the doc directly from ChatGPT, DeepSeek, Cursor, VSCode, etc.
See MCP Server docIf 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
Intlayer CLI Login Command
Description
The login command of the Intlayer CLI allows you to authenticate with the Intlayer CMS. This command automatically opens your default browser to complete the authentication process and receive the necessary credentials (Client ID and Client Secret) to use Intlayer services.
Usage
npx intlayer login [options]or
intlayer login [options]Options
--cms-url <url>
Specify the URL of the Intlayer CMS to connect to for authentication.
- Type: string
- Default: The value configured in intlayer.config.* or https://intlayer.org
- Example:
npx intlayer login --cms-url https://intlayer.orgConfiguration Options
You can also use common configuration options:
- --env-file <path>: Path to the environment file
- -e, --env <env>: Execution environment
- --base-dir <dir>: Base directory of the project
- --verbose: Enable detailed output (default: true)
- --prefix <prefix>: Prefix for logs
How It Works
- Local Server Start: The command starts a local HTTP server on a random port to receive credentials from the CMS
- Browser Opening: The command automatically opens your default browser to the CMS login URL
- Authentication: Complete authentication in the browser using your Intlayer account
- Credentials Reception: The local server receives the Client ID and Client Secret from the CMS
- Instructions: The command displays instructions for configuring credentials in your project
Output
After a successful login, the command will display:
- The received credentials (Client ID and Client Secret)
- Instructions for the .env file:
INTLAYER_CLIENT_ID=your_client_idINTLAYER_CLIENT_SECRET=your_client_secret- Instructions for the Intlayer configuration file:
{ editor: { cmsURL: 'https://intlayer.org', clientId: process.env.INTLAYER_CLIENT_ID, clientSecret: process.env.INTLAYER_CLIENT_SECRET, },}Manual Configuration
If the browser doesn't open automatically, you can manually visit the URL displayed in the terminal.
Examples
Login with Custom CMS URL
npx intlayer login --cms-url https://custom-cms.example.comLogin with Specific Environment File
npx intlayer login --env-file .env.productionLogin in Verbose Mode
npx intlayer login --verboseTroubleshooting
Browser Doesn't Open
If the browser doesn't open automatically, copy the URL displayed in the terminal and open it manually in your browser.
Connection Issues
If you encounter connection issues, verify:
- That the CMS URL is correct
- That your internet connection is working properly
- That there are no firewalls blocking the connection
Credentials Not Received
If credentials are not received:
- Make sure you completed the authentication process in the browser
- Verify that the local port is not blocked
- Try the command again
Next Steps
After completing the login:
- Add the credentials to your .env file
- Configure your intlayer.config.* file with the credentials
- Use CLI commands to manage your dictionaries:
- npx intlayer push - Push dictionaries to the CMS
- npx intlayer pull - Pull dictionaries from the CMS
- npx intlayer fill - Fill missing translations