Skip to main content

Per-Dir API keys

How to easily setup per directory API keys to, for example, scope different AI subscriptions in different folders. This will use the CLI direnv to accomplish that.

Track Claude CLI Cost

A quick guide on how to track session cost with a Claude hook. This will both keep a running cost counter below your Claude CLI and persist session costs to ~/.claude/cost/.

Quick GitHub PR Creation

Add the following to your ~/.bashrc or ~/.zshrc:

alias ghpr='git push && gh pr create --fill'

Now just run ghpr after you've committed, and now you have a PR!

Disable npm install scripts

(for security purposes)

  • Globally:
    • run npm config set ignore-scripts true
    • this will populate ~/.npmrc
  • Per repo:
    • create ./.npmrc
    • add ignore-scripts=true into that file