mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
1.7 KiB
1.7 KiB
Qwen Code CLI
Within Qwen Code, packages/cli is the frontend for users to send and receive prompts with Qwen and other AI models and their associated tools. For a general overview of Qwen Code, see the main documentation page.
Navigating this section
- Authentication: A guide to setting up authentication with Qwen OAuth and OpenAI-compatible providers.
- Commands: A reference for Qwen Code CLI commands (e.g.,
/help,/tools,/theme). - Configuration: A guide to tailoring Qwen Code CLI behavior using configuration files.
- Headless Mode: A comprehensive guide to using Qwen Code programmatically for scripting and automation.
- Token Caching: Optimize API costs through token caching.
- Themes: A guide to customizing the CLI's appearance with different themes.
- Tutorials: A tutorial showing how to use Qwen Code to automate a development task.
- Welcome Back: Learn about the Welcome Back feature that helps you resume work seamlessly across sessions.
Non-interactive mode
Qwen Code can be run in a non-interactive mode, which is useful for scripting and automation. In this mode, you pipe input to the CLI, it executes the command, and then it exits.
The following example pipes a command to Qwen Code from your terminal:
echo "What is fine tuning?" | qwen
You can also use the --prompt or -p flag:
qwen -p "What is fine tuning?"
For comprehensive documentation on headless usage, scripting, automation, and advanced examples, see the Headless Mode guide.