Scratchpad

ctx pad¶
Encrypted scratchpad for sensitive one-liners that travel with the project.
When invoked without a subcommand, lists all entries.
ctx pad add¶
Append a new entry to the scratchpad.
Flags:
| Flag | Short | Description |
|---|---|---|
--file |
-f |
Ingest a file as a blob entry (max 64 KB) |
Examples:
ctx pad add "DATABASE_URL=postgres://user:pass@host/db"
ctx pad add "deploy config" --file ./deploy.yaml
ctx pad show¶
Output the raw text of an entry by number. For blob entries,
prints decoded file content (or writes to disk with --out).
Arguments:
n: 1-based entry number
Flags:
| Flag | Description |
|---|---|
--out |
Write decoded blob content to a file (blobs only) |
Examples:
ctx pad rm¶
Remove one or more entries by stable ID. Supports individual IDs and ranges.
Arguments:
id: One or more entry IDs (e.g.,3,1 4,3-5)
Examples:
ctx pad normalize¶
Reassign entry IDs as a contiguous sequence 1..N, closing any gaps left by deletions.
Examples:
ctx pad edit¶
Replace, append to, or prepend to an entry.
Arguments:
n: 1-based entry numbertext: Replacement text (mutually exclusive with--append/--prepend)
Flags:
| Flag | Description |
|---|---|
--append |
Append text to the end of the entry |
--prepend |
Prepend text to the beginning of entry |
--file |
Replace blob file content (preserves label) |
--label |
Replace blob label (preserves content) |
Examples:
ctx pad edit 2 "new text"
ctx pad edit 2 --append " suffix"
ctx pad edit 2 --prepend "prefix "
ctx pad edit 1 --file ./v2.yaml
ctx pad edit 1 --label "new name"
ctx pad mv¶
Move an entry from one position to another.
Arguments:
from: Source position (1-based)to: Destination position (1-based)
Examples:
ctx pad resolve¶
Show both sides of a merge conflict in the encrypted scratchpad.
Examples:
ctx pad import¶
Bulk-import lines from a file into the scratchpad. Each non-empty line becomes a separate entry. All entries are written in a single encrypt/write cycle.
With --blob, import all first-level files from a directory
as blob entries. Each file becomes a blob with the filename
as its label. Subdirectories and non-regular files are skipped.
ctx pad import <file>
ctx pad import - # read from stdin
ctx pad import --blob <dir> # import directory files as blobs
Arguments:
file: Path to a text file,-for stdin, or a directory (with--blob)
Flags:
| Flag | Description |
|---|---|
--blob |
Import first-level files from a directory as blobs |
Examples:
ctx pad export¶
Export all blob entries from the scratchpad to a directory as files. Each blob's label becomes the filename. Non-blob entries are skipped.
Arguments:
dir: Target directory (default: current directory)
Flags:
| Flag | Short | Description |
|---|---|---|
--force |
-f |
Overwrite existing files instead of timestamping |
--dry-run |
Print what would be exported without writing |
When a file already exists, a unix timestamp is prepended to
avoid collisions (e.g., 1739836200-label). Use --force to
overwrite instead.
Examples:
ctx pad merge¶
Merge entries from one or more scratchpad files into the current pad. Each input file is auto-detected as encrypted or plaintext. Entries are deduplicated by exact content.
Arguments:
FILE...: One or more scratchpad files to merge (encrypted or plaintext)
Flags:
| Flag | Short | Description |
|---|---|---|
--key |
-k |
Path to key file for decrypting input files |
--dry-run |
Print what would be merged without writing |
Examples: