Skip to main content

A CLI tool that provides shorthand aliases for common docker compose commands.

Project description

Fast DCP

🚀 A CLI tool that provides shorthand aliases for common docker compose commands.

🐳 Tired of Typing docker compose Every Time?

How many times have you typed docker compose up --build today? Fast DCP cuts it down to dcpu -b — same result, a fraction of the keystrokes.

🆕 Highlights

Interactive file & profile selection

Running -f or -pf without arguments auto-detects compose files and profiles, letting you choose interactively.

$ dcpu -f
☑ Found 2 docker-compose files!
    1. docker-compose.yml
    2. docker-compose.prod.yml
Enter your choices (e.g., 1,3,4) or 'Q' to quit:

$ dcpu -pf
☑ Found 2 profiles!
    1. dev
    2. prod
Enter your choices (e.g., 1,3,4) or 'Q' to quit:

--wait option

# Block until all services are healthy
dcpu -w

Sample Usage

# docker compose up --build
dcpu -b
# docker compose -f docker-compose.prod.yml up -d
dcpu -df docker-compose.prod.yml
# docker compose exec app bash
dcpe app
# docker compose exec db psql -U user -d mydb
dcpe db -- psql -U user -d mydb
# docker compose restart app
dcp re app

Install fast-dcp

Quick Install (Recommended)

# Using pipx
pipx install fast-dcp
# OR using uv
uv tool install fast-dcp

Not familiar with Python tooling?

If you don't have pipx or uv installed yet:

Windows
python -m pip install --user pipx
python -m pipx ensurepath
# Restart terminal, then:
pipx install fast-dcp
macOS
brew install pipx
pipx ensurepath
pipx install fast-dcp
Linux (Ubuntu/Debian)
pip install pipx
pipx ensurepath
pipx install fast-dcp

✨ Features

  • Short Aliases: dcp u, dcp b, dcp e — fewer keystrokes for common commands
  • Dedicated Commands: dcpu and dcpe for frequent up/exec workflows
  • Zero Config: No configuration files needed — just install and run
  • Cross-Platform: Works on Windows, macOS, and Linux

❓ FAQ

Why use pipx or uv tool instead of pip?

Both pipx and uv tool install CLI tools in isolated environments, so fast-dcp won't conflict with other Python packages. The commands (dcp, dcpu, dcpe) are available globally without activating a virtual environment. uv tool is the faster alternative if you already use uv.

🔧 Requirements

  • Python 3.11+
  • Docker with Compose V2 (docker compose — not docker-compose)

List of Commands

Bash Command Executed Docker Command
dcp -
dcp up(u) docker compose up
dcp up(u) container_name docker compose up container_name
dcp up(u) -f path1 path2... docker compose -f path1 -f path2 up
dcp up(u) -pf dev prod docker compose --profile dev --profile prod up
dcp up(u) -p project_name... docker compose -p project_name up
dcp up(u) -d docker compose up -d
dcp build(b) docker compose build
dcp build(b) container_name docker compose build container_name
dcp build(b) -f path1 path2... docker compose -f path1 -f path2... build
dcp build(b) -p project_name... docker compose -p project_name build
dcp exec(e) container_name docker compose exec container_name bash
dcp exec(e) container_name args1 args2... docker compose exec container_name args1 args2...
dcp run container_name docker compose run container_name bash
dcp run container_name args1 args2... docker compose run container_name args1 args2...
dcp restart(re) docker compose restart
dcp restart(re) container_name docker compose restart container_name
dcp ps docker compose ps
dcp ps -a docker compose ps --all
dcp ps -st running docker compose ps --status running
dcp logs(l) docker compose logs
dcp logs(l) container_name docker compose logs container_name
dcp logs(l) container_name -f docker compose logs container_name -f
dcp stop(s) docker compose stop
dcp stop(s) container_name docker compose stop container_name
dcp down docker compose down
dcp down -ro docker compose down --remove_orphans
dcpu docker compose up
dcpu -f path1 path2... docker compose -f path1 -f path2... up
dcpu -p project_name... docker compose -p project_name up
dcpu --build(-b) docker compose up --build
dcpu --build(-b) -f path1 path2... docker compose -f path1 -f path2... up --build
dcpu --detach(-d) docker compose up -d
dcpe container_name docker compose exec container_name bash
dcpe container_name bash docker compose exec container_name bash
dcpe container_name args1 args2 ... docker compose exec container_name args1 args2...

License

MIT LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_dcp-0.3.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fast_dcp-0.3.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file fast_dcp-0.3.0.tar.gz.

File metadata

  • Download URL: fast_dcp-0.3.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fast_dcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f4816c1b94c51c6f344a6d096676bbe607669e824f2c041d474a112a79a0c1f5
MD5 284d4b698871837dd0eac1d916ac4b44
BLAKE2b-256 c60bfb96bc137d57ece2f9a03510775e41ae30cf3a4f84305df0cf6402f64792

See more details on using hashes here.

File details

Details for the file fast_dcp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fast_dcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fast_dcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4151f3158f84148e7c3116decf3cc6e30c0cc781116ba4e2afed01dede2b3185
MD5 ecfec9803cb0591c61869ae9214e78dc
BLAKE2b-256 8dea84f20d79d85104c248517b15f27c103a2c3a0f20fe8e24604ba37a4469f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page