Skip to content

Commit d7205d5

Browse files
committed
Update README with --payload-file documentation
Add documentation for the new --payload-file / -f flag including: - Flag description in the commands reference - Usage examples showing file and stdin input
1 parent b4752ad commit d7205d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
150150

151151
- `--version <version>`, `-v` - Specify app version (default: latest)
152152
- `--payload <json>`, `-p` - JSON payload for the action
153+
- `--payload-file <path>`, `-f` - Read JSON payload from a file (use `-` for stdin)
153154
- `--sync`, `-s` - Invoke synchronously (timeout after 60s)
154155

155156
- `kernel app list` - List deployed apps
@@ -423,6 +424,15 @@ kernel invoke my-scraper scrape-page
423424
# With JSON payload
424425
kernel invoke my-scraper scrape-page --payload '{"url": "https://example.com"}'
425426

427+
# Read payload from a file
428+
kernel invoke my-scraper scrape-page --payload-file payload.json
429+
430+
# Read payload from stdin
431+
cat payload.json | kernel invoke my-scraper scrape-page --payload-file -
432+
433+
# Pipe from another command
434+
echo '{"url": "https://example.com"}' | kernel invoke my-scraper scrape-page -f -
435+
426436
# Synchronous invoke (wait for completion)
427437
kernel invoke my-scraper quick-task --sync
428438
```

0 commit comments

Comments
 (0)