Repository navigation
help
This document explains the behavior of the help command in DAM, including how to invoke it, what it outputs, and a comprehensive summary of all available operations.
The help command provides inline documentation, usage examples, and an overview of all discovered applications. It is the built-in reference manual designed to be instantly accessible from the terminal.
There are multiple ways to invoke the help output. DAM intercepts standard help flags and empty invocations to display the usage summary:
# Explicit invocations
<cmd> help
<cmd> --help
<cmd> -h
# Implicit invocation
<cmd>If you invoke your DAM command (e.g., dkr) without providing any arguments, the script automatically defaults to printing the help output.
When invoked, the help command outputs a structured guide consisting of the following sections:
Displays the utility's name and its current version (e.g., DAM (Docker Apps Lifecycle Manager) v1.1.0).
Lists all the actions DAM supports. This is dynamically generated based on the script's capabilities, grouped by category:
-
Lifecycle Commands:
start,stop,restart,recreate,force-recreate(orfrec),pause,unpause,update,cleanup,delete. -
Information Commands:
status,logs,get,list. -
System Commands:
install,config,self-update,uninstall,help.
Provides concrete examples of how to format commands, use the <app> selector, and combine multiple arguments. This section explicitly demonstrates the all, all except, and [using files...] syntax. When no using file resolves, stop, recreate, force-recreate, and delete fail; the other Compose actions use the default Compose file.
The help output dynamically scans your system based on the SEARCH_DIRS configured in /etc/docker-app-manager.conf and prints a columnar list of all discovered applications.
- The list is divided by the search root (e.g., apps found in
/opt/stacksvs$HOME/apps). - It clearly separates excluded apps (those matching
EXCLUDE_DIRS) at the bottom of the list.
Below is a comprehensive technical mapping of every DAM command to its underlying Docker implementation and the scope of its execution:
| Command | Underlying Docker/Compose Command(s) | Scope |
|---|---|---|
start |
docker compose up -d |
Project |
stop |
docker compose stop |
Project |
restart |
docker compose restart |
Project |
recreate |
docker compose down --remove-orphans → docker compose up -d
|
Project |
force-recreate / frec
|
docker compose down --remove-orphans -t 0 → docker compose up -d --force-recreate
|
Project |
pause |
docker compose pause |
Project |
unpause |
docker compose unpause |
Project |
delete |
docker compose down --remove-orphans [-v] [--rmi all] + global dangling cleanup |
Project + Host |
update |
pull [--ignore-buildable] → build --pull → up -d (or custom script) + global dangling cleanup |
Project + Host |
status |
docker ps -a (filtered) + docker stats --no-stream
|
Containers |
list |
find + docker ps -a (labels) |
Discovery |
get |
docker ps -a + docker inspect (filtered) |
Containers |
logs |
docker compose logs [flags] |
Project |
cleanup |
docker image prune [-a] -f, docker network prune -f, docker volume prune [-a] -f, docker buildx prune -f
|
Host |
debug |
(not yet implemented) | - |
install |
File operations (symlinks, config) | System |
config |
File operations (config update) | System |
self-update |
curl + file operations |
System |
uninstall |
File removal | System |
help |
Outputs usage summary | CLI |
When help is invoked:
- DAM calls the internal
usage()function. - The
usage()function uses the configuredCUSTOM_CMD_NAMEto format the example commands (e.g., showingdkr startinstead of./dam.sh start). - It triggers
list_available_apps()which reads the filesystem to generate the current app inventory. - The script exits successfully (
exit 0).