2025-05-16 03:04:33 +00:00
# Gemini CLI
2025-06-13 16:53:30 +00:00
Within Gemini CLI, `packages/cli` is the frontend for users to send and receive prompts with the Gemini AI model and its associated tools. For a general overview of Gemini CLI, see the [main documentation page ](../index.md ).
## Navigating this section
2025-06-23 20:02:52 +00:00
- **[Authentication](./authentication.md):** A guide to setting up authentication with Google's AI services.
2025-06-13 16:53:30 +00:00
- **[Commands](./commands.md):** A reference for Gemini CLI commands (e.g., `/help` , `/tools` , `/theme` ).
- **[Configuration](./configuration.md):** A guide to tailoring Gemini CLI behavior using configuration files.
2025-08-20 17:04:03 +00:00
- **[Enterprise](./enterprise.md):** A guide to enterprise configuration.
2025-09-17 01:17:25 +00:00
- **[Headless Mode](../headless.md):** A comprehensive guide to using Gemini CLI programmatically for scripting and automation.
2025-06-24 03:37:07 +00:00
- **[Token Caching](./token-caching.md):** Optimize API costs through token caching.
2025-06-05 15:10:05 +00:00
- **[Themes](./themes.md)**: A guide to customizing the CLI's appearance with different themes.
2025-06-13 16:53:30 +00:00
- **[Tutorials](tutorials.md)**: A tutorial showing how to use Gemini CLI to automate a development task.
2025-05-16 03:04:33 +00:00
2025-06-13 16:53:30 +00:00
## Non-interactive mode
2025-06-07 17:47:30 +00:00
2025-06-13 16:53:30 +00:00
Gemini CLI 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.
2025-06-07 17:47:30 +00:00
2025-06-13 16:53:30 +00:00
The following example pipes a command to Gemini CLI from your terminal:
2025-06-07 17:47:30 +00:00
```bash
echo "What is fine tuning?" | gemini
```
2025-09-16 19:01:15 +00:00
You can also use the `--prompt` or `-p` flag:
2025-06-07 17:47:30 +00:00
```bash
gemini -p "What is fine tuning?"
```
2025-09-10 20:19:47 +00:00
2025-09-17 01:17:25 +00:00
For comprehensive documentation on headless usage, scripting, automation, and advanced examples, see the ** [Headless Mode ](../headless.md )** guide.