From 4b51825917108cfc3d946d3cd1b7e077474a3d9e Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Sat, 14 Mar 2026 11:48:37 -0300 Subject: [PATCH] docs: document default mode shortcuts for save and get - Quick Start: show bare keep (save) and keep <#> (get) shortcuts - Save Mode: note that --save is optional when piping content - Get Mode: clarify that only numeric IDs default to Get mode; fix incorrect keep example that would actually save --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cf64992..06e8df2 100644 --- a/README.md +++ b/README.md @@ -134,10 +134,13 @@ cargo build --release --features server,client,swagger ## Quick Start ```sh -# Save content with a tag -echo "Hello, world!" | keep --save greeting +# Save content with a tag (--save is optional when piping) +echo "Hello, world!" | keep greeting -# Retrieve by tag +# Retrieve by ID (--get is optional for numeric IDs) +keep 1 + +# Retrieve by tag (--get is required for tags) keep --get greeting # List all stored items @@ -176,14 +179,15 @@ keep --list --meta project=myapp ### Save Mode -Save stdin content with tags and metadata. +Save stdin content with tags and metadata. The `--save` flag is optional when piping content. ```sh # Save (auto-assigned ID, no tag) echo "data" | keep --save -# Save with a tag +# Save with a tag (--save is optional when piping) echo "data" | keep --save my-tag +echo "data" | keep my-tag # Save with multiple tags and metadata cat report.pdf | keep --save report --meta project=alpha --meta env=prod @@ -196,16 +200,15 @@ Tags and metadata make items easy to find later. Tags are simple identifiers; me ### Get Mode -Retrieve items by ID or tags. This is the default mode when IDs are provided. +Retrieve items by ID. This is the default mode when numeric IDs are provided. ```sh -# Get by ID +# Get by ID (no --get needed for numeric IDs) keep --get 1 keep 1 -# Get by tag +# Get by tag (requires --get flag) keep --get my-tag -keep my-tag # Get with filters applied keep --get 1 --filters "head_lines(10)"