{"id":31580996,"url":"https://github.com/khordoo/clauth","last_synced_at":"2026-01-20T16:56:41.109Z","repository":{"id":317256558,"uuid":"1061291451","full_name":"khordoo/clauth","owner":"khordoo","description":"Simple CLI to configure Claude Code with AWS Bedrock","archived":false,"fork":false,"pushed_at":"2025-09-29T21:27:30.000Z","size":1081,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T21:29:01.441Z","etag":null,"topics":["anthropic","authentication","aws","aws-bedrock","aws-sso","claude","claude-code","cli","command-line-tool","developer-tools","iam","python","python-package","setup-wizard"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/clauth/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khordoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-21T16:17:05.000Z","updated_at":"2025-09-29T21:06:06.000Z","dependencies_parsed_at":"2025-09-29T21:29:06.698Z","dependency_job_id":null,"html_url":"https://github.com/khordoo/clauth","commit_stats":null,"previous_names":["khordoo/clauth"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/khordoo/clauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khordoo%2Fclauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khordoo%2Fclauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khordoo%2Fclauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khordoo%2Fclauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khordoo","download_url":"https://codeload.github.com/khordoo/clauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khordoo%2Fclauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278526242,"owners_count":26001325,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["anthropic","authentication","aws","aws-bedrock","aws-sso","claude","claude-code","cli","command-line-tool","developer-tools","iam","python","python-package","setup-wizard"],"created_at":"2025-10-05T21:51:56.366Z","updated_at":"2025-10-05T21:52:01.819Z","avatar_url":"https://github.com/khordoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLAUTH\n\n[![PyPI Version](https://img.shields.io/pypi/v/clauth.svg)](https://pypi.org/project/clauth/)\n[![License](https://img.shields.io/pypi/l/clauth.svg)](https://github.com/khordoo/clauth/blob/main/LICENSE)\n[![CI](https://img.shields.io/github/actions/workflow/status/khordoo/clauth/ci.yml?branch=main)](https://github.com/khordoo/clauth/actions/workflows/ci.yml)\n\n**Claude + AWS SSO helper for Bedrock**\n\nA Python CLI tool that simplifies setting up Claude Code with AWS Bedrock authentication through AWS SSO.\n\n## Overview\n\nCLAUTH streamlines the complex process of configuring AWS SSO, discovering Bedrock models, and launching Claude Code CLI with proper authentication. Instead of manually configuring AWS profiles, SSO sessions, and environment variables, CLAUTH provides an interactive setup wizard that handles everything automatically.\n\n## Features\n\n- **Automated AWS SSO Setup** - Creates and configures AWS profiles and SSO sessions\n- **Model Discovery** - Automatically discovers available Bedrock inference profiles\n- **Interactive Model Selection** - Choose default and fast models through user-friendly menus\n- **Auto-launch Claude Code** - Seamlessly launches Claude Code CLI with proper configuration\n- **Model Management** - List and manage available Bedrock models\n- **Polished CLI UI** - Themed banners, cards, and progress spinners keep steps focused and easy to follow\n\n## Prerequisites\n\nBefore using CLAUTH, ensure you have:\n\n- **AWS CLI v2** - [Installation guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n- **Claude Code CLI** - [Installation guide](https://docs.anthropic.com/en/docs/claude-code)\n- **Python 3.10+**\n- **Access to AWS Bedrock** with appropriate permissions\n\n## Installation\n\n### From PyPI\n\n```bash\npip install clauth\n```\n\n### From Source\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/khordoo/clauth.git\n   cd clauth\n   ```\n\n2. Install using uv (recommended) or pip:\n   ```bash\n   # Using uv\n   uv sync\n\n   # Or using pip\n   pip install -e .\n   ```\n\n3. Verify installation:\n   ```bash\n   clauth --help\n   ```\n\n## Usage\n\n### Initial Setup\n\nRun the setup wizard to configure everything automatically:\n\n```bash\nclauth init\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/demo/demo.gif\" alt=\"CLAUTH CLI Demo\" width=\"800\" /\u003e\n\u003c/p\u003e\n\nThis command will:\n1. Configure AWS SSO profile and session\n2. Open AWS SSO wizard for authentication\n3. Discover available Bedrock models\n4. Let you select default and fast models\n5. Launch Claude Code CLI with proper environment\n\n### Command Options\n\n```bash\nclauth init [OPTIONS]\n```\n\n**AWS Profile Options:**\n- `--profile, -p TEXT` - AWS profile name (default: clauth)\n- `--region, -r TEXT` - Default AWS region (default: ap-southeast-2)\n\n**AWS SSO Options:**\n- `--session-name, -s TEXT` - SSO session name (default: clauth-session)\n- `--sso-start-url TEXT` - IAM Identity Center start URL\n- `--sso-region TEXT` - SSO region (default: ap-southeast-2)\n\n**Behavior Options:**\n- `--auto-start/--no-auto-start` - Launch Claude Code after setup (default: true)\n\n### List Available Models\n\nView all available Bedrock models:\n\n```bash\nclauth model list\n```\n\nAdd `--show-arn` to see full model ARNs:\n\n```bash\nclauth model list --show-arn\n```\n\n### Quick Model Switching\n\nSwitch between available models without going through the full setup process:\n\n```bash\n# Interactive model switching (or use the shortcut `clauth sm`)\nclauth model switch\n```\n\n**Options:**\n```bash\nclauth model switch [OPTIONS]\n\n# Only change the default model\nclauth model switch --default-only\n\n# Only change the fast model\nclauth model switch --fast-only\n\n# Use specific profile/region\nclauth model switch --profile myprofile --region us-west-2\n```\n\nThe command will:\n1. Show your current default and fast models\n2. Discover available models from AWS Bedrock\n3. Present an interactive menu to select new models\n4. Update your configuration and confirm the changes\n\n### Delete Configuration\n\nTo completely remove all `clauth` configurations, including the AWS profile and SSO tokens, run:\n\n```bash\nclauth config delete\n```\n\nThis command will permanently delete:\n- The `clauth` AWS profile from `~/.aws/config`.\n- The AWS credentials profile (if it exists).\n- The AWS SSO token cache.\n- The SSO session configuration.\n- The entire `clauth` configuration directory.\n\nTo skip the confirmation prompt, use the `--yes` or `-y` flag:\n```bash\nclauth config delete --yes\n```\n\n## Configuration\n\nCLAUTH uses a persistent configuration system that saves your preferences between runs. Configuration is stored in TOML format at `~/.clauth/config.toml` (or `%APPDATA%/clauth/config.toml` on Windows).\n\n### View Current Configuration\n\nYou can view the current configuration by running:\n\n```bash\nclauth config show\n```\n\nTo see the path to the configuration file, use the `--path` flag:\n```bash\nclauth config show --path\n```\n\n### Configuration Sections\n\n#### AWS Settings (`aws.*`)\n- `aws.profile` - AWS profile name (default: `clauth`)\n- `aws.region` - Default AWS region (default: `ap-southeast-2`)\n- `aws.sso_start_url` - IAM Identity Center start URL\n- `aws.sso_region` - SSO region (default: `ap-southeast-2`)\n- `aws.session_name` - SSO session name (default: `clauth-session`)\n- `aws.output_format` - AWS CLI output format (default: `json`)\n\n#### Model Settings (`models.*`)\n- `models.provider_filter` - Preferred model provider (default: `anthropic`)\n- `models.default_model` - Default model ID (set automatically during init)\n- `models.fast_model` - Fast/small model ID (set automatically during init)\n- `models.default_model_arn` - Default model ARN (set automatically)\n- `models.fast_model_arn` - Fast model ARN (set automatically)\n\n#### CLI Settings (`cli.*`)\n- `cli.claude_cli_name` - Claude CLI executable name (default: `claude`)\n- `cli.auto_start` - Auto-launch Claude Code after setup (default: `true`)\n- `cli.show_progress` - Show progress indicators (default: `true`)\n- `cli.color_output` - Enable colored output (default: `true`)\n\n### Environment Variable Overrides\n\nConfiguration can be overridden with environment variables:\n\n```bash\n# AWS settings\nexport CLAUTH_PROFILE=my-profile\nexport CLAUTH_REGION=us-east-1\nexport CLAUTH_SSO_START_URL=https://my-org.awsapps.com/start/\nexport CLAUTH_SSO_REGION=us-east-1\nexport CLAUTH_SESSION_NAME=my-session\n\n# CLI settings\nexport CLAUTH_CLAUDE_CLI_NAME=claude-dev\nexport CLAUTH_AUTO_START=false\n\n# Model settings\nexport CLAUTH_PROVIDER_FILTER=anthropic\nexport CLAUTH_DEFAULT_MODEL=claude-3-5-sonnet-20241022-v2:0\nexport CLAUTH_FAST_MODEL=claude-3-5-haiku-20241022-v1:0\n```\n\n### Environment Variables for Claude Code\n\nAfter running `clauth init`, these environment variables are set for Claude Code:\n\n- `AWS_PROFILE` - Selected AWS profile\n- `AWS_REGION` - Selected AWS region\n- `CLAUDE_CODE_USE_BEDROCK=1` - Enables Bedrock integration\n- `ANTHROPIC_MODEL` - Default model ARN\n- `ANTHROPIC_SMALL_FAST_MODEL` - Fast model ARN\n\n## Project Structure\n\n```\nclauth/\n├── src/clauth/\n│   ├── __init__.py\n│   ├── cli.py          # Main CLI interface with Typer\n│   ├── aws_utils.py    # AWS/Bedrock integration utilities\n│   └── models.py       # Model selection utilities\n├── pyproject.toml      # Project configuration\n└── README.md           # This file\n```\n\n## Dependencies\n\n- **boto3** - AWS SDK for Python\n- **typer** - CLI framework with rich features\n- **inquirerpy** - Interactive command-line prompts\n- **rich** - Rich text and beautiful formatting\n\n## Development\n\n### Setting up Development Environment\n\n1. Clone the repository\n2. Create virtual environment:\n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n   ```\n3. Install in development mode:\n   ```bash\n   pip install -e .\n   ```\n\n### Project Commands\n\nThe CLI is available as both `clauth` command and as a Python module:\n\n```bash\n# Via installed command\nclauth init\n\n# Via Python module\npython -m clauth.cli init\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**\"Setup failed\" errors:**\n- Ensure AWS CLI v2 is installed and accessible\n- Verify you have permissions to access AWS Bedrock\n- Check your internet connection for SSO authentication\n\n**\"Credentials are missing or expired\":**\n- Run `clauth init` to re-authenticate\n- Manually run `aws sso login --profile clauth` if needed\n\n**\"Claude not found on system\":**\n- Install Claude Code CLI from [official documentation](https://docs.anthropic.com/en/docs/claude-code)\n- Ensure `claude` command is in your PATH\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhordoo%2Fclauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhordoo%2Fclauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhordoo%2Fclauth/lists"}