What Commands Are Exposed After CodeWhale npm Installation: Complete CLI Guide

Installing the codewhale npm package exposes three global CLI commands—codewhale, codew, and codewhale-tui—defined in the bin field of npm/codewhale/package.json.

After installing CodeWhale from the npm registry, you gain immediate access to a suite of command-line interfaces that handle model selection, environment setup, and interactive terminal sessions. The CodeWhale npm installation registers these binaries globally when installed with the -g flag, making them available system-wide immediately after the process completes.

CodeWhale npm Installation Commands Overview

The codewhale package declares three distinct binary entry points in its package.json configuration. Each serves a specific purpose while sharing the underlying core functionality located in npm/codewhale/scripts/run.js.

Primary CLI Command (codewhale)

The main codewhale command launches the full-featured CLI interface. This entry point loads the complete command set including model selection, environment initialization, and execution capabilities. When you run codewhale --help, the system executes the script located at npm/codewhale/bin/codewhale.js, which provides access to all high-level operations.

Short Alias (codew)

The codew binary functions as a convenient shorthand that forwards to the same CLI entry point as the primary command. Located at npm/codewhale/bin/codew.js, this wrapper script reduces typing overhead for frequent operations like initializing projects or executing scripts.

Interactive TUI (codewhale-tui)

For users preferring a visual interface, the codewhale-tui command starts the Text-User-Interface version. The npm/codewhale/bin/codewhale-tui.js script launches a full-screen terminal environment, providing exploratory access to CodeWhale's features without memorizing complex command-line flags.

How to Use CodeWhale Commands After Installation

Once you complete the CodeWhale npm installation, these commands become available immediately in your terminal. The package sets "preferGlobal": true, ensuring global accessibility for all three binaries.

Install the package globally to expose the commands:

npm i -g codewhale

Verify the installation and check available options:

codewhale --version
codewhale --help

Initialize a new project using the short alias:

mkdir my-project && cd my-project
codew init

Execute a script with your configured model:

codew run myfile.py

Launch the interactive TUI for an exploratory session:

codewhale-tui

Source Code Implementation Details

The command exposure mechanism relies on specific file structures within the repository. Understanding these locations helps when debugging installation issues or contributing to the project.

Binary Declaration in package.json

The npm/codewhale/package.json file defines the command mappings in its bin section (lines 36-40). This configuration maps global command names to their respective executable scripts:

Entry Point Scripts

Each binary has a dedicated entry script in the npm/codewhale/bin/ directory:

  1. bin/codewhale.js: Primary entry point that initializes the full CLI environment
  2. bin/codew.js: Minimal wrapper forwarding arguments to the main CLI
  3. bin/codewhale-tui.js: Specialized launcher for the terminal UI mode

Core Runner Module

Both codewhale.js and codewhale-tui.js invoke the shared logic located in npm/codewhale/scripts/run.js. This centralized runner handles the actual execution flow, ensuring consistent behavior across different interface modes.

Summary

  • Three global commands: codewhale, codew, and codewhale-tui become available after npm installation
  • Primary entry: The codewhale command in bin/codewhale.js provides full CLI functionality
  • Shortcut alias: codew reduces keystrokes while accessing identical features
  • TUI mode: codewhale-tui launches the interactive terminal interface via bin/codewhale-tui.js
  • Global availability: The preferGlobal setting in package.json ensures system-wide access immediately after installation
  • Shared backend: All commands utilize the core runner in scripts/run.js for consistent execution

Frequently Asked Questions

How do I verify that CodeWhale commands installed correctly?

Run codewhale --version in your terminal to confirm the installation succeeded and display the current version (e.g., 0.8.50). If the command returns a version number rather than a "command not found" error, the CodeWhale npm installation completed successfully and the binaries are properly linked in your system PATH.

What is the difference between codew and codewhale commands?

Both commands access identical functionality because codew is a short alias that forwards to the main CLI. According to the source code in npm/codewhale/bin/codew.js, this wrapper simply redirects arguments to the same entry point used by codewhale, allowing you to type fewer characters for common operations like codew init or codew run.

Can I use CodeWhale commands without installing globally?

Yes, you can install locally using npm i codewhale and access the binaries through npx codewhale, npx codew, or npx codewhale-tui. However, global installation with npm i -g codewhale remains the recommended approach because the package.json specifies "preferGlobal": true, ensuring the commands are available from any directory without the npx prefix.

Where does the codewhale-tui command get its interface components?

The codewhale-tui command executes npm/codewhale/bin/codewhale-tui.js, which initializes the Text-User-Interface mode. This script delegates to the shared npm/codewhale/scripts/run.js runner but passes specific flags that trigger the full-screen terminal UI rather than the standard command-line interface.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →