### Install Coolify Source: https://github.com/coollabsio/coolify/blob/v4.x/README.md Use this command to download and execute the Coolify installation script. Ensure you have curl installed. ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` -------------------------------- ### Start Coolify development environment Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Initializes the Coolify development environment. ```bash spin up ``` -------------------------------- ### Start Coolify Development Environment Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Commands to initialize the development environment. Use the sudo variant if permission errors occur on macOS. ```bash spin up ``` ```bash sudo spin up ``` -------------------------------- ### Verify Docker and Spin Installation Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Run these commands in your terminal to confirm that Docker and Spin have been installed correctly. This is a crucial step before proceeding with development. ```bash docker --version spin --version ``` -------------------------------- ### Install Coolify Nightly Source: https://github.com/coollabsio/coolify/blob/v4.x/RELEASE.md Use this command to install the nightly development version. This version is intended for testing and experimentation only. ```bash curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` -------------------------------- ### Start and Stop Development Environment Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Use these commands to manage the Docker Compose-based development environment. The app runs at localhost:8000 by default. ```bash spin up # or: docker compose -f docker-compose.dev.yml up -d ``` ```bash spin down # stop services ``` -------------------------------- ### Filter Routes by Method and Name Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Filter the `php artisan route:list` output by HTTP method (e.g., GET) and route name (e.g., users). Use `--except-vendor` or `--only-vendor` to manage vendor routes. ```bash php artisan route:list --method=GET --name=users --path=api --except-vendor ``` -------------------------------- ### Perform Broad Documentation Searches Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use multiple broad, topic-based queries with `search-docs` to find relevant documentation. Expect the most relevant results to appear first. ```bash search-docs --queries="['rate limiting', 'routing rate limiting', 'routing']" ``` -------------------------------- ### Configure Buildx Action for Staging Builds (AMD64) Source: https://github.com/coollabsio/coolify/blob/v4.x/backlog/tasks/task-00001 - Implement-Docker-build-caching-for-Coolify-staging-builds.md Set up Docker Buildx for AMD64 jobs in the staging build workflow. This includes adding the setup-buildx-action and configuring cache-from/cache-to for registry caching. ```yaml - name: Set up Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push Docker image (amd64) uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: | coollabsio/coolify:buildcache-amd64 coollabsio/coolify:latest cache-from: type=registry,ref=coollabsio/coolify:buildcache-amd64 cache-to: type=registry,ref=coollabsio/coolify:buildcache-amd64,mode=max ``` -------------------------------- ### Search Documentation with search-docs Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Always use `search-docs` before making code changes to find version-specific documentation. Pass a `packages` array to scope results when necessary. ```bash search-docs ``` -------------------------------- ### Configure Buildx Action for Staging Builds (AARCH64) Source: https://github.com/coollabsio/coolify/blob/v4.x/backlog/tasks/task-00001 - Implement-Docker-build-caching-for-Coolify-staging-builds.md Set up Docker Buildx for AARCH64 jobs in the staging build workflow. This includes adding the setup-buildx-action and configuring cache-from/cache-to for registry caching. ```yaml - name: Set up Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push Docker image (aarch64) uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: | coollabsio/coolify:buildcache-aarch64 coollabsio/coolify:latest cache-from: type=registry,ref=coollabsio/coolify:buildcache-aarch64 cache-to: type=registry,ref=coollabsio/coolify:buildcache-aarch64,mode=max ``` -------------------------------- ### List All Artisan Commands Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Discover available Artisan commands by running `php artisan list`. Use `php artisan [command] --help` to check parameters for a specific command. ```bash php artisan list ``` -------------------------------- ### Create Model with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Generate new models using `php artisan make:model`. Use `php artisan make:model --help` to explore available options for creating factories and seeders. ```bash php artisan make:model --help ``` -------------------------------- ### Create Generic PHP Class with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use `php artisan make:class` to create a generic PHP class. Always pass `--no-interaction` for automated processes. ```bash php artisan make:class --no-interaction ``` -------------------------------- ### List Available Artisan Commands Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use `php artisan list` to see all available Artisan commands. Use `php artisan [command] --help` to view parameters for a specific command. ```bash php artisan list ``` ```bash php artisan [command] --help ``` -------------------------------- ### Frontend Development Commands Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Commands for managing the Vite development server and building the production frontend assets. ```bash npm run dev # vite dev server ``` ```bash npm run build # production build ``` -------------------------------- ### Multiple Documentation Search Queries Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Use multiple broad, topic-based queries within the `queries` array for OR logic in documentation searches. Expect the most relevant results first. ```bash search-docs --queries "['authentication', 'middleware']" ``` -------------------------------- ### Search Documentation with Specific Packages Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Scope documentation searches by providing an array of relevant packages to the `search-docs` tool. This helps narrow down results to specific areas of the application. ```bash search-docs --packages="["package1", "package2"]" ``` -------------------------------- ### Enable Telescope Debugging Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Add this configuration to your .env file to enable the Telescope debugging tool. ```env TELESCOPE_ENABLED=true ``` -------------------------------- ### Run Pest Tests with Options Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Execute tests using `php artisan test --compact`. Filter tests by name using the `--filter` option. ```bash php artisan test --compact ``` ```bash php artisan test --compact --filter=testName ``` -------------------------------- ### PHP Constructor Property Promotion Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use PHP 8 constructor property promotion for concise dependency injection. Avoid empty zero-parameter `__construct()` methods unless the constructor is private. ```php public function __construct(public GitHub $github) { } ``` -------------------------------- ### Run Database Migrations Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Execute this command after switching branches or modifying the database structure to ensure the schema is up-to-date. ```bash docker exec -it coolify php artisan migrate ``` -------------------------------- ### Read Configuration Values with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Access configuration values using dot notation with `php artisan config:show`. Alternatively, read configuration files directly from the `config/` directory. ```bash php artisan config:show app.name ``` ```bash php artisan config:show database.default ``` -------------------------------- ### Create Pest Tests with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Use `php artisan make:test --pest {name}` to create new Pest tests. Run tests using `php artisan test --compact` and filter with `--filter=testName`. ```bash php artisan make:test --pest {name} ``` ```bash php artisan test --compact ``` ```bash php artisan test --compact --filter=testName ``` -------------------------------- ### Create Pest Test with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use `php artisan make:test --pest {name}` to create a new Pest test file. ```bash php artisan make:test --pest {name} ``` -------------------------------- ### Generate Feature and Unit Tests with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Use `php artisan make:test` to create feature tests. Add the `--unit` flag for unit tests. Most tests should be feature tests. ```bash php artisan make:test [options] {name} ``` ```bash php artisan make:test --unit [options] {name} ``` -------------------------------- ### Inspect Database Schema with database-schema Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Utilize `database-schema` to examine table structures. This is recommended before creating new migrations or models. ```bash database-schema ``` -------------------------------- ### Run Specific Tests with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Execute a minimum number of tests needed for code quality and speed. Use `php artisan test --compact` with a specific filename or filter to target tests. ```bash php artisan test --compact path/to/YourTest.php ``` -------------------------------- ### Resolve Absolute URLs with get-absolute-url Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use `get-absolute-url` to determine the correct scheme, domain, and port for project URLs. Always use this tool before sharing a URL. ```bash get-absolute-url ``` -------------------------------- ### Check Docker Containers Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Use this command to identify the IP address or hostname of your PostgreSQL database container if migrations fail. ```bash docker ps ``` -------------------------------- ### Inspect Routes with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use `php artisan route:list` to inspect all registered routes. You can filter the output using various flags like `--method`, `--name`, and `--path`. ```bash php artisan route:list ``` -------------------------------- ### Create Feature Test with Artisan Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Generate feature tests using `php artisan make:test [options] {name}`. For unit tests, pass the `--unit` flag. ```bash php artisan make:test --unit [options] {name} ``` ```bash php artisan make:test [options] {name} ``` -------------------------------- ### Format Code with Laravel Pint Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Before committing changes, format PHP files using `vendor/bin/pint --dirty --format agent`. Use `vendor/bin/pint --format agent` to fix formatting issues. ```bash vendor/bin/pint --dirty --format agent ``` ```bash vendor/bin/pint --format agent ``` -------------------------------- ### Run Read-Only Database Queries with database-query Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use the `database-query` tool for read-only database operations instead of raw SQL in Tinker. This ensures safe and efficient data inspection. ```bash database-query ``` -------------------------------- ### Execute PHP Code in App Context with Tinker Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use `php artisan tinker --execute 'Your::code();'` to run PHP code within the application context for debugging. Always use single quotes around the command to prevent shell expansion. ```bash php artisan tinker --execute 'Your::code();' ``` -------------------------------- ### Reset Development Database Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Use this command to wipe the database and re-seed it with default values for a clean development state. ```bash docker exec -it coolify php artisan migrate:fresh --seed ``` -------------------------------- ### Add Composer Cache Mount to Dockerfile Source: https://github.com/coollabsio/coolify/blob/v4.x/backlog/tasks/task-00001 - Implement-Docker-build-caching-for-Coolify-staging-builds.md Integrate BuildKit cache mounts for Composer dependencies in the production Dockerfile to speed up builds. This should be added at the specified line. ```dockerfile --mount=type=cache,target=/var/www/.composer/cache ``` -------------------------------- ### Manually Update/Downgrade Coolify Source: https://github.com/coollabsio/coolify/blob/v4.x/RELEASE.md Use this command to update or downgrade your Coolify instance to a specific version. Replace `` with the desired version number. Note that downgrading is supported but not recommended due to potential database migration issues. ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s ``` -------------------------------- ### Add NPM Cache Mount to Dockerfile Source: https://github.com/coollabsio/coolify/blob/v4.x/backlog/tasks/task-00001 - Implement-Docker-build-caching-for-Coolify-staging-builds.md Integrate BuildKit cache mounts for NPM dependencies in the production Dockerfile to speed up builds. This should be added at the specified line. ```dockerfile --mount=type=cache,target=/root/.npm ``` -------------------------------- ### Run Tests with Pest Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Execute tests using Pest. You can run all tests, a single test by name, or tests within a specific file. ```bash php artisan test --compact # all tests ``` ```bash php artisan test --compact --filter=testName # single test ``` ```bash php artisan test --compact tests/Feature/SomeTest.php # specific file ``` -------------------------------- ### Format Code with Pint Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Format changed files using Pint with the Laravel preset. The --dirty flag ensures only modified files are processed. ```bash vendor/bin/pint --dirty --format agent # format changed files ``` -------------------------------- ### Read Browser Logs with browser-logs Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Access browser logs, errors, and exceptions using `browser-logs`. Only recent logs are relevant; ignore older entries. ```bash browser-logs ``` -------------------------------- ### PHP Explicit Type Declarations Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Employ explicit return type declarations and type hints for all method parameters in PHP. This improves code clarity and reduces potential errors. ```php function isAccessible(User $user, ?string $path = null): bool ``` -------------------------------- ### Execute Tinker Command Source: https://github.com/coollabsio/coolify/blob/v4.x/CLAUDE.md Execute PHP code within the application context using `php artisan tinker --execute`. Always use single quotes around the command to prevent shell expansion. ```bash php artisan tinker --execute 'Your::code();' php artisan tinker --execute 'User::where("active", true)->count();' ``` -------------------------------- ### Resolve Vite Manifest Error Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md If you encounter a Vite manifest error, try running `npm run build` or ask the user to run `npm run dev` or `composer run dev`. ```bash npm run build ``` ```bash npm run dev ``` ```bash composer run dev ``` -------------------------------- ### Execute Tinker Code with PHP Strings Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md When executing PHP code in Tinker that contains double quotes for strings, ensure the outer command uses single quotes. This prevents conflicts and ensures correct execution. ```bash php artisan tinker --execute 'User::where("active", true)->count();' ``` -------------------------------- ### Prune unused Docker images Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Removes all unused Docker images to free up space. ```bash docker image prune -a ``` -------------------------------- ### Remove Coolify containers Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Stops and removes all containers associated with the Coolify development environment. ```bash docker rm coolify coolify-db coolify-redis coolify-realtime coolify-testing-host coolify-minio coolify-vite-1 coolify-mail ``` -------------------------------- ### Remove Coolify volumes Source: https://github.com/coollabsio/coolify/blob/v4.x/CONTRIBUTING.md Deletes persistent data volumes. Ensure the volume names match your local configuration if they lack the 'coolify' prefix. ```bash docker volume rm coolify_dev_backups_data coolify_dev_postgres_data coolify_dev_redis_data coolify_dev_coolify_data coolify_dev_minio_data ``` -------------------------------- ### PHP PHPDoc Blocks Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Prefer PHPDoc blocks over inline comments in PHP. Use inline comments only for exceptionally complex logic to maintain code readability. ```php /** * @param User $user * @param string|null $path * @return bool */ function isAccessible(User $user, ?string $path = null): bool ``` -------------------------------- ### PHP Array Shape Type Definitions Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Utilize array shape type definitions within PHPDoc blocks in PHP for better type hinting and code understanding. ```php /** * @param array{id: int, name: string} */ function processData(array $data): void; ``` -------------------------------- ### PHP Enum Key Casing Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Use TitleCase for Enum keys in PHP, such as `FavoritePerson`, `BestLake`, or `Monthly`, to maintain consistent naming conventions. ```php enum FavoritePerson { case John; case Jane; } ``` -------------------------------- ### Limit Eagerly Loaded Records in Laravel 12 Source: https://github.com/coollabsio/coolify/blob/v4.x/AGENTS.md Laravel 12 allows limiting eagerly loaded records directly within the query using methods like `latest()` and `limit()`. ```php $query->latest()->limit(10); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.