Folks: Let's get Claude Code native installer working for FreeBSD

Hello everyone.

This is the way I do it.
It works on 15.1 and it's easy.

# Switch to the latest branch
Code:
grep -h '^[A-Za-z-]*:' /etc/pkg/FreeBSD.conf
mkdir -p /usr/local/etc/pkg/repos
cat > /usr/local/etc/pkg/repos/FreeBSD-ports.conf <<"EOF"
FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
EOF
pkg update -f

# Activate Linuxulator permanently
Code:
sysrc linux_enable=YES
service linux start

# Mount fdescfs with linrdlnk (without that, claude will freeze)
Code:
printf "fdesc\t/dev/fd\tfdescfs\trw,linrdlnk\t0\t0\n" >> /etc/fstab
mount -t fdescfs -o linrdlnk fdesc /dev/fd

# Install claude-code
Code:
pkg install claude-code

# Deactivate the auto-updater
Code:
cat >> ~/.profile <<'EOF'
export DISABLE_AUTOUPDATER=1
EOF

# Set your API key
Code:
export ANTHROPIC_API_KEY="sk-ant-api..."
echo 'export ANTHROPIC_API_KEY="sk-ant-api..."' >> ~/.profile

# Start Claude code
Code:
claude
 
I got codex CLI runing on ghostBSD nativelly, havent tested it on freebsd yet (I dont know all the differences yet). If anyone is interested let me know, I will put it on github public this weekend if anyone wants it. It took an awful long time to build though because my test laptop has low ram (16 GB) I couldnt build it in paralelle, took about 4 + hours to build. GPT-SOL and GPT-Astra runing beautifully ! If you have enough RAM to handle all thread build it will probably compile in minutes.
 
I have gone out of my way to "leverage" frontier models in various ways such as vacation planning, vibe coding and general debugging only to find that:
1. It took way longer than anticipated to get to a semi-desirable outcome;
2. I spent a consider amount of time manually verifying the AI's output which usually required many iterations with AI and then using good 'ol search engines (which are slowly turning into trash);
3. I didn't learn anything useful during the process.

I am shocked at how much money has been spent on AI thus far and what is earmarked for the short term. I'm also shocked on something that is so innovative and revolutionary that it doesn't have a native *BSD installer. With how powerful AI is then shouldn't it take just a few moments to have a perfect port for FreeBSD?
 
pkg install codex Work well on FreeBSD 16.0-CURENT amd64

AIs require a significant amount of time for setup and familiarization; one must write rules and templates for code generation and then verify the output. This process should not take longer than writing the code directly.
 
What happens when you need to maintain that code ? Bug fixes and such... Or is it easier to ask the AI to rewrite from scratch but this go around tell it do not make any mistakes ?
 
Back
Top