{"id":29440864,"url":"https://github.com/carlosarraes/shush","last_synced_at":"2025-07-24T15:15:28.449Z","repository":{"id":302685043,"uuid":"1013196762","full_name":"carlosarraes/shush","owner":"carlosarraes","description":"🤫 SHUSH - Remove comments from source code files","archived":false,"fork":false,"pushed_at":"2025-07-09T12:13:38.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T12:37:10.266Z","etag":null,"topics":["cli","code-cleanup","command-line-tool","comment-removal","developer-tools","golang","sed"],"latest_commit_sha":null,"homepage":"","language":"Go","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/carlosarraes.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-07-03T14:01:36.000Z","updated_at":"2025-07-09T12:23:34.000Z","dependencies_parsed_at":"2025-07-03T18:30:08.399Z","dependency_job_id":null,"html_url":"https://github.com/carlosarraes/shush","commit_stats":null,"previous_names":["carlosarraes/shush"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/carlosarraes/shush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosarraes%2Fshush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosarraes%2Fshush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosarraes%2Fshush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosarraes%2Fshush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlosarraes","download_url":"https://codeload.github.com/carlosarraes/shush/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosarraes%2Fshush/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266862506,"owners_count":23996862,"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-07-24T02:00:09.469Z","response_time":99,"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":["cli","code-cleanup","command-line-tool","comment-removal","developer-tools","golang","sed"],"created_at":"2025-07-13T12:16:08.546Z","updated_at":"2025-07-24T15:15:28.391Z","avatar_url":"https://github.com/carlosarraes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shush 🤫\n**S**loppily **H**ushing **U**nwanted **S**ource-code **H**eavy (comments)\n\nRemove comments from source code files blazingly fast. Features Claude Code integration, smart comment preservation, and git-aware processing. Supports [40+ file extensions](SUPPORTED_LANGUAGES.md) across most popular programming languages.\n\n## Installation\n\n### Quick Install (Linux/macOS)\n```bash\ncurl -sSf https://raw.githubusercontent.com/carlosarraes/shush/main/install.sh | sh\n```\n\n### Manual Download\nDownload the binary for your platform from the [releases page](https://github.com/carlosarraes/shush/releases).\n\n## 🤖 Claude Code Integration\n\nAutomatic comment cleanup whenever Claude Code modifies files:\n\n```bash\n# Install hooks\nshush --install-hook              # User-wide (all projects)\nshush --install-hook --project    # Project-specific only\n\n# Manage hooks\nshush --hook-status               # Check installation status\nshush --list-hooks                # Show all configured hooks\nshush --uninstall-hook            # Remove hooks\n```\n\nOnce installed, comments are automatically cleaned whenever Claude Code uses Write, Edit, or MultiEdit tools. Respects your `.shush.toml` configuration for comment preservation.\n\n## ⚙️ Configuration (.shush.toml)\n\nSmart comment preservation through configuration:\n\n```bash\nshush --create-config    # Create example configuration\nshush --config          # Show current configuration\n```\n\n### Configuration File Example\n```toml\n# Patterns to preserve in comments (supports wildcards with *)\npreserve = [\n    \"TODO:\",\n    \"FIXME:\",\n    \"@ts-ignore\",\n    \"eslint-\",\n    \"*IMPORTANT*\",   # Wildcard: preserves any comment containing IMPORTANT\n    \"*DEBUG*\",       # Wildcard: preserves any comment containing DEBUG\n]\n\n# Number of context lines to show in preview mode (default: 3)\ncontext_lines = 3\n```\n\n### Configuration Discovery\nShush searches for configuration in this order:\n1. `.shush.toml` (current directory)\n2. `.shush.toml` (git repository root)  \n3. `~/.config/.shush.toml` (global user config)\n\n## 🚫 File Exclusion (.shushignore)\n\nExclude files and directories from processing:\n\n```bash\n# Create .shushignore file\necho \"*.tmp\" \u003e .shushignore       # Ignore all .tmp files\necho \"build/\" \u003e\u003e .shushignore     # Ignore build directory\necho \"test*.js\" \u003e\u003e .shushignore   # Ignore test files\necho \"!important.js\" \u003e\u003e .shushignore  # But keep important.js\n```\n\n**Ignore File Locations:**\n- `.shushignore` (project root or current directory)\n- `~/.config/.shushignore` (global user ignore patterns)\n\n## Usage\n\n### Basic Operations\n```bash\n# Remove comments from file/directory\nshush file.py\nshush src/ --recursive\n\n# Preview changes\nshush script.sh --dry-run\nshush script.sh --dry-run --context-lines 5\n\n# Comment type filtering\nshush file.js --inline          # Only line comments\nshush file.c --block            # Only block comments\n\n# Backup and preserve options\nshush config.lua --backup\nshush script.py --preserve-lines  # Keep comment-only lines as empty\n```\n\n### Git-Aware Processing\n```bash\n# Process only changed lines\nshush --staged                   # Clean staged changes\nshush --unstaged                 # Clean unstaged changes  \nshush --changes-only             # Clean all changes (staged + unstaged + untracked)\n```\n\n## Options\n\n```\n# Comment filtering\n--inline       Remove only line comments\n--block        Remove only block comments\n\n# Processing modes\n-r, --recursive    Process directories recursively\n--dry-run          Show what would be removed without making changes\n--backup           Create backup files before modification\n--verbose          Show detailed output\n--preserve-lines   Keep comment-only lines as empty lines\n-c, --context-lines Number of context lines to show in preview mode\n\n# Git-aware flags\n--changes-only Remove comments only from git changes\n--staged       Remove comments only from staged git changes\n--unstaged     Remove comments only from unstaged git changes\n\n# Configuration\n--config       Show current configuration and location\n--create-config Create example .shush.toml configuration file\n\n# Claude Code hooks\n--install-hook   Install Claude Code hooks for automatic comment cleanup\n--uninstall-hook Uninstall Claude Code hooks  \n--list-hooks     List current Claude Code hooks configuration\n--hook-status    Check if shush hooks are installed\n--project        Use project scope for hook operations (default: user-wide)\n\n# Utility\n--version      Show version information\n--llm          Show LLM-friendly usage guide\n--help         Show help message\n```\n\n## Examples\n\n### Python\n```python\n# Before\n# This is a comment\ndef hello():\n    # Comment-only line\n    print(\"Hello\")  # Inline comment\n\n# After: shush example.py\ndef hello():\n    print(\"Hello\")\n\n# After: shush example.py --preserve-lines\ndef hello():\n    \n    print(\"Hello\")\n```\n\n### Git Workflow\n```bash\n# Preview and clean staged changes\nshush --staged --dry-run          # 1. Review what will be cleaned  \nshush --staged                    # 2. Clean staged changes\ngit commit -m \"Clean code\"        # 3. Commit cleaned code\n```\n\n## How It Works\n\n- **Language Detection**: Auto-detects language from file extension\n- **String-Aware Parsing**: Preserves URLs and strings containing comment markers\n- **Git-Aware Processing**: Only processes changed lines for surgical precision\n- **Smart Preservation**: Configurable comment preservation via `.shush.toml` patterns\n- **Claude Code Integration**: Automatic cleanup via PostToolUse hooks\n\n## Requirements\n\n- Linux or macOS (x86_64 or ARM64)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosarraes%2Fshush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlosarraes%2Fshush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosarraes%2Fshush/lists"}