Repository navigation
commands
This page is the command map for DAM. It describes the parsing and dispatch behavior implemented by dam.sh; command-specific pages contain the complete operational details.
DAM can be called in three ways:
# Custom-prefix command installation('dkr' is default command name).
dkr update <app-name>
# Direct script invocation.
./dam.sh update <app-name>
# Raw-command installation, where the symlink name supplies the action.
update <app-name>When the script is invoked through a symlink named after a supported action, it prepends that action internally. For example, frec <app-name> is parsed as force-recreate <app-name>.
Operational commands require all of the following before DAM processes apps:
- Bash 4.4 or later
- the
dockercommand - a reachable Docker daemon for the current user
- either
docker composeor legacydocker-compose - the
columnutility (provided byutil-linuxon many Linux distributions)
DAM prefers docker compose and falls back to docker-compose. It manages one Compose project per directory; it is not a Swarm or Kubernetes manager.
The standard selector is used by start, stop, kill, restart, recreate, force-recreate, delete, pause, unpause, update, status, logs, debug, list, and get.
| Pattern | Meaning |
|---|---|
<cmd> <action> app1 [using files...] |
One app directory |
<cmd> <action> app1 app2 [using files...] |
Multiple app directories, processed sequentially |
<cmd> <action> app1:service [using files...] |
Targets a specific service within an app (e.g. n8n:postgres) |
<cmd> <action> all [using files...] |
Every discovered app eligible for that action |
<cmd> <action> all except app1 app2 [using files...] |
All eligible apps other than the named apps |
App names are directory basenames or effective Compose project names read from a simple COMPOSE_PROJECT_NAME assignment in .env or a top-level name: in compose.yaml. App names cannot contain whitespace. DAM searches SEARCH_DIRS to MAX_SEARCH_DEPTH (default 3), skips configured EXCLUDE_DIRS, and recognizes an app when it contains a standard Compose filename or, for update discovery, an update*.sh file. A name resolving to multiple directories is an error.
Use app:service for Compose lifecycle actions, logs, update, and get to select a service. It is not supported by list or status; delete app:service is rejected because deletion operates on the whole project. If an update*.sh custom script is run, it receives no service filter and may update the entire app.
all must be the first selection token and except must immediately follow all. DAM validates each requested exclusion. An explicitly selected excluded app is skipped by normal lifecycle processing. get is special: it directly queries containers and does not use the lifecycle skip path.
Every non-get lifecycle command prints a per-app section and a final summary of successful, failed, and skipped apps. DAM continues after individual app failures, then exits nonzero if any app failed.
| Action | Compose command or behavior | Details |
|---|---|---|
start |
up -d |
Creates containers when needed; it is not Compose's start subcommand. |
stop |
stop |
Stops project containers without removing them. |
kill |
kill |
Force stops project containers immediately (SIGKILL) without removing them. |
restart |
restart |
Restarts existing containers in place. |
recreate |
Whole app: down --remove-orphans, then up -d; service: up -d --force-recreate <service>
|
Gracefully replaces the whole stack, or force-recreates only the selected service. |
force-recreate, frec
|
Whole app: down --remove-orphans -t 0, then up -d --force-recreate; service: stop -t 0, rm -f, then up -d --force-recreate <service>
|
Replaces the whole stack with zero shutdown timeout, or force-recreates one service. |
pause |
pause |
Pauses project containers. |
unpause |
unpause |
Resumes paused project containers. |
delete |
down --remove-orphans plus optional flags |
Removes a project and then runs safe dangling-image cleanup. |
update |
Pull, build, optionally recreate | Uses a custom update*.sh when found and permitted; otherwise preserves stopped state. |
Each Compose action executes inside the resolved application directory. Without the using modifier, DAM uses Docker Compose's default primary-file behavior, which searches in this strict priority order:
compose.yamlcompose.ymldocker-compose.yamldocker-compose.yml
You can explicitly override this default behavior by appending using <file1> <file2>... to the command.
The using modifier explicitly merges provided files in order by dynamically appending -f <file1> -f <file2>... flags to the underlying docker compose command.
DAM employs an intelligent shorthand resolution algorithm for every file requested via using. For each <file>, DAM searches the app directory, stopping at the first match it finds. The precedence order is:
-
Exact match:
<file> -
With
.yamlextension:<file>.yamlcompose.<file>.yamldocker-compose.<file>.yaml
-
With
.ymlextension:<file>.ymlcompose.<file>.ymldocker-compose.<file>.yml
Note
Because the bare filename without a prefix takes precedence for a given extension, if an app has both <name>.yml and compose.<name>.yml and you specify using <name>, <name>.yml will be selected. To target the prefixed file, you must be explicit (e.g., using compose.<name>).
If at least one custom file is matched using this logic, DAM strictly uses the found files and emits a warning for any requested file that was not found for that app. If none of the requested custom files can be resolved in an app, stop, kill, recreate, force-recreate, and delete report an error rather than falling back to the default Compose file. Other actions retain the default-file fallback. A permitted custom update script runs before Compose file resolution, so it does not use the selected files. At the very end of the run, DAM outputs a global summary listing any file shorthands that were not matched in any processed app, as well as a list of specific apps that were missing partially matched files.
Read the dedicated pages for start, stop, kill, restart, recreate, force-recreate, pause, unpause, delete, and update.
| Action | Purpose | Important behavior |
|---|---|---|
status |
Multi-project container state and one-shot resource usage | Uses Compose project labels with docker ps -a, then docker stats --no-stream. |
list |
Application inventory or selected-app details | No arguments perform a fast global inventory scan (columns: APP, PROJECT, LOCATION, COMPOSE, STATUS); list all is a targeted query and omits excluded apps (columns: APP, PROJECT, PATH, COMPOSE FILE, OVERALL STATE). |
get |
Scriptable container metadata | Requires one resource such as cid, iid, vol, mnt, net, port, state, health, or info. Supports app:service and full IDs. |
logs |
Project-wide Compose logs | Translates human-friendly keywords such as last 100, last 30m, live, since 30m, and time. Live logs are blocked for all. |
debug |
Placeholder | Prints a TODO per resolvable app; no diagnostics run yet. |
Use status, list, get, logs, and debug for exact output and parsing semantics.
<cmd> cleanup [net] [buildx] [vol] [img] [-y]
<cmd> cleanup all [-y]
<cmd> delete <selection> [-y] [with vol|img|net|buildx|all ...]cleanup is an existing convenience for a small set of common, host-wide prune operations; it is not app-scoped. It always handles dangling images and can additionally prune unused networks, volumes, build cache, or all unused images. Use Docker's native CLI for specialized maintenance or options DAM does not expose. cleanup is separate from project deletion and has its own prompts. all cannot be combined with a specific cleanup target.
delete all, kill all, stop all, recreate all, and force-recreate all require the exact interactive answer yes unless -y or --yes is supplied. The same flag bypasses cleanup's volume, network, and full-image confirmations. In non-interactive environments, destructive bulk operations requiring a prompt fail unless -y is present.
with belongs only to delete; once with appears, following arguments are parsed as cleanup modes except that -y/--yes is recognized wherever it occurs. with vol and with img are project-scoped Compose flags; they do not trigger host-wide pruning. See cleanup, delete, and Safety & Security.
The following commands require sudo because they modify /etc or /usr/local/bin:
| Command | Behavior |
|---|---|
install |
Runs the interactive setup, installs the core executable (copying a temporary source or linking a persistent one), and creates command symlinks. |
install refresh |
Rebuilds managed command symlinks non-interactively from the existing configuration. |
config |
Reruns the configuration wizard and updates command symlinks. |
self-update |
Downloads the HTTPS UPDATE_URL, validates basic script syntax and optional checksum, replaces the installed binary, then refreshes links. |
uninstall |
Removes DAM-managed command symlinks, the installed binary, and the configuration file. It does not remove Docker apps. |
See setup.md, config.md, and self-update.md for the system-management workflow.
help, -h, and --help print usage and the current Compose-based app list. A call with no action prints the same usage but exits with an error status. DAM also prints usage after an unknown action or invalid selection.
The help text is a useful quick reference, but the individual command pages are the authoritative explanation of confirmation rules, cleanup scope, and edge cases.