CLI Command Reference
Modern syntax guide for command-line tools
27 commands
/help
session
Display help information for commands or general usage guide
Syntax
/help [command]Example
/help /help memory
/chat save
session
Save current conversation with optional custom name
Syntax
/chat save [name]Example
/chat save project-discussion /chat save
/chat resume
session
Resume a previously saved conversation
Syntax
/chat resume [name]Example
/chat resume project-discussion /chat resume
/compress
session
Compress conversation context to save memory while preserving key information
Syntax
/compressExample
/compress
/memory show
memory
Display current memory contents and stored information
Syntax
/memory showExample
/memory show
/memory refresh
memory
Refresh and update memory with recent conversation context
Syntax
/memory refreshExample
/memory refresh
/restore
system
Undo recent modifications and restore previous state
Syntax
/restoreExample
/restore
/stats
system
Show conversation statistics including message count and tokens used
Syntax
/statsExample
/stats
/theme
system
Change interface theme or toggle between themes
Syntax
/theme [dark|light|auto]Example
/theme dark /theme auto
/clear
system
Clear the current conversation screen
Syntax
/clearExample
/clear
/quit
system
Exit the current session safely
Syntax
/quitExample
/quit
@file
file
Inject single file content into conversation context
Syntax
@file [path/to/file]Example
@file src/components/Header.tsx @file package.json
@dir
file
Inject entire directory structure and contents
Syntax
@dir [path/to/directory]Example
@dir src/components /@dir ./config
!cmd
shell
Execute single shell command and return output
Syntax
![command]Example
!ls -la !npm run build !git status
!
shell
Toggle interactive shell mode for multiple commands
Syntax
!Example
! # Now in shell mode ls cd src pwd
create
system
Create new project with specified name and structure
Syntax
create [project-name]Example
create my-react-app create api-server
edit
file
Edit specific file with described changes
Syntax
edit [file] [changes]Example
edit src/App.js add dark mode toggle edit package.json update dependencies
add
system
Add new feature or component to existing project
Syntax
add [feature/component]Example
add authentication system add responsive navigation
fix
system
Fix specified issue or bug in the codebase
Syntax
fix [issue/bug]Example
fix responsive layout issues fix memory leak in useEffect
/help
system
Display help information for Qwen CLI commands
Syntax
/help [command]Example
/help /help generate
/generate
system
Generate code, text, or other content based on description
Syntax
/generate [type] [description]Example
/generate component "a login form with email and password" /generate function "calculate fibonacci sequence"
/edit
file
Edit a file with specific instructions
Syntax
/edit [file] [instructions]Example
/edit src/App.tsx "add a dark mode toggle" /edit package.json "update dependencies to latest versions"
/explain
file
Explain code or file content in detail
Syntax
/explain [code/file]Example
/explain src/components/Button.tsx /explain complex algorithm in utils.ts
/review
file
Review code for potential issues, improvements, or security concerns
Syntax
/review [file/directory]Example
/review src/components /review api/routes/auth.js
/test
file
Generate or update tests for a file or component
Syntax
/test [file/component]Example
/test src/components/Button.tsx /test api/services/userService.js
/refactor
file
Refactor code following best practices and design patterns
Syntax
/refactor [file] [instructions]Example
/refactor src/utils.js "convert to TypeScript" /refactor components to use hooks
/find
file
Find files, functions, or code snippets in the project
Syntax
/find [query]Example
/find "authentication functions" /find "components using useState"