-i, --interactive (Interactive): Prompt for confirmation before each step instead of acting automatically. Interactive mode makes a command ask before each step. rm -i asks before deleting every file. cp -i asks before overwriting. git add -i and git rebase -i open a menu or an editor where you choose what happens to each change or commit.
Frequently asked questions about -i, --interactive (Interactive)
How is -i, --interactive (Interactive) used in practice?
It is slower on purpose. When you are deleting a handful of files in a folder you do not know well, a prompt per file is a cheap safety net. Some systems alias rm to rm -i for exactly this reason.
What should you keep in mind with -i, --interactive (Interactive)?
In scripts and CI, interactive mode is a problem, because nobody is there to answer. A job that waits for input will hang until it times out. Scripts should either use non-interactive flags such as --yes or make the decision in code. Keep the prompts for the moments a person is at the keyboard.
Use before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.
Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state — even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill — `docker rm`,
Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.