### Running Claude Code CLI Commands Source: https://github.com/exhen/claude-code-2.1.88/blob/main/README.md Examples of how to execute the Claude Code CLI for various purposes, including checking the version, displaying help information, running a one-shot command, and starting the interactive REPL. ```sh node cli.js --version # 2.1.88 (Claude Code) ``` ```sh node cli.js --help # show all options ``` ```sh node cli.js -p "hello world" # non-interactive one-shot ``` ```sh node cli.js # interactive REPL ``` -------------------------------- ### Installing Claude Code Globally Source: https://github.com/exhen/claude-code-2.1.88/blob/main/README.md Commands to install the Claude Code package globally using npm or create a symbolic link for direct execution. ```sh npm install -g @anthropic-ai/claude-code@2.1.88 ``` ```sh # or ln -s "$(pwd)/cli.js" /usr/local/bin/claude ``` -------------------------------- ### Installing Claude Code via npm Source: https://github.com/exhen/claude-code-2.1.88/blob/main/README.md The command to install the Claude Code package globally using npm, making its CLI tools available system-wide. ```sh npm install -g @anthropic-ai/claude-code ``` -------------------------------- ### Extracting Source Code with Node.js Source: https://github.com/exhen/claude-code-2.1.88/blob/main/README.md This script uses Node.js to parse a source map file (cli.js.map) and extract the original source code into a specified directory. It handles nested directories and skips content from node_modules. ```javascript const fs = require("fs"), path = require("path"); const map = JSON.parse(fs.readFileSync("cli.js.map", "utf8")); for (let i = 0; i < map.sources.length; i++) { if (map.sourcesContent[i] == null || map.sources[i].includes("node_modules")) continue; const rel = map.sources[i].replace(/^\.\.\//g, ""); const out = path.join("source", rel); fs.mkdirSync(path.dirname(out), { recursive: true }); fs.writeFileSync(out, map.sourcesContent[i]); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.