{"id":26684414,"url":"https://github.com/wallentx/awsctx","last_synced_at":"2025-07-12T07:04:31.040Z","repository":{"id":283380773,"uuid":"950734947","full_name":"wallentx/awsctx","owner":"wallentx","description":"AWS CLI Context Switcher for SSO Auth","archived":false,"fork":false,"pushed_at":"2025-05-06T18:51:21.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T02:15:38.024Z","etag":null,"topics":["aws","cli","context","profile","sso"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wallentx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-18T15:55:54.000Z","updated_at":"2025-06-01T20:44:06.000Z","dependencies_parsed_at":"2025-04-16T01:27:03.985Z","dependency_job_id":"5980e8a2-1c0d-4fd9-bfc2-97cbcce34674","html_url":"https://github.com/wallentx/awsctx","commit_stats":null,"previous_names":["wallentx/awsctx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wallentx/awsctx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallentx%2Fawsctx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallentx%2Fawsctx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallentx%2Fawsctx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallentx%2Fawsctx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wallentx","download_url":"https://codeload.github.com/wallentx/awsctx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallentx%2Fawsctx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264952277,"owners_count":23688046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cli","context","profile","sso"],"created_at":"2025-03-26T09:30:16.127Z","updated_at":"2025-07-12T07:04:31.019Z","avatar_url":"https://github.com/wallentx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# awsctx\n\nA powerful AWS CLI Context Switcher with comprehensive AWS SSO support, profile generation, profile management, and advanced features.\n\n## Features\n\n- **AWS SSO Integration**\n  - Seamless AWS SSO login and session management\n  - Automatic profile generation for all accessible AWS accounts and roles\n  - Smart handling of SSO token expiration and renewal\n  - Support for custom SSO start URLs and registration scopes\n\n- **Profile Management**\n  - Generates AWS CLI profiles for all accessible accounts and roles\n  - Intelligent profile naming with account and role disambiguation\n  - Fuzzy search capability for quick account/role switching\n  - Maintains default profile configuration\n\n- **Interactive Interface**\n  - Fuzzy search-enabled account and role selection\n  - Color-coded output for better visibility\n  - Progress spinners for long-running operations\n  - Interactive CLI pager selection with support for various pagers (less, more, bat)\n\n- **Advanced Features**\n  - AWS Region Heatmap generation showing resource distribution\n  - EKS cluster detection and automatic kubeconfig updates\n  - Customizable output formats (json, yaml, text, table)\n  - Browser selection for SSO login (including headless mode)\n\n## Prerequisites\n\n- AWS CLI v2\n- jq\n- fzf\n- bash 4.0+\n- Optional: bat (for enhanced output formatting)\n\n## Installation\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/yourusername/awsctx.git\n   ```\n\n2. Make the script executable:\n   ```bash\n   chmod +x awsctx\n   ```\n\n3. Add to your PATH or create a symlink:\n   ```bash\n   ln -s $(pwd)/awsctx ~/.local/bin/awsctx\n   ```\n\n## Usage\n\n### Basic Usage\n\nSimply run `awsctx` without arguments to interactively switch between AWS profiles:\n```bash\nawsctx\n```\n\n### Initial Setup\n\nFirst-time setup with AWS SSO:\n```bash\nawsctx -i\n```\n\n### Generate Profiles\n\nGenerate AWS CLI profiles for all accessible accounts and roles:\n```bash\nawsctx -g\n```\n\n### Additional Options\n\n- `-b \u003cbrowser\u003e`: Specify browser for SSO login (use 'none' for headless mode)\n- `-k`: Detect EKS clusters and update kubeconfig\n- `-o \u003cformat\u003e`: Set output format (json, yaml, text, table)\n- `-r`: Generate AWS Region Heatmap for current profile\n- `-v`: Enable verbose mode\n- `-h`: Display help message\n\n## Configuration\n\nThe script creates a configuration file at either:\n- `~/.config/awsctx/awsctxrc` (preferred)\n- `~/.awsctxrc` (fallback)\n\nConfiguration includes:\n- SSO start URL\n- SSO region\n- Registration scopes\n- Cross-account profile settings\n- Output format preferences\n- CLI pager settings\n\n## Features in Detail\n\n### AWS SSO Support\nUnlike other AWS context switchers, this script is built with AWS SSO in mind. It handles:\n- SSO session management\n- Token expiration and renewal\n- Automatic profile generation for all accessible accounts\n- Role-based access configuration\n\n### Profile Generation\nAutomatically creates AWS CLI profiles for:\n- All accessible AWS accounts\n- Available roles within each account\n- Handles naming conflicts by appending role names when necessary\n\n### Region Heatmap\nGenerates a visual representation of AWS resource distribution across regions, showing:\n- EC2 instances\n- S3 buckets (in us-east-1)\n- Lambda functions\n- RDS instances and clusters\n\n### EKS Integration\nAutomatically detects and configures access to EKS clusters:\n- Scans all regions for EKS clusters\n- Updates kubeconfig with discovered clusters\n- Configures authentication for each cluster\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Acknowledgments\n\nWhile there are other tools that allow you to easily switch between AWS profiles (many are also named awsctx), this implementation focuses on providing comprehensive AWS SSO support, profile generation, and advanced features for modern AWS environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallentx%2Fawsctx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwallentx%2Fawsctx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallentx%2Fawsctx/lists"}