Slash Commands
Slash commands are built-in commands for Kimi Code CLI, used to control sessions, configuration, and debugging. Enter a command starting with / in the input box to trigger.
Shell mode
Some slash commands are also available in shell mode, including /help, /exit, /version, /editor, /changelog, /feedback, /export, and /import.
Help and info
/help
Display help information. Shows keyboard shortcuts, all available slash commands, and loaded skills in a fullscreen pager. Press q to exit.
Aliases: /h, /?
/version
Display Kimi Code CLI version number.
/changelog
Display the changelog for recent versions.
Alias: /release-notes
/feedback
Open the GitHub Issues page to submit feedback.
Account and configuration
/login
Log in or configure an API platform. After execution, first select a platform:
- Kimi Code: Automatically opens a browser for OAuth authorization
- Other platforms: Enter an API key, then select an available model
After configuration, settings are automatically saved to ~/.kimi/config.toml and reloaded. See Providers for details.
Alias: /setup
TIP
This command is only available when using the default configuration file. If a configuration was specified via --config or --config-file, this command cannot be used.
/logout
Log out from the current platform. This clears stored credentials and removes related configuration from the config file. After logout, Kimi Code CLI will automatically reload the configuration.
/model
Switch models and thinking mode.
This command first refreshes the available models list from the API platform. When called without arguments, displays an interactive selection interface where you first select a model, then choose whether to enable thinking mode (if the model supports it).
After selection, Kimi Code CLI will automatically update the configuration file and reload.
TIP
This command is only available when using the default configuration file. If a configuration was specified via --config or --config-file, this command cannot be used.
/editor
Set the external editor. When called without arguments, displays an interactive selection interface; you can also specify the editor command directly, e.g., /editor vim. After configuration, pressing Ctrl-O will open this editor to edit the current input content. See Keyboard shortcuts for details.
/reload
Reload the configuration file without exiting Kimi Code CLI.
/debug
Display debug information for the current context, including:
- Number of messages and tokens
- Number of checkpoints
- Complete message history
Debug information is displayed in a pager, press q to exit.
/usage
Display API usage and quota information, showing quota usage with progress bars and remaining percentages.
Alias: /status
TIP
This command only works with the Kimi Code platform.
/mcp
Display currently connected MCP servers and loaded tools. See Model Context Protocol for details.
Output includes:
- Server connection status (green indicates connected)
- List of tools provided by each server
Session management
/new
Create a new session and switch to it immediately, without exiting Kimi Code CLI. If the current session has no content, the empty session directory is automatically cleaned up.
/sessions
List all sessions in the current working directory, allowing switching to other sessions.
Alias: /resume
Use arrow keys to select a session, press Enter to confirm switch, press Ctrl-C to cancel.
/export
Export the current session context to a Markdown file for archiving or sharing.
Usage:
/export: Export to the current working directory with an auto-generated filename (format:kimi-export-<first 8 chars of session ID>-<timestamp>.md)/export <path>: Export to the specified path. If the path is a directory, the filename is auto-generated; if it is a file path, the content is written directly to that file
The exported file includes:
- Session metadata (session ID, export time, working directory, message count, token count)
- Conversation overview (topic, number of turns, tool call count)
- Complete conversation history organized by turns, including user messages, AI responses, tool calls, and tool results
/import
Import context from a file or another session into the current session. The imported content is appended as reference context, and the AI can use this information to inform subsequent interactions.
Usage:
/import <file_path>: Import from a file. Supports common text-based formats such as Markdown, plain text, source code, and configuration files; binary files (e.g., images, PDFs, archives) are not supported/import <session_id>: Import from the specified session ID. Cannot import the current session into itself
/clear
Clear the current session's context and start a new conversation.
Alias: /reset
/compact
Manually compact the context to reduce token usage. You can append custom instructions after the command to tell the AI which information to prioritize preserving during compaction, e.g., /compact preserve database-related discussions.
When the context is too long, Kimi Code CLI will automatically trigger compaction. This command allows manually triggering the compaction process.
Skills
/skill:<name>
Load a specific skill, sending the SKILL.md content to the Agent as a prompt. This command works for both standard skills and flow skills.
For example:
/skill:code-style: Load code style guidelines/skill:pptx: Load PPT creation workflow/skill:git-commits fix user login issue: Load the skill with an additional task description
You can append additional text after the command, which will be added to the skill prompt. See Agent Skills for details.
TIP
Flow skills can also be invoked via /skill:<name>, which loads the content as a standard skill without automatically executing the flow. To execute the flow, use /flow:<name> instead.
/flow:<name>
Execute a specific flow skill. Flow skills embed an Agent Flow diagram in SKILL.md. After execution, the Agent will start from the BEGIN node and process each node according to the flow diagram definition until reaching the END node.
For example:
/flow:code-review: Execute code review workflow/flow:release: Execute release workflow
TIP
Flow skills can also be invoked via /skill:<name>, which loads the content as a standard skill without automatically executing the flow.
See Agent Skills for details.
Workspace
/add-dir
Add an additional directory to the workspace scope. Once added, the directory is accessible to all file tools (ReadFile, WriteFile, Glob, Grep, StrReplaceFile, etc.) and its directory listing is shown in the system prompt. Added directories are persisted with the session state and automatically restored when resuming.
Usage:
/add-dir <path>: Add the specified directory to the workspace/add-dir: Without arguments, list already added additional directories
TIP
Directories already within the working directory do not need to be added, as they are already accessible. You can also add directories at startup via the --add-dir option. See kimi command for details.
Others
/init
Analyze the current project and generate an AGENTS.md file.
This command starts a temporary sub-session to analyze the codebase structure and generate a project description document, helping the Agent better understand the project.
/yolo
Toggle YOLO mode. When enabled, all operations are automatically approved and a yellow YOLO badge appears in the status bar; enter the command again to disable.
Note
YOLO mode skips all confirmations. Make sure you understand the potential risks.
/web
Switch to Web UI. Kimi Code CLI will start a Web UI server and open the current session in your browser, allowing you to continue the conversation in the Web UI. See Web UI for details.
Command completion
After typing / in the input box, a list of available commands is automatically displayed. Continue typing to filter commands with fuzzy matching support, press Enter to select.
For example, typing /ses will match /sessions, and /clog will match /changelog. Command aliases are also supported, such as typing /h to match /help.