Skip to main content
info

This documentation is automatically synchronized from the claude-hub repository. Last updated: 2025-06-01

Claude GitHub Webhook Scripts

This document provides an overview of the scripts in this repository, organized by category and purpose.

Setup and Installation

ScriptDescriptionUsage
scripts/setup/setup.shMain setup script for the project./scripts/setup/setup.sh
scripts/setup/setup-precommit.shSets up pre-commit hooks./scripts/setup/setup-precommit.sh
scripts/setup/setup-claude-auth.shSets up Claude authentication./scripts/setup/setup-claude-auth.sh
scripts/setup/setup-secure-credentials.shSets up secure credentials./scripts/setup/setup-secure-credentials.sh

Build Scripts

ScriptDescriptionUsage
scripts/build/build.shBuilds the Docker images./scripts/build/build.sh

AWS Configuration and Credentials

ScriptDescriptionUsage
scripts/aws/create-aws-profile.shCreates AWS profiles programmatically./scripts/aws/create-aws-profile.sh <profile-name> <access-key-id> <secret-access-key> [region] [output-format]
scripts/aws/setup-aws-profiles.shSets up AWS profiles./scripts/aws/setup-aws-profiles.sh

Runtime and Execution

ScriptDescriptionUsage
scripts/runtime/start-api.shStarts the API server./scripts/runtime/start-api.sh
scripts/runtime/entrypoint.shContainer entrypoint scriptUsed automatically by Docker
scripts/runtime/claudecode-entrypoint.shClaude Code container entrypointUsed automatically by Docker
scripts/runtime/startup.shStartup script./scripts/runtime/startup.sh
scripts/runtime/claude-wrapper.shWrapper for Claude CLI./scripts/runtime/claude-wrapper.sh [args]

Network and Security

ScriptDescriptionUsage
scripts/security/init-firewall.shInitializes firewall for containers./scripts/security/init-firewall.sh
scripts/security/accept-permissions.shHandles permission acceptance./scripts/security/accept-permissions.sh
scripts/security/credential-audit.shAudits code for credential leaks./scripts/security/credential-audit.sh

Utility Scripts

ScriptDescriptionUsage
scripts/utils/ensure-test-dirs.shEnsures test directories exist./scripts/utils/ensure-test-dirs.sh
scripts/utils/setup-repository-labels.jsSets up GitHub repository labelsnode scripts/utils/setup-repository-labels.js owner/repo

Testing

All shell-based test scripts have been migrated to JavaScript E2E tests using Jest. Use the following npm commands:

JavaScript Test Files

Note: Shell-based test scripts have been migrated to JavaScript E2E tests using Jest. The following test files provide comprehensive testing:

Test FileDescriptionUsage
test/e2e/scenarios/container-execution.test.jsTests container functionalitynpm run test:e2e
test/e2e/scenarios/claude-integration.test.jsTests Claude integrationnpm run test:e2e
test/e2e/scenarios/docker-execution.test.jsTests Docker executionnpm run test:e2e
test/e2e/scenarios/security-firewall.test.jsTests security and firewallnpm run test:e2e

Running Tests

# Run all tests
npm test

# Run unit tests
npm run test:unit

# Run E2E tests
npm run test:e2e

# Run tests with coverage
npm run test:coverage

# Run tests in watch mode
npm run test:watch

Common Workflows

Setting Up for the First Time

# Set up the project
./scripts/setup/setup.sh

# Set up Claude authentication
./scripts/setup/setup-claude-auth.sh

# Set up secure credentials
./scripts/setup/setup-secure-credentials.sh

# Create AWS profile
./scripts/aws/create-aws-profile.sh claude-webhook YOUR_ACCESS_KEY YOUR_SECRET_KEY

Building and Running

# Build Docker images
./scripts/build/build.sh

# Start the API server
./scripts/runtime/start-api.sh

# Or use Docker Compose
docker compose up -d

Running Tests

# Run all tests
npm test

# Run E2E tests specifically
npm run test:e2e

# Run unit tests specifically
npm run test:unit

Notes

  • All shell-based test scripts have been migrated to JavaScript E2E tests for better maintainability and consistency.
  • The project uses npm scripts for most common operations. See package.json for available scripts.
  • Docker Compose is the recommended way to run the service in production.