Junie
Junie Custom Slash Commands: .junie/commands Markdown Files and Arguments
How do I create custom slash commands in Junie CLI?
Create a Markdown file with a description in YAML frontmatter in .junie/commands for the project or ~/.junie/commands for yourself. The file name is the command name, so explain.md becomes /explain. Use $name placeholders in the prompt and pass values as name=value.
Where command files live
- Project: .junie/commands in the project root. Commit it to share with the team.
- User: ~/.junie/commands. Available in all local projects.
- You can also create commands with /commands and then Create New Command.
File format
.junie/commands/explain.md
--- description: Explains code in a given file --- Explain the code in $file and suggest improvements.
- description: a short summary of the command.
- allowPromptArgument: true (optional) adds a $prompt argument for free text.
Arguments
- Use $argumentName in the prompt, for example $file.
- With allowPromptArgument: true you can place $prompt yourself. If you do not, free text is added at the end after User Input:
- A command runs only when all its template arguments are given.
Run a command
In Junie CLI
/explain file=src/main.kt
Values can be bare or wrapped in single or double quotes. Junie CLI shows hints for missing arguments, and Tab completes a missing argument name.
Load commands from other folders
In ~/.junie/config.json, command-locations adds extra folders to search for commands, and command-default-locations turns the default folders on or off.
Get Junie settings changes by email
When a setting, flag or permission rule in this guide changes, it goes in the weekly AgentAtlas update, checked against the vendor docs. One email a week.
Sources
More on Junie
More Junie guides
Other guides
Reviewed Oct 13, 2026. Settings change often; the linked vendor docs are the source of truth.