gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Support user-defined custom slash commands

Open yusei-murai opened this issue 1 year ago • 4 comments

What would you like to be added?

I would like Gemini CLI to support custom slash commands defined by Markdown files in a .gemini/commands/ directory. These commands should allow for argument substitution ($ARGUMENTS), file inclusion (@file_path), and shell command output expansion (!shell_command) within their templates. The expanded prompt should be sent to Gemini and the AI response displayed in the CLI.

Why is this needed?

This feature would allow users to easily extend the CLI with their own reusable prompts and workflows, automate common tasks, and dynamically include content from files or shell commands. It would make the CLI much more flexible and powerful for advanced and power users.

Additional context

No response

yusei-murai avatar Jun 30 '25 17:06 yusei-murai

Sorry, didn't realize you were proposing a PR.

abhipatel12 avatar Jun 30 '25 17:06 abhipatel12

I added #2322 to PR.

yusei-murai avatar Jun 30 '25 18:06 yusei-murai

This is a duplicate of https://github.com/google-gemini/gemini-cli/issues/805 I believe is it not @yusei-murai

jackwotherspoon avatar Jul 09 '25 15:07 jackwotherspoon

This issue describes consistent failures in file-reading tools when using globs on Windows, which significantly impacts the agent's efficiency. While workarounds exist, the core functionality is degraded. Additionally, the reported CLI version (0.1.7) is significantly out of date; please verify if this issue persists in the latest version (0.59.0).

gemini-cli[bot] avatar Aug 26 '26 18:08 gemini-cli[bot]