Linux command
tgpt 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Ask question
tgpt "[What is Linux?]"
Interactive mode
tgpt -i
Code mode
tgpt -c "[Write a Python hello world]"
Multiline input
tgpt -m
With specific provider
tgpt --provider [openai] "[question]"
Generate image
tgpt -img "[A sunset over mountains]"
说明
tgpt is a terminal-based client for interacting with AI language models from multiple providers including OpenAI, Anthropic, and others. It supports one-shot prompts, interactive conversation mode (-i), and specialized code generation mode (-c). The tool can also generate images using models like DALL-E via the -img flag. Some providers work without requiring API keys, while others need keys configured for authentication. Multiline input mode (-m) allows composing longer prompts directly in the terminal.
参数
- -i
- Interactive mode.
- -c
- Code generation.
- -m
- Multiline input.
- --provider _NAME_
- AI provider.
- -img
- Image generation.
- -s
- Silent mode.
FAQ
What is the tgpt command used for?
tgpt is a terminal-based client for interacting with AI language models from multiple providers including OpenAI, Anthropic, and others. It supports one-shot prompts, interactive conversation mode (-i), and specialized code generation mode (-c). The tool can also generate images using models like DALL-E via the -img flag. Some providers work without requiring API keys, while others need keys configured for authentication. Multiline input mode (-m) allows composing longer prompts directly in the terminal.
How do I run a basic tgpt example?
Run `tgpt "[What is Linux?]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i do in tgpt?
Interactive mode.