Skip to content

8ff/claude-code-freebsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

claude-code-freebsd

Tiny install script that sets up Claude Code on FreeBSD by running Anthropic's own Linux x64 binary under Linuxulator. This is just an automated version of the workaround Anthropic's ant-kurt posted on issue #30640:

Starting with Claude Code 2.1.101, you can run Claude Code under Linuxulator with this additional env var: BUN_JSC_useBBQJIT=0 claude.

This is a temporary workaround. The real fix is a native FreeBSD Bun build (work-in-progress upstream at oven-sh/bun#1524 / lwhsu/bun's claude/freebsd-support branch). Once that lands, this repo becomes obsolete.

Install

curl -fsSL https://raw.githubusercontent.com/8ff/claude-code-freebsd/main/install.sh | sh

Tested on FreeBSD 15 amd64. Should also work on FreeBSD 13.2+ / 14.x amd64 as long as linux_base-rl9 (glibc 2.34) is in your pkg repo — older linux_base-c7 (glibc 2.17) is too old for Bun's Linux binary. On first run, if Linuxulator isn't fully set up, the script prints the doas commands you need to run and exits; it never runs privileged commands on your behalf. On FreeBSD 15 you usually only need doas pkg install -y linux_base-rl9 because the Linux ABI is compiled into the GENERIC kernel; on 13/14 you may also need doas kldload linux64 and doas service linux start.

The script downloads ~230 MB from Anthropic's CDN, verifies sha256 against their signed manifest, installs the binary to ~/.local/share/claude/claude-linux-x64, and drops a wrapper at ~/.local/bin/claude that sets BUN_JSC_useBBQJIT=0 automatically.

After install, open a new shell and run claude.

Uninstall

rm -f ~/.local/bin/claude ~/.local/share/claude/claude-linux-x64
rm -rf ~/.claude ~/.claude.json ~/.cache/claude-cli-nodejs

Not redistributed

Anthropic's Claude Code binary is their proprietary software and is not stored in this repo. The install script downloads it directly from Anthropic's own CDN at install time. Use is subject to Anthropic's Commercial Terms.

The scripts and docs in this repo are GPL v3 (LICENSE).

Credit

  • ant-kurt at Anthropic — for publishing the BUN_JSC_useBBQJIT=0 flag on issue #30640. This repo exists because of that comment.
  • Li-Wen Hsu (@lwhsu) — for driving the actual native port upstream.

About

Claude Code installer for FreeBSD via Linuxulator — automates ant-kurt's BUN_JSC_useBBQJIT=0 workaround from issue #30640

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages