Skip to content

mw gitlab duo ask

Releasev0.35.0 · cfeceb67

mw gitlab duo ask <prompt> [flags]

Generate Git commands from natural language using AI assistance.

Describe what you want to do in plain language, and GitLab Duo (Classic) suggests the appropriate Git commands. The AI provides both the commands and an explanation.

After you receive the suggested commands, you can execute them directly from the CLI. You must confirm each command before it runs.

Use this command to:

  • Retrieve forgotten Git commands.
  • Learn how to accomplish specific Git operations.
  • Get guidance on complex Git workflows.
  • Reduce context switching during development.
--git
Ask a question about Git. Default: true.
-h, --help
Show help for this command.
--no-interaction
Do not ask any interactive questions
--profile <string>
Saved account profile (login defaults to the verified username)
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Terminal window
$ glab duo ask list last 10 commit titles
> A list of Git commands to show the titles of the latest 10 commits with an explanation and an option to execute the commands.
$ glab duo ask how do I undo my last commit
> Suggestions for undoing the last commit with explanations of different approaches.
$ glab duo ask show me files changed in the last commit
> Commands to display files modified in the most recent commit.
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.