add_copyright

Add copyright headers and footers to source files in a project using ~/.claude/tools/add_copyright_headers.py

Add Copyright Headers

Add copyright headers and footers to source files in a project.

Instructions

  1. Run the script at ~/.claude/tools/add_copyright_headers.py

  2. Pass --project-dir to specify the project directory (defaults to current directory)

  3. The script reads project_config.json from the project root for project name

  4. Supports: Python (.py), SQL (.sql), CSS (.css), JavaScript (.js), HTML (.html)

Common Usage

# Preview changes (dry run)
python ~/.claude/tools/add_copyright_headers.py --project-dir /path/to/project --dry-run

# Check which files need headers
python ~/.claude/tools/add_copyright_headers.py --project-dir /path/to/project --check

# Apply headers to all files
python ~/.claude/tools/add_copyright_headers.py --project-dir /path/to/project

# Only process Python files
python ~/.claude/tools/add_copyright_headers.py --project-dir /path/to/project --type py

Options

  • --dry-run - Preview changes without modifying files
  • --check - Only check which files need headers
  • --type - Only process specific file type (py, sql, css, js, html)
  • --include-init - Include init.py files
  • --no-footer - Skip adding footer