winfunc

Claude Code Single Binary — Development skill for Claude Code

Development community

Build scripts for compiling Claude Code into a single-file executable for Mac, Linux, and Windows with fully bundled vendor dependencies.

How to install Claude Code Single Binary

This entry records only its repository, not the path inside it, so there is no exact command to give. Open winfunc/claude-code-single-binary and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code Single Binary does

Build scripts for compiling Claude Code into a single-file executable for Mac, Linux, and Windows with fully bundled vendor dependencies.

Alternatives in Development

  • Claudes C Compiler — Claude Opus 4.6 wrote a dependency-free C compiler in Rust, with backends targeting x86 (64- and 32-bit), ARM 2.6k ★
  • Claude Code Zh Cn — Claude Code CLI 简体中文本地化 / 汉化插件;支持 macOS、Linux、WSL、Windows 与新版 native,一行安装,更新后自动修复 721 ★
  • SSH Skill — 面向 Codex 和 Claude Code 的跨平台 SSH 工作流 Skill,支持 Windows、macOS、Linux 488 ★

README

Claude Code Single-Binary Executables

This document provides comprehensive information about building Claude Code as single-binary executables for multiple platforms using Bun's native compilation and embedding features.

Table of Contents

Overview

Claude Code can be compiled into standalone executables that bundle the entire application, runtime, and all assets into a single binary file. This eliminates the need for users to install Node.js, Bun, or any dependencies.

The source package is fetched from the official npm registry: [`@anthropic-ai/claude-code`](https://www.npmjs.com/package/@anthropic-ai/claude-code)

Key Features

  • Zero Dependencies: Single executable file with no external requirements
  • Cross-Platform: Build for Linux, macOS, and Windows from any platform
  • Optimized: Includes minification, sourcemaps, and optional bytecode compilation
  • Embedded Assets: All resources (WASM files, native modules) are embedded directly
  • Multiple Variants: Support for modern CPUs, older hardware, and different libc implementations

Technical Architecture

Build Process Overview

graph TD
    A[Original CLI Source] --> B[prepare-bundle-native.js]
    B --> C[Modified CLI with Embedded Assets]
    C --> D[Bun Build --compile]
    D --> E[Single Binary Exec