> ## Documentation Index
> Fetch the complete documentation index at: https://demoman.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# accounts.json

> Demo accounts Demoman signs in with, and where their secrets come from.

`.demoman/accounts.json` holds the demo accounts Demoman signs in with. Your
agent writes it when it creates a demo account ([Sign in](https://demoman.io/docs/get-started/sign-in.md)).
It holds no password. It stays on your machine until you
[add a flow](https://demoman.io/docs/get-started/add-to-repo.md) that signs in with it; commit it with
that flow.

```json theme={null}
{
  "accountsVersion": 1,
  "sites": {
    "http://localhost:4000": {
      "default": "seller",
      "accounts": {
        "seller": {
          "about": "A seller with 6 custom requests and no orders needing action",
          "checkUrl": "/admin/dashboard",
          "signIn": [
            { "do": "goto", "url": "/users/log-in" },
            { "do": "type", "into": { "role": "textbox", "name": "Email" }, "text": "seller@demo.test" },
            { "do": "type", "into": { "stableId": "user_password" }, "text": "{secret:SELLER_PASSWORD}" },
            { "do": "click", "on": { "role": "button", "name": "Log in" } }
          ]
        }
      }
    }
  }
}
```

| Field | Meaning |
| - | - |
| `accountsVersion` | `1` |
| `sites` | Keyed by origin |
| `default` | The account a run uses when its DemoScript names none |
| `accounts` | Keyed by name: lower-case letters, digits, `-` and `_`, at most 64 |
| `about` | Who the account is and what data it has, so an agent picks the right one |
| `checkUrl` | A path behind the login. Signed out it lands on the sign-in page; signed in it shows no password field |
| `signIn` | The steps that sign in, as a DemoScript's steps, starting with `goto` |
| `files` | Optional, at most 20. The repo paths that make the account, such as its seed script and a dev-only sign-in route, given from the repo's root. `setup --ci` adds any that are not committed to its pull request, so its check and CI have them. It stops on one that is missing or that git ignores. Demoman 0.9.9 and earlier refuse a file that has it |

## Secrets

`{secret:NAME}` in a step's `text` stands for a value Demoman reads from
`DEMOMAN_SECRET_NAME` in the environment, else from `.demoman/secrets.env`
(only when git ignores that file). A value is at least 8 characters, and is
typed only with `DEMOMAN_SECRET_NAME_ORIGIN` beside it, naming the account's
site.

```bash theme={null}
# .demoman/secrets.env (git-ignored)
DEMOMAN_SECRET_SELLER_PASSWORD=…
DEMOMAN_SECRET_SELLER_PASSWORD_ORIGIN=http://localhost:4000
```

In CI, set both as secrets; `setup --ci` does it for GitHub Actions.

Demoman signs in by itself when the account has no saved session, and once
more when a run lands on a sign-in page. When an account cannot sign in, see
[Refusals](https://demoman.io/docs/reference/refusals.md#sign-in).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.