Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs(secrets-mgmt): audit quickstart

Adrian Kahali3ba5959ab942
diff --git a/docs/documentation/platform/secrets-mgmt/quick-starts/assets/key-value-fields.png b/docs/documentation/platform/secrets-mgmt/quick-starts/assets/key-value-fields.png
new file mode 100644
index 0000000000..68902ff8f9
Binary files /dev/null and b/docs/documentation/platform/secrets-mgmt/quick-starts/assets/key-value-fields.png differ
diff --git a/docs/documentation/platform/secrets-mgmt/quick-starts/assets/new-project.png b/docs/documentation/platform/secrets-mgmt/quick-starts/assets/new-project.png
new file mode 100644
index 0000000000..4cb3703ab0
Binary files /dev/null and b/docs/documentation/platform/secrets-mgmt/quick-starts/assets/new-project.png differ
diff --git a/docs/documentation/platform/secrets-mgmt/quick-starts/assets/review-secrets.png b/docs/documentation/platform/secrets-mgmt/quick-starts/assets/review-secrets.png
new file mode 100644
index 0000000000..84ce1c229d
Binary files /dev/null and b/docs/documentation/platform/secrets-mgmt/quick-starts/assets/review-secrets.png differ
diff --git a/docs/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret.mdx b/docs/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret.mdx
index ace0e3b934..5d2bbbd72d 100644
--- a/docs/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret.mdx
+++ b/docs/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret.mdx
@@ -1,67 +1,158 @@
---
-title: "Deliver Your First Secret"
-sidebarTitle: "Deliver First Secret"
+title: "Deliver your first secret"
description: "Store a secret in Infisical and inject it into an application in under 10 minutes."
---
-This quickstart walks you through the core secrets management workflow. You'll create a [project](/documentation/platform/secrets-mgmt/project), add a secret to an environment, and inject it into an application with the [Infisical CLI](/cli/overview), replacing your `.env` file.
+This quickstart guide walks you through the core secrets management workflow. You'll create a [project](/documentation/platform/secrets-mgmt/project), add a secret to one of its environments, and inject the secret into an application using the [Infisical CLI](/cli/overview), all without needing a `.env` file.
-## Prerequisites
+<Info>
+Prerequisites:
- An Infisical account on [Infisical Cloud](https://app.infisical.com) or a [self-hosted instance](/self-hosting/overview)
+- The [Infisical CLI](/cli/overview) installed for your platform
- An application or script you run locally
+</Info>
-<Steps>
- <Step title="Create a Project">
- A project holds all secrets for one application or service, split across environments.
+## Step 1: Create a project
- 1. Log in to [Infisical](https://app.infisical.com)
- 2. Click **Create Project** and give it a name (e.g., `orders-service`)
+In Infisical, a [project](/documentation/platform/secrets-mgmt/project) holds all secrets for one application or service. To create a project:
- Every new project starts with three environments: **Development**, **Staging**, and **Production**.
+<Steps>
+ <Step>
+ Log in to [Infisical](https://app.infisical.com).
</Step>
- <Step title="Add a Secret">
- 1. On the **Secrets Overview** page, click into the **Development** environment
- 2. Click **Add Secret** and enter a key and value (e.g., `DB_PASSWORD`)
-
- <Tip>
- Migrating an existing app? Drag and drop your `.env` file onto the dashboard to import all of its secrets at once.
- </Tip>
+ <Step>
+ Select **Secrets Management** > **+ Add New Project**.
</Step>
- <Step title="Install the CLI and Log In">
- Install the [Infisical CLI](/cli/overview) for your platform, then authenticate:
+ <Step>
+ In the **Project Name** field, enter a name for the project (e.g., `orders-service`).
+ </Step>
+</Steps>
- ```bash
- infisical login
- ```
+This opens your new project in the **Development** environment:
- Your browser opens to complete the login.
+<Frame>
+ ![New project](./assets/new-project.png)
+</Frame>
- <Note>
- In a containerized environment such as WSL 2 or Codespaces, run `infisical login -i` to avoid browser-based login.
- </Note>
- </Step>
- <Step title="Connect Your Project">
- In your application's directory, link it to the Infisical project you created:
+<Note>
+ Within a project, secrets are organized across [environments](/documentation/platform/secrets-mgmt/project#project-environments). Every new project starts with three environments: **Development**, **Staging**, and **Production**.
+</Note>
+
+## Step 2: Add a secret
+
+You have two options for adding secrets to your project:
+
+<Tabs>
+ <Tab title="Create a brand new secret">
+ To create a new secret from scratch:
+
+ <Steps>
+ <Step>
+ Select **+ Add a New Secret**.
+ </Step>
+ <Step>
+ In the **Key** and **Value** fields, enter the key-value pair for your secret. For example:
+
+ <Frame>
+ ![Key and Value fields](./assets/key-value-fields.png)
+ </Frame>
+ </Step>
+ <Step>
+ Select **Create Secret**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="Import secrets from an existing file">
+ To import secrets from an existing file:
+
+ <Steps>
+ <Step>
+ Drag and drop the file containing your secrets (or enter the file's contents manually by selecting **Paste Secrets**).
+ </Step>
+ <Step>
+ Review the discovered secrets. For example:
+
+ <Frame>
+ ![Review secrets](./assets/review-secrets.png)
+ </Frame>
+ </Step>
+ <Step>
+ Select **Upload Secrets**.
+ </Step>
+ </Steps>
+ </Tab>
+</Tabs>
+
+## Step 3: Authenticate with the CLI
+
+Next, authenticate with the Infisical CLI by running [`infisical login`](/cli/commands/login):
+
+```bash
+infisical login
+```
+
+This prompts you to select your hosting option, then opens your browser to complete the login.
+
+<Note>
+ In a containerized environment such as WSL 2 or Codespaces, run `infisical login -i` to avoid browser-based login.
+</Note>
+
+## Step 4: Connect your project
+
+Now that the CLI is authenticated, you can connect your application to your Infisical project:
+
+<Steps>
+ <Step>
+ In your application's directory, link it to the Infisical project you created by running [`infisical init`](/cli/commands/init):
```bash
infisical init
```
-
- This writes a `.infisical.json` file with [local project settings](/cli/project-config). It contains no secrets and is safe to commit.
</Step>
- <Step title="Inject Secrets into Your App">
- Start your application through the CLI. Infisical fetches the secrets for the environment and injects them as environment variables:
-
- ```bash
- # e.g., npm run dev, flask run, go run main.go
- infisical run --env=dev -- <your start command>
+ <Step>
+ Follow the prompts to select the organization/project where you created your secret earlier. This writes a `.infisical.json` file to your project with [local project settings](/cli/project-config):
+
+ ```json .infisical.json
+ {
+ "workspaceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
+ "defaultEnvironment": "",
+ "gitBranchToEnvironmentMapping": null
+ }
```
- Your application reads `DB_PASSWORD` from its environment like any other variable. No `.env` file needed.
+ <Note>
+ `.infisical.json` files contain no secrets and are safe to commit to version control systems like git.
+ </Note>
</Step>
</Steps>
+## Step 5: Inject the secret into your app
+
+Now that your Infisical project is configured, Infisical can provide your application with the secret it needs.
+
+Start your application by wrapping its start command with [`infisical run`](/cli/commands/run):
+
+<CodeGroup>
+ ```bash Node.js
+ infisical run --env=dev -- npm run dev
+ ```
+
+ ```bash Flask
+ infisical run --env=dev -- flask run
+ ```
+
+ ```bash Go
+ infisical run --env=dev -- go run main.go
+ ```
+</CodeGroup>
+
+Infisical fetches the secret and injects it as an environment variable. This lets your application read the secret from its environment at runtime.
+
+<Check>
+ You can now manage your application's secrets through Infisical without needing a `.env` file.
+</Check>
+
## Next Steps
<CardGroup cols={2}>