addteam
Invite GitHub collaborators from a simple YAML file.
Install
pip install addteam
Or run without installing:
uvx addteam
Prerequisite: GitHub CLI must be installed and authenticated (gh auth login).
First Run
# In your repo directory, create a team.yaml
addteam --init
# Edit team.yaml with your team members, then run:
addteam
That's it! Your collaborators will be invited.
team.yaml Format
default_permission: push
admins:
- alice
developers:
- bob
- username: charlie
name: Charlie Day # optional display name
reviewers:
- eve
name: is optional anywhere a username: is given — it shows up in
audit/apply output, --json, and addresses welcome issues by name.
Role names map to permissions automatically:
| Role | Permission |
|---|---|
admins |
admin |
maintainers |
maintain |
developers, contributors, contractors |
push |
reviewers, readers |
pull |
triagers |
triage |
Unknown keys produce a warning (not silent drops), so a typo like
develoeprs: won't quietly shrink your team.
Note:
maintainandtriageonly exist on organization-owned repos. On personal repos addteam automatically degrades to push/pull with a warning (never expands access), so one config works everywhere.
Common Commands
addteam # invite from local team.yaml
addteam -n # dry-run (preview only)
addteam -a # audit (show drift)
addteam -s # sync (also removes unlisted users, asks first)
addteam --from org/config # use team.yaml from another repo
Apply mode also fixes permission drift: if a collaborator exists with the wrong permission, it is updated to match team.yaml.
Central Team Config
Keep one team.yaml in a shared repo, apply it anywhere:
# Anyone on your team can run this in any repo:
uvx addteam --from myorg/team-config
(addteam myorg/team-config without --from still works and means the same
thing; --from is the explicit, less ambiguous spelling. Confusing it with
-r owner/repo — which selects the target repo — is a common mistake.)
Apply only one group (e.g. just the leads) to a specific repo:
uvx addteam --from myorg/team-config --group maintainers -r myorg/the-repo
The AI summary at the end is perfect for sharing via email or Slack.
Options
| Flag | Description |
|---|---|
-n, --dry-run |
Preview without making changes |
-s, --sync |
Remove collaborators not in list |
-a, --audit |
Show drift without making changes |
--fail-on-drift |
With --audit: exit 1 when drift is found (CI gates) |
-r, --repo |
Target a specific repo |
--from |
Fetch team.yaml from another repo |
--group ROLE |
Only apply these role groups (repeatable; never with --sync) |
--json |
Machine-readable output for audit/apply |
-y, --yes |
Skip confirmation prompts (sync removals) |
-q, --quiet |
Minimal output |
--welcome / --no-welcome |
Override welcome-issue behavior |
--no-ai |
Skip AI-generated summaries |
--report DIR |
Permission matrix for every repo in a directory |
--csv PATH |
With --report: also write a spreadsheet |
--format long/matrix |
With --report --csv: row-per-user or grid layout |
--no-names |
With --report: skip display-name lookups (faster) |
Exit codes: 0 success · 1 runtime error (or drift with --fail-on-drift) · 2 usage error.
Directory Report
Audit every repo in a folder at once:
addteam --report ~/dev
addteam --report ~/dev --csv access.csv --format matrix
Scans each subdirectory with a git working copy, collects collaborators
(active and pending invitations) with permissions, looks up display names,
shows a users × repos matrix in the terminal, and optionally writes a CSV
spreadsheet. Also available as --json for scripting.
Scripting
addteam --audit --json | jq '.drift'
addteam --audit --fail-on-drift # CI gate: fail the job on drift
GitOps Setup
Automatically sync collaborators when team.yaml changes:
addteam --init --init-action
This creates:
team.yaml- your team config.github/workflows/sync-collaborators.yml- runs on push
Add a TEAM_SYNC_TOKEN secret (PAT with repo scope) to your repo.
Advanced Features
Expiring Access
contractors:
- username: temp-dev
permission: push
expires: 2027-06-01
Expired users are skipped on apply and removed on --sync.
GitHub Teams (orgs)
teams:
- myorg/backend-team
- myorg/frontend-team: pull
If a team lookup fails, the affected members are skipped with a warning and
--sync refuses to run — a partial config must never cause mass removals.
Multi-Repo Management
addteam --init-multi-repo
Creates repos.txt to sync the same team across multiple repos.
Welcome Issues
New collaborators automatically get a welcome issue with an AI-generated
summary of your repo (requires OPENAI_API_KEY, ANTHROPIC_API_KEY,
GOOGLE_API_KEY, or OPENROUTER_API_KEY).
Welcome issues are on by default. Turn them off per run with --no-welcome,
or per repo in config:
welcome_issue: false
License
MIT
Metadata
Release files for addteam 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| addteam-1.5.0.tar.gz | 47.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| addteam-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.5 kB
Release files / addteam-1.5.0.tar.gz
| Download URL | addteam-1.5.0.tar.gz |
|---|---|
| Size | 47.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f9cb6fd6c0f0dc8260eaedc134fc2f16a0d0dbe60c328a556546cc647ea0325
|
|
BLAKE2b-256 checksum How to use checksums |
03f8fc239f266a48241828bc9d1d3040d66b65fea0c958c23268e8f3d6e9aa52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / addteam-1.5.0-py3-none-any.whl
| Download URL | addteam-1.5.0-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
504ec375647741aa850f415a59af491dad0f2154a76b749d086d42a0e032a6b5
|
|
BLAKE2b-256 checksum How to use checksums |
0aa7cfacf6eff1ba41f2d6285c0912623b737c154beeb7be9bb6eb899e53521c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for addteam 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.