Skip to main content

2 posts tagged with "Claude"

Claude / Anthropic-powered tooling

View All Tags

pin

· 4 min read
Ritesh Kadmawala
Founder, Vertexcover Labs - AI-native engineering studio
TL;DR:

A SQLite-backed CLI bookmark manager with nested folders, tags, and Claude-powered natural-language add/search — describe a bookmark in English and Claude fetches the page, infers metadata, and files it; search by intent ("that ml paper about attention") and the matched URL goes straight to the clipboard.

A CLI bookmark manager with Claude-powered natural-language add and search.

Bookmark URLs with names, descriptions, tags, and nested folders. Find them with plain English (pin find "that ml paper about attention") and the matched URL goes straight to your clipboard.

Requirements

  • claude CLI installed and authenticated (powers NLP add/search — no API key needed beyond your Claude Code login).
  • uv for running the script.
  • Optional: fzf for picker mode, pbcopy (macOS) / xclip / wl-copy for clipboard.

Storage

Default DB lives at ~/.local/share/pin/pin.db (XDG-compliant). Override with $PIN_DB or --db <path>.

Quick start

# Make a folder
./pin.py mkdir dev/python --desc "python stuff"

# Add a bookmark with manual fields
./pin.py add "https://docs.python.org/3/library/asyncio.html" \
--name "asyncio docs" --tags "python,async" --folder dev/python

# Add with --auto: Claude fetches the page, generates name/desc/tags, and picks/proposes a folder
./pin.py add "https://docs.python.org/3/library/itertools.html" --auto

# Add with natural language: a freeform second arg that Claude parses
./pin.py add "https://arxiv.org/abs/1706.03762" "the original transformers paper, save under reading"

# Or just one freeform string with the URL embedded
./pin.py add "save https://github.com/astral-sh/uv as a python tooling reference"

# List everything as a tree
./pin.py ls

# Find by NLP — single match goes straight to clipboard
./pin.py find "that ml paper about attention"

# Plain substring search instead
./pin.py find --plain "asyncio"

# Pick from all bookmarks with fzf
./pin.py find --fzf

Commands

add <url> [natural-language]

Add a bookmark.

  • First arg is a URL + manual flags → simple insert.
  • First arg is a URL + second freeform arg → Claude parses the description for name/desc/tags/folder.
  • First arg is freeform text containing a URL → Claude extracts everything.
  • --auto with a URL only → Claude fetches the page and generates metadata.

Flags:

FlagPurpose
--nameBookmark name
--descDescription
--tagsComma-separated tags
--folderFolder path; created if missing (e.g. dev/python/async)
--autoFetch the URL and let Claude generate name/desc/tags/folder

Folders referenced via --folder or inferred by Claude that don't exist yet are created automatically. When using NLP, Claude is shown the existing folder tree and prefers an existing folder if one fits.

mkdir <path>

Create a folder. Nested paths work (dev/python/async). --desc adds a folder description that Claude sees during NLP add.

ls [path]

Tree view of folders and bookmarks. Optional path to limit to a subtree.

find [query]

Search bookmarks. Default is NLP via Claude (matches on intent, not just substrings).

FlagPurpose
--plainLiteral substring match on name/desc/tags/url
--fzfForce the fzf picker even on a single match (or use alone with no query to browse all)
--printPrint URL instead of copying to clipboard
--openOpen in the default browser
--listPrint every match (no copy/open)

Behavior:

  • One match → URL goes straight to your clipboard.
  • Multiple matches → fzf picker; pick one, URL goes to clipboard.
  • --print / --open / --list change the action on the chosen bookmark.

rm <id|path>

Delete a bookmark by ID or a folder by path. Folders containing bookmarks/subfolders prompt for confirmation; -y skips.

mv <id> <folder-path>

Move a bookmark to another folder (created if missing).

edit <id>

Update fields: --name, --desc, --tags, --url.

export / import

./pin.py export --out backup.json
./pin.py import --file backup.json

JSON dump/load of the entire bookmark database. Handy for backup or syncing across machines.

Global flags

FlagPurpose
--db <path>Use a non-default DB file (also via $PIN_DB)
--model <id>Override the Claude model (default: sonnet)

How NLP works

Both NLP add and NLP search shell out to claude -p with:

  • A system prompt constraining the model to JSON-only output.
  • A --json-schema for structured output.
  • All built-in Claude tools (Bash, Read, WebFetch, etc.) disabled — the model answers from the context we provide (page metadata, existing folder list, bookmark list).
  • --setting-sources "" so user hooks don't interfere.

For add, Claude sees: the URL, scraped page title/description, your freeform text (if any), and the full existing folder tree. For find, Claude sees: the user query and a JSON dump of every bookmark (id, name, desc, tags, folder, URL), then returns ranked IDs.


Source: github.com/vertexcover-io/vibe-tools/tree/master/pin

aibash

· 3 min read
Ritesh Kadmawala
Founder, Vertexcover Labs - AI-native engineering studio
TL;DR:

Translates an English description into a concrete bash command using the Claude CLI, with the current directory's file listing passed as context so requests like "delete the largest file" resolve to real filenames. Optionally copies the result to the clipboard or executes it after a confirmation prompt.

Turn an English description into a bash command, using the Claude Code CLI as the LLM.

The script lists files in the current directory (with sizes and creation/modification times) and passes that listing as context, so requests like "copy the most recently created CSV" or "delete the largest file" can be resolved to concrete filenames without you having to type them.

Requirements

  • claude CLI installed and authenticated (this is what powers the translation — no API key needed beyond your Claude Code login).
  • uv for running the script with PEP 723 inline metadata.
  • Optional: fzf for --pick, pbcopy (macOS) / xclip / wl-copy for --copy.

Usage

./aibash.py "copy the most recently created csv to backup.csv"
# → cp newest.csv backup.csv

Flags

FlagWhat it does
--pickOpen fzf to pre-select a file from the current directory. The picked file is passed to the LLM as the authoritative source.
-c, --copyCopy the generated command to the system clipboard (pbcopy / xclip / wl-copy).
-r, --runExecute the generated command after a [y/N] confirmation.
-y, --yesExecute the command immediately without confirmation. Implies --run.
-v, --verbosePrint diagnostic info — the picked file, clipboard tool used, and command being run. Off by default.
--dir <path>List files from a directory other than cwd.
--model <id>Override the Claude model. Defaults to sonnet (latest sonnet).

Examples

# Print the command only.
./aibash.py "make a tarball of all csv files called data.tar.gz"

# Pick a file with fzf, then describe what to do with it.
./aibash.py --pick "rename this file to backup.txt"

# Generate, copy to clipboard, and auto-run.
./aibash.py -c -y "delete every .log file older than 7 days"

Output

  • Without --run/--yes: the generated command is printed to stdout and nothing else (so you can pipe it to bash if you want).
  • With --run/--yes: the command is executed via os.execvp and the command's own output is what you see — aibash adds no chatter of its own.
  • --verbose adds diagnostic lines to stderr (picked file, clipboard tool, command being run before exec).
  • Real errors (clipboard tool missing, ambiguous request, etc.) always go to stderr regardless of verbosity.

How it works

aibash shells out to claude -p with:

  • A small system prompt that constrains the model to output a JSON object with command and notes fields.
  • A --json-schema for structured output.
  • The current directory's file listing (name, size, creation time, modification time).
  • All built-in tools (Bash, Read, etc.) disabled, so the model answers from the provided listing without trying to verify with shell calls.
  • --setting-sources "" so user-level hooks don't inject content into the response.

Source: github.com/vertexcover-io/vibe-tools/tree/master/aibash