# Quickstart

seekrit is a zero-knowledge secrets manager: every secret is encrypted in your browser or CLI, so
the API only ever sees ciphertext. Getting started takes five steps — sign in, create your keys,
add a secret, mint a service token, then run `seekrit run -- <command>` to inject it into any
process.

> **Note:** **In a hurry, or an agent?** One command in your project directory does all of this without an
>   account: `npx -y @seekrit/cli init --org-name "Acme Storefront" --yes` signs up, saves a machine
>   credential, creates an app with a `development` environment, and writes `seekrit.json`. Then
>   `seekrit secrets set NAME --env development` and `seekrit run --env development -- <cmd>`. Add
>   `--invite you@example.com` to claim the workspace in the console later. Details in the
>   [CLI reference](/docs/reference/cli#seekrit-init).

## 1. Sign in

Open the [seekrit console](https://app.seekrit.dev) and sign in with **Google**, **GitHub**, or an
**email and password**. New here? Pick **Create an account** to sign up with your email — we'll send
a link to set your password. The first time you sign in, seekrit provisions your organization
automatically.

## 2. Set up your keys

You'll be prompted to create your encryption keys. The browser generates a P-256 keypair and
encrypts the private key with a passphrase you choose. Only your **public key** and the
**passphrase-encrypted** private key are uploaded.

> **Warning:** Your **passphrase is not your sign-in password.** It never reaches the server, so there is no
>   passphrase reset — if you forget it, your encrypted data cannot be recovered. Store it in a
>   password manager. (Your sign-in password, if you use email/password, *can* be reset by email.)

## 3. Create an app, environments, and a secret

In the console:

1. Create an **application** — say *Storefront*. The same dialog offers its environments
   (`development`, `staging`, `production` are pre-selected; deselect any, or add your own), so you
   land on a matrix that already has columns. Each environment's data key is generated in your
   browser and wrapped to your public key.
2. Add a secret such as `DATABASE_URL` with **Add secret** — pick which environments get it and the
   value is encrypted separately for each one. Only ciphertext is uploaded.

The application page keeps a short **Get this application running** checklist until you've done all
three of environments, secrets, and machine access — the third is the one that's easy to miss.

![An application page in the seekrit console: a matrix with one row per secret name and one column per environment, values revealed after unlocking](https://seekrit.dev/screenshots/original/dashboard-secrets-matrix.webp)

*What you end up with: one row per secret, one column per environment. Values are decrypted in the tab when you reveal them — a column with no service token yet is flagged in the header.*

## 4. Mint a service token

A **service token** is how machines and the CLI read secrets. Until one exists, each environment
column shows a **no token** warning — click it (or use the checklist's **mint token**, or the
environment page's **Access** panel) to mint one bound to that environment. The browser
auto-grants it the environment's key, plus the keys of any composed group, and shows the token
**once**. Copy it now.

```bash
export SEEKRIT_TOKEN=skt_…
```

> **Note:** A runtime token carries its own org, app, and environment, so the CLI needs no config file or
>   login to use it. It self-decrypts — no passphrase.

## 5. Inject secrets with the CLI

Install the CLI and let the token select everything at runtime:

```bash
npm install -g @seekrit/cli

seekrit run -- printenv DATABASE_URL       # inject into a process, then run it
seekrit export --format dotenv             # or print the resolved environment
```

Everything the token resolved was encrypted client-side. The API only ever returned ciphertext;
the CLI decrypted it locally with the key embedded in the token.

> **Note:** Working at your own terminal rather than wiring up a machine? Run `seekrit login` instead: it
>   opens the console, you authorize the device, and the CLI acts as *you* across every org you
>   belong to — no token to copy. See the [CLI guide](/docs/guides/cli).

## Next steps

- Understand the [encryption model](/docs/concepts/encryption)
- Run secrets in containers, CI, and agents with [`seekrit-run`](/docs/guides/run)
- Share config across apps with [environments & groups](/docs/guides/environments)
- Manage everything in the browser — the [web dashboard guide](/docs/guides/web-app)
- Browse the [CLI command reference](/docs/reference/cli)

## Common questions

### How do I get started with seekrit without signing up in a browser?

Run npx -y @seekrit/cli init --org-name <name> --yes in your project directory. It signs up, saves a machine credential, creates an app with a development environment, and writes seekrit.json, with no browser step. Add --invite you@example.com to claim the workspace in the console later.

### Does seekrit ever see my secret values in plaintext?

No. Secrets are encrypted in your browser or CLI before upload, so the API only ever stores and serves ciphertext. Decryption happens locally when you run seekrit run or seekrit export with a service token, using the key embedded in that token.

### What is a seekrit service token and where do I get one?

A service token (skt_...) is how machines and the CLI read secrets. It carries its own org, app, and environment, so it needs no login or config file, and it self-decrypts with no passphrase. Mint one from an environment's Access panel in the console and copy it immediately — it is shown once.

### How do I inject a secret into a command?

Set SEEKRIT_TOKEN to a service token, then run seekrit run -- <command> to decrypt that environment's secrets and inject them into the child process, or seekrit export --format dotenv to print the resolved values instead.

### What's the difference between seekrit login and a service token?

seekrit login opens the console in your browser, you authorize the device, and the CLI then acts as you across every org you belong to, with no token to copy. A service token is scoped to one app and environment instead, and is what CI and other machines should use.
