# Organisations, tokens and spend

> How BareCI organisations follow GitHub, how agent tokens and scopes work, and how usage, the free tier and the hard monthly cap are counted.

Source: https://bareci.com/docs/concepts/accounts

## Organisations

An organisation in BareCI is a GitHub account where the BareCI GitHub App is installed. Its members and owners follow GitHub membership, so there is no second user list to keep. GitHub organisation admins can read, run and operate; members can read and run. When someone leaves the GitHub organisation, their access ends at once.

People sign in to the [dashboard](https://bareci.com/app) with GitHub. The CLI signs in with a device code: `bareci login`.

## Agent tokens and scopes

Agents use **agent tokens**: `bci_…`, each scoped to one organisation with some of these scopes:

| Scope     | Allows                                                                                  |
| --------- | --------------------------------------------------------------------------------------- |
| `read`    | Reading runs, logs, tests, previews, findings, the Gate's verdict, usage and settings   |
| `run`     | Starting and cancelling runs, stopping previews, resolving findings, requesting reviews |
| `operate` | Changing settings, caps and tokens; dismissing disputed findings                        |

Only a token's hash is stored, and the token itself is shown once. A token acts only on its own organisation's repositories: another organisation's repositories, jobs and accounts answer as if they did not exist.

Manage tokens with the `/v1/accounts/:account/tokens` routes, or let `bareci login` create one for this machine.

## Usage and the cap

Usage is metered in micro-dollars from the same ledger entries that enforce the cap, so the bill and the cap can never disagree. Each usage event has a key and is recorded once.

- **Free tier:** a small monthly allowance with no card. Work past it is refused until the next month or a card is added.
- **Paid:** usage above the free allowance is billed. Every organisation has a hard monthly cap, with a default you can raise.
- **At the cap:** new launches stop for that organisation only, and the job shows the reason and the next step.

See [Pricing](https://bareci.com/pricing) for the meters. Check your organisation's usage with `account_usage`, or `GET /v1/accounts/:account/usage`.

## Forks and public repositories

Jobs from public repositories are refused unless the organisation turns on `allowForks`, because a job event cannot tell whether a fork triggered it.
