Receive notifications about upcoming Intlayer releases
    Creation:2025-12-16Last update:2025-12-16

    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.org

    Configuration 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

    1. Local server start: The command starts a local HTTP server on a random port to receive credentials from the CMS

    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.org

    Configuration 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 verbose output (default: true)
    • --prefix <prefix>: Prefix for logs

    How It Works

    1. Local Server Start: The command starts a local HTTP server on a random port to receive credentials from the CMS.
    2. Browser opening: The command automatically opens your default browser to the CMS login URL
    3. Authentication: Complete the authentication in the browser using your Intlayer account
    4. Credentials reception: The local server receives the Client ID and Client Secret from the CMS
    5. Instructions: The command displays instructions for configuring credentials in your project

    Output

    After a successful login, the command will display:

    1. The received credentials (Client ID and Client Secret)
    2. Instructions for the .env file:
    INTLAYER_CLIENT_ID=your_client_idINTLAYER_CLIENT_SECRET=your_client_secret
    1. 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 does not 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.com

    Login with Specific Environment File

    npx intlayer login --env-file .env.production

    Login in Verbose Mode

    npx intlayer login --verbose

    Troubleshooting

    Browser Doesn't Open

    If the browser does not open automatically, copy the URL displayed in the terminal and open it manually in your browser.

    Connection Issues

    If you encounter connection issues, verify:

    1. That the CMS URL is correct
    2. That your internet connection is working correctly
    3. That no firewalls are blocking the connection

    Credentials Not Received

    If credentials are not received:

    1. Ensure you have completed the authentication process in the browser
    2. Verify that the local port is not blocked
    3. Try the command again

    Next Steps

    After completing the login:

    1. Add the credentials to your .env file
    2. Configure your intlayer.config.* file with the credentials
    3. Use CLI commands to manage your dictionaries:

    See Also

    Receive notifications about upcoming Intlayer releases