Add `$` Alias to Claude Code

Resolved 💬 3 comments Opened Apr 29, 2025 by hata6502 Closed Apr 29, 2025

Overview

Claude Code is currently invoked with the claude command. This proposal registers the commonly copied shell‑prompt symbol $ as an additional alias and wraps each invocation with an AI‑powered layer that confirms execution and explains the command in natural language.

Background & Motivation

Blog posts and tutorials often include commands like $ git …. Pasting them verbatim causes the leading $ to be interpreted as an unknown command, resulting in errors.

![Image from Gyazo](https://gyazo.com/88017ea52f9f6eec95f9d09e17de42ac)

By mapping $ to Claude Code, we can, before execution:

  1. Show a plain‑English explanation of the command.
  2. Require explicit confirmation before the command runs.

![Image from Gyazo](https://gyazo.com/fcd2f123c0823259f86fcf1caf4c4508)

Expected Benefits

  • Users understand what a command does as they run it.
  • Prevents accidental execution when snippets are pasted.

Implementation

"bin": {
  "claude": "~~~",
  "$":     "~~~"
}

Adding this line to package.json enables the alias. Registration has been verified on Ubuntu and macOS; Windows (via WSL) should behave identically.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗