Skip to main content

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: maintain and triage only 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.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for addteam 1.4.0
File Size Uploaded Provenance
addteam-1.4.0.tar.gz 46.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for addteam 1.4.0
File Interpreter ABI Platform
addteam-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.3 kB

Release files / addteam-1.4.0.tar.gz

Download URL addteam-1.4.0.tar.gz
Size 46.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c3430be902156c0a5579fee3ed1851fd3b7caf5c9d4b3bc53cf73f348ef3e31b
BLAKE2b-256 checksum
How to use checksums
d6653f999022b7f3eeec3e68f9d4ba1974b80d951c4194185861f2693817d5d3
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.4.0-py3-none-any.whl

Download URL addteam-1.4.0-py3-none-any.whl
Size 34.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c11efd8238a91739fdeb14afb200d96f3f01e5faf86baf6dad4c8bdd317c0b5
BLAKE2b-256 checksum
How to use checksums
acfe42aaabcdb18c1db502f8537ce03bfa198967ed210c15b8f2c644ecfed9d0
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.4.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page