Small collection of personal CLI tools, rewritten in TypeScript + Effect and run with Bun or Node.
- Bun or Node (>= 18) for the TypeScript CLIs
- For
j:nvim,fzf,rg(optional:batfor nicer previews)
bun install
bun linkNode (uses tsx to run the TypeScript entrypoints):
npm installBun:
bun run src/j/index.bun.ts
bun run src/ctx/index.bun.ts
bun run src/lm/index.bun.tsNode:
node --import tsx src/j/index.node.ts
node --import tsx src/ctx/index.node.ts
node --import tsx src/lm/index.node.tsCLI for sending prompts + context to an OpenAI-compatible API (local by default).
Examples:
lm "Summarize this file" -f notes.txt
cat log.txt | lm -c "Find the error"
lm --edit-agent writing
lm --agent writing "Draft an outline"Config is created at ~/.config/lm/config.json (or $XDG_CONFIG_HOME/lm/config.json):
{
"model": "local-model",
"api_url": "http://localhost:1234/v1",
"api_key_var": "OPENAI_API_KEY"
}Notes:
api_key_varis the name of the environment variable to read. Leave it assk-dummyto skip lookup.- Agent profiles live in the same config dir as
<name>.md. - Models that support tool calls can use the built-in
web_searchtool (DuckDuckGo).
Collects files by extension and copies the concatenated content to the clipboard.
Examples:
ctx . ts tsx -i node_modules -p "*.test.ts"
ctx . md -s > context.txtJournaling helper that opens ~/journal/YYYY-MM-DD.md in Neovim with search and tag browsing.
Examples:
j
j -7
j --search
j --tag=work
j --timeline
j --note=ideas