# Rewriting the SessionCast CLI in Rust

> Why we replaced the Node.js CLI with a single native Rust binary: zero runtime dependencies, instant startup, built-in auto-update and tmux auto-install.

Source: https://blog.sessioncast.io/posts/cli-rust-rewrite/ · 2026-03-13 · devload

SessionCast CLI has been completely rewritten in Rust. The new CLI is faster, lighter, and ships as a single binary — no more Node.js or npm required.

## Important: npm Package Is Deprecated

The npm package (`sessioncast-cli`) **will no longer receive any updates**. There are no plans for future npm releases. Please uninstall it and switch to the native binary as described below.

## What Changed

The previous CLI was a Node.js package installed via `npm install -g sessioncast-cli`. The new version is a native binary built in Rust, distributed through platform-specific installers.

**Key improvements:**

- **Zero dependencies** — single binary, no Node.js runtime needed
- **Faster startup** — native binary launches instantly
- **Auto-update** — built-in `sessioncast update` command
- **tmux auto-install** — automatically installs tmux if not found
- **Improved login UI** — styled browser callback page with auto-close

## Migrating from npm Version

If you previously installed the CLI via npm, **you must uninstall it first**:

```
npm uninstall -g sessioncast-cli
```

> **This step is required.** If both versions coexist, the old npm version may take priority in your PATH and cause login failures or unexpected behavior.

Then install the new Rust-based CLI:

### macOS / Linux

```
curl -fsSL https://raw.githubusercontent.com/sessioncast/sessioncast-cli-release/main/install.sh | bash
```

### Windows (PowerShell)

```
irm https://raw.githubusercontent.com/sessioncast/sessioncast-cli-release/main/install.ps1 | iex
```

Verify the installation:

```
sessioncast --version
```

You should see `sessioncast 0.1.9` or later.

## tmux Auto-Install

The new CLI automatically detects and installs tmux when needed. When you run `sessioncast agent`, if tmux is not found:

- **macOS** — installs via Homebrew (`brew install tmux`)
- **Linux (Debian/Ubuntu)** — installs via apt (`sudo apt install tmux`)
- **Linux (RHEL/Fedora)** — installs via dnf (`sudo dnf install tmux`)

No manual setup required.

## Quick Start

```
# Install
curl -fsSL https://raw.githubusercontent.com/sessioncast/sessioncast-cli-release/main/install.sh | bash

# Login
sessioncast login

# Start agent
sessioncast agent
```

Your existing session tokens and configuration (`~/.sessioncast.yml`) are fully compatible with the new CLI.

---

For the full changelog, see the [GitHub release](https://github.com/sessioncast/sessioncast-cli-release/releases/tag/v0.1.9).

Latest version: **v0.1.11** — update with `sessioncast update`.
