pad

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package pad implements the "ctx pad" command for managing an encrypted scratchpad.

The scratchpad stores short, sensitive one-liners that travel with the project via git but remain opaque at rest. Entries are encrypted with AES-256-GCM using a symmetric key at ~/.ctx/.ctx.key.

File blobs can be stored as entries using the format "label:::base64data". The add --file flag ingests a file and shows auto-decoded blob entries. Blobs are subject to a 64KB pre-encoding size limit.

A plaintext fallback (.context/scratchpad.md) is available via the scratchpad_encrypt config option in .ctxrc.

Subcommands:

  • add: append a text entry or file blob to the scratchpad
  • show: display all entries (auto-decodes blobs)
  • rm: remove an entry by line number
  • import: bulk-import lines from a file (or directory blobs with --blobs)
  • export: export blob entries as files to a directory
  • merge: merge entries from one or more external scratchpad files with content-based deduplication and encrypted/plaintext auto-detection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the pad command with subcommands.

When invoked without a subcommand, it lists all scratchpad entries.

Returns:

  • *cobra.Command: Configured pad command with subcommands

Types

This section is empty.

Directories

Path Synopsis
cmd
add
Package add implements the ctx pad add subcommand.
Package add implements the ctx pad add subcommand.
edit
Package edit implements the ctx pad edit subcommand.
Package edit implements the ctx pad edit subcommand.
export
Package export implements the ctx pad export subcommand.
Package export implements the ctx pad export subcommand.
imp
Package imp implements the ctx pad import subcommand.
Package imp implements the ctx pad import subcommand.
merge
Package merge implements the ctx pad merge subcommand.
Package merge implements the ctx pad merge subcommand.
mv
Package mv implements the ctx pad mv subcommand.
Package mv implements the ctx pad mv subcommand.
resolve
Package resolve implements the ctx pad resolve subcommand.
Package resolve implements the ctx pad resolve subcommand.
rm
Package rm implements the ctx pad rm subcommand.
Package rm implements the ctx pad rm subcommand.
show
Package show implements the ctx pad show subcommand.
Package show implements the ctx pad show subcommand.
Package core provides shared scratchpad operations used by all pad subcommand packages.
Package core provides shared scratchpad operations used by all pad subcommand packages.
blob
Package blob handles binary blob encoding and decoding within scratchpad entries.
Package blob handles binary blob encoding and decoding within scratchpad entries.
crypto
Package crypto reads and decrypts encrypted scratchpad files.
Package crypto reads and decrypts encrypted scratchpad files.
merge
Package merge reads scratchpad files with automatic decryption fallback and merges entries.
Package merge reads scratchpad files with automatic decryption fallback and merges entries.
parse
Package parse splits raw scratchpad content into individual entry lines.
Package parse splits raw scratchpad content into individual entry lines.
store
Package store manages scratchpad file persistence including encryption and path resolution.
Package store manages scratchpad file persistence including encryption and path resolution.
validate
Package validate checks that scratchpad entry indexes are within valid bounds.
Package validate checks that scratchpad entry indexes are within valid bounds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL