|
| 1 | +# AGENTS.md — team-cli |
| 2 | + |
| 3 | +## Project |
| 4 | + |
| 5 | +CLI for AWS TEAM (Temporary Elevated Access Management). Python 3.11+, distributed via Homebrew. |
| 6 | + |
| 7 | +## Open-source readiness |
| 8 | + |
| 9 | +This repo will be open-sourced. All contributions must follow these rules: |
| 10 | + |
| 11 | +### Never include in code, comments, commits, or docs |
| 12 | + |
| 13 | +- AWS account IDs, ARNs, or resource identifiers |
| 14 | +- Cognito domain URLs, client IDs, user pool IDs |
| 15 | +- AppSync endpoint URLs |
| 16 | +- Internal domain names (*.docplanner.*, *.awsapps.com, etc.) |
| 17 | +- Employee names, emails, or usernames |
| 18 | +- Internal ticket IDs, Slack channels, or Jira project keys |
| 19 | +- IP addresses, VPN endpoints, or internal URLs |
| 20 | +- SSO start URLs or session names |
| 21 | +- Any value from `config.example.toml` that contains real deployment data |
| 22 | + |
| 23 | +### Safe to include |
| 24 | + |
| 25 | +- Generic examples using placeholder values (`example.com`, `123456789012`, `my-org`) |
| 26 | +- Architecture descriptions that don't reference specific infrastructure |
| 27 | + |
| 28 | +## Contributing |
| 29 | + |
| 30 | +### Structure |
| 31 | + |
| 32 | +``` |
| 33 | +team_cli/ |
| 34 | + cli.py — argparse entry point, command handlers |
| 35 | + api.py — GraphQL AppSync client |
| 36 | + auth.py — OAuth2 + PKCE authentication |
| 37 | + config.py — config and token management |
| 38 | + audit.py — audit query and CloudTrail correlation |
| 39 | + interactive.py — InquirerPy prompts (fuzzy search) |
| 40 | + queries.py — GraphQL query definitions |
| 41 | + sync.py — AWS config profile sync |
| 42 | +Formula/ |
| 43 | + team-cli.rb — Homebrew formula |
| 44 | +completions/ |
| 45 | + team.bash — bash completions |
| 46 | +``` |
| 47 | + |
| 48 | +### Commands |
| 49 | + |
| 50 | +All commands follow the pattern `cmd_<name>(args)` in `cli.py`, dispatched via a `COMMANDS` dict. |
| 51 | + |
| 52 | +Interactive prompts use `inquirer.fuzzy` for searchable selection. All pickers fall back to numbered menus when InquirerPy is unavailable. |
| 53 | + |
| 54 | +### Releasing |
| 55 | + |
| 56 | +1. Bump version in `pyproject.toml`, `team_cli/__init__.py`, and `Formula/team-cli.rb` (tag + version lines) |
| 57 | +2. Update `charset-normalizer` or other resources in the Formula if dependencies changed |
| 58 | +3. Commit to main |
| 59 | +4. Tag: `git tag v0.3.0 && git push --tags` |
| 60 | +5. The GitHub Actions workflow creates a release automatically |
| 61 | +6. Users update via `brew update && brew upgrade team-cli` |
| 62 | + |
| 63 | +### Formula resources |
| 64 | + |
| 65 | +When updating Python dependencies in the Formula, use sdist tarballs from PyPI. Pin `charset-normalizer` to 3.3.2 (3.4.x requires `mypy` as a build dependency which fails in Homebrew's `--no-binary :all:` environment). |
| 66 | + |
| 67 | +### Testing |
| 68 | + |
| 69 | +Run `team --help` after changes to verify the CLI loads. All commands should work both interactively (prompts) and non-interactively (flags). |
0 commit comments