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

> Discover the CLI commands revealed after CodeWhale npm installation. Explore codewhale, codew, and codewhale-tui in this comprehensive guide to enhance your workflow.

- Repository: [Hunter Bown/CodeWhale](https://github.com/Hmbown/CodeWhale)
- Tags: how-to-guide
- Published: 2026-06-02

---

**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`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/package.json) configuration. Each serves a specific purpose while sharing the underlying core functionality located in [`npm/codewhale/scripts/run.js`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/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:

```bash
npm i -g codewhale

```

Verify the installation and check available options:

```bash
codewhale --version
codewhale --help

```

Initialize a new project using the short alias:

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

```

Execute a script with your configured model:

```bash
codew run myfile.py

```

Launch the interactive TUI for an exploratory session:

```bash
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`](https://github.com/Hmbown/CodeWhale/blob/main/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:

- `codewhale`: Points to [`bin/codewhale.js`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codewhale.js)
- `codew`: Points to [`bin/codew.js`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codew.js)
- `codewhale-tui`: Points to [`bin/codewhale-tui.js`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codewhale-tui.js)

### Entry Point Scripts

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

1. **[`bin/codewhale.js`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codewhale.js)**: Primary entry point that initializes the full CLI environment
2. **[`bin/codew.js`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codew.js)**: Minimal wrapper forwarding arguments to the main CLI
3. **[`bin/codewhale-tui.js`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codewhale-tui.js)**: Specialized launcher for the terminal UI mode

### Core Runner Module

Both [`codewhale.js`](https://github.com/Hmbown/CodeWhale/blob/main/codewhale.js) and [`codewhale-tui.js`](https://github.com/Hmbown/CodeWhale/blob/main/codewhale-tui.js) invoke the shared logic located in [`npm/codewhale/scripts/run.js`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/bin/codewhale-tui.js)
- **Global availability**: The `preferGlobal` setting in [`package.json`](https://github.com/Hmbown/CodeWhale/blob/main/package.json) ensures system-wide access immediately after installation
- **Shared backend**: All commands utilize the core runner in [`scripts/run.js`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/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`](https://github.com/Hmbown/CodeWhale/blob/main/npm/codewhale/bin/codewhale-tui.js), which initializes the Text-User-Interface mode. This script delegates to the shared [`npm/codewhale/scripts/run.js`](https://github.com/Hmbown/CodeWhale/blob/main/npm/codewhale/scripts/run.js) runner but passes specific flags that trigger the full-screen terminal UI rather than the standard command-line interface.