---
title: "Infisical Token"
description: "How to use Infisical service token within the CLI."
---

Prerequisite: [Infisical Token and How to Generate One](/documentation/platform/token).

It's possible to use the CLI to sync environment variables without manually entering login credentials by using a service token in the prerequisite link above.

## Feeding Infisical Token to the CLI

The CLI looks out for an environment variable called the `INFISICAL_TOKEN` which you can set depending on where you run the CLI. If `INFISICAL_TOKEN` is detected by the CLI, it will authenticate and retrieve the environment variables which the token is authorized for.

A common use-case is to use the Infisical Token to fetch environment variables with Docker. More specifically, a token can be passed to a container as an environment variable for the CLI to authenticate and pull its corresponding secrets. Check out the integration guides for that:

- [Docker](../../integrations/platforms/docker)
- [Docker Compose](../../integrations/platforms/docker-compose)

<Info>
  Once the token is expired, the CLI using it will no longer be able to make
  requests with it.
</Info>
