Answer: Gemini CLI looks for custom command files in two locations: user commands (global) in `~/.gemini/commands/` and project commands (local) in `/.gemini/commands/`. The project command takes precedence, so if a project command has the same name as a user command, the project command will always be used. Status: Confirmed Entry: tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence Revision: 1 Digest: sha256:ea195dd5d7521054 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:17:24Z Last changed: 2026-11-13T03:17:24Z Last verified: 2026-11-20T12:50:46Z Next check: 2026-11-21T12:50:46Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of User commands location | ~/.gemini/commands/ | [1] | 2026-11-20 Project commands location | /.gemini/commands/ | [1] | 2026-11-20 Precedence | project command will always be used | [1] | 2026-11-20 Sources: [1] Google. "Custom commands". https://geminicli.com/docs/cli/custom-commands.md Role: primary. Accessed: 2026-11-20T12:50:46Z Quote: "**User commands (global):** Located in `~/.gemini/commands/`." (Supports: User commands location) Quote: "**Project commands (local):** Located in `/.gemini/commands/`." (Supports: Project commands location) Quote: "the **project command will always be used.**" (Supports: Precedence) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 8f3295e8ca502b0c70bb3bf672f0dc0130ecb868fad4a88d5cac0f36ac6f3872 (captured 2026-11-13T03:17:24Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:17:24Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:50:46Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:50:46Z Last attempt: 2026-11-20T12:50:46Z Notes and limitations: Extracted automatically from a single official source (section "File locations and precedence"). Related: https://latestn.com/tool/gemini-cli/commands-and-shortcuts/customize-keybindings How do I customize keybindings in Gemini CLI? https://latestn.com/tool/gemini-cli/commands-and-shortcuts/default-keyboard-shortcuts What keyboard shortcuts does Gemini CLI have for editing input and navigating history? https://latestn.com/tool/gemini-cli/commands-and-shortcuts/enable-disable-skill-in-session How do I enable or disable an Agent Skill in Gemini CLI during a session? https://latestn.com/tool/gemini-cli/commands-and-shortcuts/cli-options What CLI options are available in Gemini CLI? https://latestn.com/tool/gemini-cli/commands-and-shortcuts/command-line-arguments What command-line arguments does Gemini CLI support? https://latestn.com/tool/gemini-cli/commands-and-shortcuts/custom-command-arguments How do I pass arguments to a Gemini CLI custom command? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:17:24Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence POST: https://latestn.com/dispute/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). Where does Gemini CLI look for custom command files and which location takes precedence? Revision 1, last verified 2026-11-20T12:50:46Z. https://latestn.com/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence (accessed 2026-11-21T10:06:41Z). @misc{LatestN_tool_gemini_cli_commands_and_shortcuts_custom_command_file_locations_precedence_r1, title = {Where does Gemini CLI look for custom command files and which location takes precedence?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence}}, note = {Revision 1; digest sha256:ea195dd5d7521054; last verified 2026-11-20T12:50:46Z; accessed 2026-11-21T10:06:41Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/commands-and-shortcuts/custom-command-file-locations-precedence