Claude Code is an agentic coding tool from Anthropic that lives in your
terminal, understands your codebase, and helps you code faster by executing
routine tasks, explaining complex code, and handling git workflows - all
through natural language commands.
claude is a closed source Linux binary working through Linuxlator.
This port replaces the NodeJS-based misc/claude-code-legacy port.
claude is a closed-source Linux binary that runs under the Linuxulator.
One-time host setup:
# pkg install linux_base-rl9
# sysrc linux_enable=YES
# service linux start
service linux mounts the required filesystems, including fdescfs with
linrdlnk. Without linrdlnk, claude hangs silently at startup.
Self-update is disabled (DISABLE_AUTOUPDATER); upgrade via ports/pkg.
misc/claude-code: update 2.1.224 → 2.1.225
Also:
* Replace the generated wrapper with files/claude.in: require linrdlnk on
fdescfs, disable the binary's self-updater, and launch via bash
--noprofile --norc so shell-detection does not drain stdin and collapse
the TUI into --print mode.
* add LICENSE (Proprietary)
* add pkg-message
Differential Revision: https://reviews.freebsd.org/D58716
misc/claude-code: Skip elftoolchain strip on Linux binaries
install(1) with -s runs FreeBSD's strip on the prebuilt Linux claude
binary, which fails with "elf_update() failed: Layout constraint
violation" and breaks the stage phase. Set STRIP= to install the
binary verbatim (stripping a foreign Linux ELF is pointless anyway).
Reviewed by: yuri
Differential Revision: https://reviews.freebsd.org/D58338
misc/claude-code: New port: Agentic coding tool from Anthropic that lives in
your terminal
This is the latest Claude Code CLI that comes only in the binary form.
Previous commit moved previous, NodeJS based claude-code
into claude-code-legacy because of some patches that are there.
Note: Using Claude Code does not strictly require Anthropic's
hosted proprietary models. The tool can interact with open
models via Ollama's Anthropic Messages API compatibility layer.
Users can run these models locally on their own hardware for free,
or utilize Ollama's cloud subscription open weights models for
expanded performance. Some open weights models (like DeepSeek v4 pro)
available via the Ollama cloud are almost as capable as Anthropic's
models for most purposes.
misc/claude-code: Add option USE_CURL_USER_AGENT
Problem:
Certain URLs reject requests from AI agents like Claude.
Example is https://bugs.freebsd.org.
Solution:
The USE_CURL_USER_AGENT option will make Claude to look like Curl.
Benerits to the user:
Claude will be able to read such URLs, summarize their content,
or perform other actions with the contents.
This makes Claude more usable when it comes to such protected URLs.
How it works:
Claude's Fetch tool uses the rgq() function in cli.js which returns:
Claude-User (claude-code/2.1.105; +https://support.anthropic.com/)
This UA is explicitly blocked by Anubis bot protection on bugs.freebsd.org
(and elsewhere), returning a ~2KB "Access Denied" page.
With USE_CURL_USER_AGENT=ON the post-extract-USE_CURL_USER_AGENT-on
target patches rgq() to return curl/8.19.0 (version detected from the
installed curl at build time).
misc/claude-code: Patch claude to increase timeouts to 24 hours
Current timeouts of 1 and 10 minutes easily get exceeded when
the AI endpoint API backend is CPU-based.
Even 10x10 munutes can easily get exceeded.
I raised this issue with the upstream.
Patching it here in the meantime.
Mk/Uses: Remove certs.mk
It was a useful shorthand for the security/ca_root_nss dependency.
However, several people disagreed.
Can anybody explain why libedit.mk is there? It is also a one string
substitution. Same with libarchive.mk.