forked from claude-did-this/claude-hub
This commit reorganizes all scripts in the repository into a more structured directory layout for better maintainability: - Categorizes scripts by functionality (setup, build, aws, runtime, security, utils) - Organizes test scripts into logical categories - Consolidates redundant scripts with unified interfaces - Adds backward compatibility wrappers - Adds detailed SCRIPTS.md documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
4.8 KiB
4.8 KiB
Script Organization Proposal
Categories of Scripts
1. Setup and Installation
scripts/setup.sh- Main setup script for the projectscripts/setup-precommit.sh- Sets up pre-commit hookssetup-claude-auth.sh- Sets up Claude authenticationsetup-new-repo.sh- Sets up a new clean repositorycreate-new-repo.sh- Creates a new repository
2. Build Scripts
build-claude-container.sh- Builds the Claude containerbuild-claudecode.sh- Builds the Claude Code runner Docker imageupdate-production-image.sh- Updates the production Docker image
3. AWS Configuration and Credentials
scripts/create-aws-profile.sh- Creates AWS profiles programmaticallyscripts/migrate-aws-credentials.sh- Migrates AWS credentialsscripts/setup-aws-profiles.sh- Sets up AWS profilesupdate-aws-creds.sh- Updates AWS credentials
4. Runtime and Execution
start-api.sh- Starts the API serverentrypoint.sh- Container entrypoint scriptclaudecode-entrypoint.sh- Claude Code container entrypointstartup.sh- Startup scriptclaude-wrapper.sh- Wrapper for Claude CLI
5. Network and Security
init-firewall.sh- Initializes firewall for containersaccept-permissions.sh- Handles permission acceptancefix-credential-references.sh- Fixes credential references
6. Testing
test/test-full-flow.sh- Tests the full workflowtest/test-claudecode-docker.sh- Tests Claude Code Docker setuptest/test-github-token.sh- Tests GitHub tokentest/test-aws-profile.sh- Tests AWS profiletest/test-basic-container.sh- Tests basic container functionalitytest/test-claude-direct.sh- Tests direct Claude integrationtest/test-firewall.sh- Tests firewall configurationtest/test-direct-claude.sh- Tests direct Claude accesstest/test-claude-no-firewall.sh- Tests Claude without firewalltest/test-claude-installation.sh- Tests Claude installationtest/test-aws-mount.sh- Tests AWS mount functionalitytest/test-claude-version.sh- Tests Claude versiontest/test-container-cleanup.sh- Tests container cleanuptest/test-claude-response.sh- Tests Claude responsetest/test-container-privileged.sh- Tests container privileged modetest/test-with-auth.sh- Tests with authentication
7. Utility Scripts
scripts/ensure-test-dirs.sh- Ensures test directories existprepare-clean-repo.sh- Prepares a clean repositoryvolume-test.sh- Tests volume mounting
Proposed Directory Structure
/claude-repo
├── scripts/
│ ├── setup/
│ │ ├── setup.sh
│ │ ├── setup-precommit.sh
│ │ ├── setup-claude-auth.sh
│ │ ├── setup-new-repo.sh
│ │ └── create-new-repo.sh
│ ├── build/
│ │ ├── build-claude-container.sh
│ │ ├── build-claudecode.sh
│ │ └── update-production-image.sh
│ ├── aws/
│ │ ├── create-aws-profile.sh
│ │ ├── migrate-aws-credentials.sh
│ │ ├── setup-aws-profiles.sh
│ │ └── update-aws-creds.sh
│ ├── runtime/
│ │ ├── start-api.sh
│ │ ├── entrypoint.sh
│ │ ├── claudecode-entrypoint.sh
│ │ ├── startup.sh
│ │ └── claude-wrapper.sh
│ ├── security/
│ │ ├── init-firewall.sh
│ │ ├── accept-permissions.sh
│ │ └── fix-credential-references.sh
│ └── utils/
│ ├── ensure-test-dirs.sh
│ ├── prepare-clean-repo.sh
│ └── volume-test.sh
├── test/
│ ├── integration/
│ │ ├── test-full-flow.sh
│ │ ├── test-claudecode-docker.sh
│ │ └── ...
│ ├── aws/
│ │ ├── test-aws-profile.sh
│ │ ├── test-aws-mount.sh
│ │ └── ...
│ ├── container/
│ │ ├── test-basic-container.sh
│ │ ├── test-container-cleanup.sh
│ │ ├── test-container-privileged.sh
│ │ └── ...
│ ├── claude/
│ │ ├── test-claude-direct.sh
│ │ ├── test-claude-no-firewall.sh
│ │ ├── test-claude-installation.sh
│ │ ├── test-claude-version.sh
│ │ ├── test-claude-response.sh
│ │ └── ...
│ ├── security/
│ │ ├── test-firewall.sh
│ │ ├── test-with-auth.sh
│ │ └── test-github-token.sh
│ └── utils/
│ └── ...
└── ...
Implementation Plan
- Create the new directory structure
- Move scripts to their appropriate categories
- Update references in scripts to point to new locations
- Update documentation to reflect new organization
- Create wrapper scripts if needed to maintain backward compatibility