docs: document default mode shortcuts for save and get
- Quick Start: show bare keep <tag> (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 <tag> example that would actually save
This commit is contained in:
21
README.md
21
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)"
|
||||
|
||||
Reference in New Issue
Block a user