mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-18 06:34:26 +01:00
docs: add stdin (#1769)
This commit is contained in:
@@ -171,7 +171,7 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/
|
||||
|
||||
**Options:**
|
||||
|
||||
- **`-i, --instructions <FILE>`**: Path to instruction file containing commands
|
||||
- **`-i, --instructions <FILE>`**: Path to instruction file containing commands. Use - for stdin.
|
||||
- **`-t, --text <TEXT>`**: Input text to provide to Goose directly
|
||||
- **`-s, --interactive`**: Continue in interactive mode after processing initial input
|
||||
- **`-n, --name <NAME>`**: Name for this run session (e.g. 'daily-tasks')
|
||||
|
||||
@@ -48,6 +48,24 @@ Here's an example of an instruction file that runs a security audit on project d
|
||||
Save findings in 'security_audit.md' with severity levels highlighted.
|
||||
```
|
||||
|
||||
### With stdin
|
||||
You can also pass instructions to Goose using standard input via `-i -`. This is useful when you want to pipe commands from another tool or script into Goose.
|
||||
|
||||
#### Simple echo pipe
|
||||
|
||||
```bash
|
||||
echo "What is 2+2?" | goose run -i -
|
||||
```
|
||||
|
||||
#### Multi-line instructions
|
||||
```bash
|
||||
cat << EOF | goose run -i -
|
||||
Please help me with these tasks:
|
||||
1. Calculate 15% of 85
|
||||
2. Convert 32°C to Fahrenheit
|
||||
EOF
|
||||
```
|
||||
|
||||
## Key Features
|
||||
|
||||
### Interactive Mode
|
||||
|
||||
Reference in New Issue
Block a user