# Create a team

A team is one private git repository the team controls. Creating one scaffolds that repository, clones it to this machine, and records you as its first member.

## What a team is

A team is one private git repository. Shared skills, eval receipts and the member roster all live in it, and every member works from a clone on their own machine. A machine is on one team at a time: a second `team create` is refused before anything is created, and tells you to run `team leave` first.

## The command

```sh
npx -y terum-skills@latest team create [name]
```

`setup` runs this when you pick "Create a new team". Run it directly when you already know the answers, or when you are creating the team on a remote you made yourself. Creating on GitHub needs a logged-in `gh`; if it is installed but logged out, the command offers to run `gh auth login` first.

It asks for three things:

1. **The team name**, if you did not pass one: 1 to 100 letters, digits, dots, underscores or hyphens, starting with a letter or a digit.
2. **Your identity**: GitHub login, team handle, name and email, with defaults taken from this machine's config, `gh` and your global git config. When all four are known, one `Use this identity?` question confirms them.
3. **The repository name**, on GitHub only. The suggestion is `<team>-shared-skills`. If the name is taken, it asks again; a collision never renames your team.

| Option | What it does |
| --- | --- |
| `--org <org>` | Create the repository under a GitHub organization instead of your own account. |
| `--repo <repo>` | Name the repository instead of being asked. |
| `--remote <url>` | Push the scaffold to an existing empty remote instead of creating one on GitHub. Cannot be combined with `--org` or `--repo`. |

## What is created

The repository is created with `gh repo create --private`, so it is private from the start. A scaffold is then pushed to `main`:

- `team.json`: the team name, the seven default categories (`debugging`, `testing`, `docs`, `workflow`, `research`, `infra`, `misc`), an empty projects map, an empty archived list, and a skill license policy of `UNLICENSED`.
- `people/<your-handle>.json`: your roster entry.
- `skills/` and `evals/`: empty. Published versions and committed receipts land here.
- `README.md`: a heading and the markers the team workflow writes between.
- `.github/workflows/terum-skills.yml`: validates every skill a pull request touches, and re-renders the README on each push to `main`.

On this machine it writes the clone to `~/.terum/skills/teams/<team>/` and the team binding plus your identity to `~/.terum/skills/config.json`. Every field is described in the [team repo reference](https://github.com/ryanliu-terum/terum-skills/blob/main/docs/reference/team-repo.md).

## The push guard

Every clone gets a `pre-push` hook that applies the CLI's own write rules to anything pushed with plain git. A raw push may change `README.md`, your own people file, and a narrow set of `team.json` edits. Anything under `skills/` or `evals/` is refused, because a version is minted by `publish` and a receipt is written by the run that produced it. Deleting a branch is refused too.

The guard stops accidents, not people. `git push --no-verify` bypasses it, and the push is attributed to you.

## Other git hosts

```sh
npx -y terum-skills@latest team create <name> --remote <url>
```

The remote must already exist and hold no branches. This path uses no `gh` at all. A credential embedded in the URL is dropped before it reaches git or config; git uses your configured credentials.

Publishing, installing, syncing and evaluating all work, because they are git operations. Three things do not:

- `invite` refuses. Grant access on your host, then send teammates `npx -y terum-skills@latest setup <remote>`.
- `team remove` can only archive a member (`--archive-only`). Revoke their access on the host yourself.
- The CLI's release check is off, so `update` does not report new releases.

## Invite teammates

```sh
npx -y terum-skills@latest invite <github-login> [<github-login>…]
```

The whole batch is validated before any invitation is sent, so a typo costs nothing. Each login is added as a collaborator with GitHub's default permission, which is write, so anyone you invite can publish. GitHub requires you to hold admin permission on the repository to add collaborators, and caps invitations at 50 per repository per day.

The command then prints a block to send your teammate, fenced so it pastes cleanly into Slack or email, even when some invitations failed. It holds these two lines, a bare `team join` equivalent, and a note on accepting the invitation:

```sh
npm install -g terum-skills
npx -y terum-skills@latest setup <owner>/<repo>
```

The `npm install -g` line is optional: it only gives your teammate the bare `terum-skills` command. The `setup` line is their whole side, covered in [Join a team](https://www.terum.ai/docs/join-a-team). Removing members and running the team day to day are in [Team admin](https://www.terum.ai/docs/team-admin).
