{"id":31959046,"url":"https://github.com/itinance/cc-settings-fixer","last_synced_at":"2025-10-14T15:19:03.703Z","repository":{"id":313780657,"uuid":"1052652442","full_name":"itinance/cc-settings-fixer","owner":"itinance","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-08T11:40:46.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-08T13:11:19.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/itinance.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-08T11:05:27.000Z","updated_at":"2025-09-08T11:40:49.000Z","dependencies_parsed_at":"2025-09-08T13:11:43.424Z","dependency_job_id":"04bbd146-aff2-4bd9-be98-e35507c6ace6","html_url":"https://github.com/itinance/cc-settings-fixer","commit_stats":null,"previous_names":["itinance/cc-settings-fixer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/itinance/cc-settings-fixer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fcc-settings-fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fcc-settings-fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fcc-settings-fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fcc-settings-fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itinance","download_url":"https://codeload.github.com/itinance/cc-settings-fixer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fcc-settings-fixer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019318,"owners_count":26086711,"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-14T02:00:06.444Z","response_time":60,"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":[],"created_at":"2025-10-14T15:18:57.933Z","updated_at":"2025-10-14T15:19:03.696Z","avatar_url":"https://github.com/itinance.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Settings Permission Format Fixer\n\nA Python script that automatically fixes permission format issues in Claude Code's `settings.json` file by converting the old wildcard syntax (`command*`) to the new prefix matching syntax (`command:*`).\n\n## Problem\n\nWhen using Claude Code, you might encounter permission format warnings when running `claude doctor` (https://github.com/anthropics/claude-code/issues/7300):\n\n```\npermissions\n    └ allow\n      ├ \"Bash(git status*)\": Use \":*\" for prefix matching, not just \"*\". Change to \"Bash(git status:*)\" for prefix matching.\n      ├ \"Bash(git log*)\": Use \":*\" for prefix matching, not just \"*\". Change to \"Bash(git log:*)\" for prefix matching.\n      ├ \"Bash(git diff*)\": Use \":*\" for prefix matching, not just \"*\". Change to \"Bash(git diff:*)\" for prefix matching.\n```\n\nThis happens when Claude Code automatically generates permissions using the old format, but the newer version expects the updated syntax.\n\n(Causing side effects like this: https://github.com/anthropics/claude-code/issues/5963)\n\n## Solution\n\nThis script automatically converts:\n- `\"Bash(git status*)\"` → `\"Bash(git status:*)\"` \n- `\"Bash(git log*)\"` → `\"Bash(git log:*)\"` \n- `\"Bash(npm run*)\"` → `\"Bash(npm run:*)\"` \n- And any other similar patterns\n\n## Installation\n\nNo installation required! Just download the script:\n\n```bash\n# Download the script\ncurl -O https://raw.githubusercontent.com/itinance/cc-settings-fixer/refs/heads/main/claude_settings_fixer.py\n# or copy the script to your local machine\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\npython claude_settings_fixer.py \u003cpath_to_settings.json\u003e\n```\n\n### Examples\n\n```bash\n# Current directory\npython claude_settings_fixer.py settings.json\n\n# User home directory (Linux/macOS)\npython claude_settings_fixer.py ~/.claude/settings.json\n\n# Windows\npython claude_settings_fixer.py \"C:\\Users\\YourName\\AppData\\Roaming\\claude\\settings.json\"\n```\n\n### Dry Run (Preview Changes)\n\nTo see what changes would be made without applying them:\n\n```bash\npython claude_settings_fixer.py --dry-run ~/.claude/settings.json\n```\n\n### Finding Your Settings File\n\nCommon locations for Claude Code settings:\n\n- **Linux/macOS**: `~/.claude/settings.json` or `~/.config/claude/settings.json`\n- **Windows**: `%APPDATA%\\claude\\settings.json`\n- **Current directory**: `./settings.json`\n\n## Features\n\n- ✅ **Safe**: Creates automatic backups before making changes\n- ✅ **Smart**: Only fixes permissions that need updating\n- ✅ **Preview**: Dry-run mode to see changes before applying\n- ✅ **Validation**: Checks file exists and contains valid JSON\n- ✅ **Clear feedback**: Shows exactly what will be changed\n- ✅ **Error handling**: Helpful error messages for common issues\n\n## Example Output\n\n```\nClaude Code Settings Permission Format Fixer\n==================================================\nProcessing settings file: /Users/username/.claude/settings.json\n\nFound 4 permission(s) to fix:\n  • 'Bash(git status*)' -\u003e 'Bash(git status:*)'\n  • 'Bash(git log*)' -\u003e 'Bash(git log:*)'\n  • 'Bash(git diff*)' -\u003e 'Bash(git diff:*)'\n  • 'Bash(git show*)' -\u003e 'Bash(git show:*)'\n\nCreated backup: /Users/username/.claude/settings.json.backup\n\nApply these changes to /Users/username/.claude/settings.json? (y/N): y\n\nSettings updated successfully!\nOriginal file backed up to: /Users/username/.claude/settings.json.backup\n\nYou can now run 'claude doctor' to verify the fixes.\n```\n\n## Command Line Options\n\n| Option | Description |\n|--------|-------------|\n| `settings_file` | Path to the Claude Code settings.json file (required) |\n| `--dry-run` | Show what changes would be made without applying them |\n| `--help` | Show help message and examples |\n\n## Safety Features\n\n- **Automatic backups**: Original file is backed up with `.backup` extension\n- **Confirmation prompt**: Asks before applying changes (unless dry-run)\n- **Validation**: Checks file exists and contains valid JSON before processing\n- **Rollback**: If something goes wrong, restore from the `.backup` file\n\n## Troubleshooting\n\n### File Not Found\n```\nError: File does not exist: /path/to/settings.json\n```\n**Solution**: Check the path to your settings file. Use `find` or `locate` to search for `settings.json`.\n\n### Permission Denied\n```\nError: Permission denied reading file: /path/to/settings.json\n```\n**Solution**: Run with appropriate permissions or change file ownership.\n\n### Invalid JSON\n```\nError: Invalid JSON in file /path/to/settings.json\n```\n**Solution**: The settings file is corrupted. Restore from a backup or recreate it.\n\n### No Changes Needed\n```\nNo permission format issues found. Settings are already up to date!\n```\n**Result**: Your settings are already using the correct format. No action needed.\n\n## After Running the Script\n\n1. Run `claude doctor` to verify the fixes\n2. The warnings about permission format should be gone\n3. Your original file is safely backed up as `settings.json.backup`\n\n## Requirements\n\n- Python 3.6 or higher\n- No external dependencies (uses only Python standard library)\n\n## License\n\nThis script is provided as-is for fixing Claude Code permission format issues. Feel free to modify and distribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fcc-settings-fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinance%2Fcc-settings-fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fcc-settings-fixer/lists"}