kool-dev/kool
Overview
This skill provides a CLI for managing Docker-based development environments with simple, focused commands. It wraps docker-compose operations, lets you run one-off containers, execute commands inside service containers, view logs, and run project scripts defined in kool.yml. The goal is faster, less error-prone local development workflows for containerized web apps. It is lightweight and designed to keep common tasks readable and repeatable.
How this skill works
The CLI inspects your project root for docker-compose.yml and kool.yml (or you can set a different working directory with -w). It delegates lifecycle operations (start/stop/restart/status) to docker-compose, exposes an exec command to run commands inside service containers, and supports running transient docker containers via a docker subcommand. Project scripts from kool.yml can be listed or executed, and logs are available with tail and follow options.
When to use it
- Starting, stopping, or restarting all or specific services from a docker-compose setup.
- Opening an interactive shell or running maintenance commands inside a service container.
- Running temporary build or test containers without modifying compose files.
- Following service logs during development or debugging multi-service apps.
- Executing project-defined scripts (kool.yml) consistently across team members.
Best practices
- Always run the CLI from the project root (contains docker-compose.yml and kool.yml) or use -w to set the working directory.
- Use service names exactly as declared in docker-compose.yml to avoid targeting the wrong container.
- Use --rebuild when you need image updates and --purge only when you want to remove volumes (destructive).
- Pass environment variables with -e for ephemeral changes and prefer scripts in kool.yml for repeatable tasks.
- For complex shell logic (pipes, conditionals), run a shell inside a docker container (kool docker <image> bash -c "...") instead of multi-line kool scripts.
Example use cases
- Start the full development stack and follow app logs while developing a feature.
- Run database migrations inside the app container: kool exec app php artisan migrate.
- Run a one-off Node container to install packages or build assets: kool docker node npm run build.
- List available project scripts as JSON for integration with IDE tasks or CI helpers.
- Restart services with rebuilt images after updating Dockerfiles: kool restart --rebuild.
FAQ
Use -w or --working_dir to point the CLI to the project root that contains docker-compose.yml and kool.yml.
Can I pass arguments to kool.yml scripts?
Yes for single-line scripts: use kool run <script> -- <args>. Multi-line scripts do not accept extra args.
How do I run complex shell commands with pipes or conditionals?
Run a shell inside a temporary container: kool docker <image> bash -c "your complex command".