Skip to content
AgentAtlas

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.

Compare: custom slash commands in every AI coding agent →

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.

Sources

More Junie guides

Reviewed Oct 23, 2026. Settings change often; the linked vendor docs are the source of truth.

Built an MCP server? Get it listed everywhere →

Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →