Skip to content

About

Design, slice and print on an Ender 3 V2, with Claude Code and a Go print server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Stringing Along

Design a part, slice it and print it on an Ender 3 V2, with Claude Code driving each step. The name comes from PETG, which strings along behind the nozzle whenever it gets the chance.

What's here

Folder What it is
tramline/ A small Go print server for a Raspberry Pi. It switches the printer's plug, preheats, checks the bed's tram, and prints from the SD card or by streaming from the Pi.
cura/ The tuned PETG profile, start G-code and scripts that slice STLs with Cura's engine from the command line.
.claude/skills/ Claude Code skills for this project: solidcraft-design, cura-slicing and tramline.

Download Tramline

Prebuilt binaries from the latest release. The Pi runs the server from the same program that other computers use as the client:

Check the download and make it executable before installing it as tramline on your PATH, for example on a Mac:

shasum -a 256 -c --ignore-missing SHA256SUMS
chmod +x tramline-darwin-arm64
mv tramline-darwin-arm64 ~/.local/bin/tramline

On Linux, use sha256sum instead of shasum -a 256. The binaries aren't signed, so on a Mac, a copy downloaded in a browser also needs xattr -d com.apple.quarantine ~/.local/bin/tramline before it will run. Building it yourself with just tramline/install works too, see Tramline, for printing.

How it fits together

  1. Design in SolidCraft, a parametric CAD app, through its MCP server. Each design lives in projects/<name>/.

  2. Slice the STL:

    cd projects/<name>
    bash ../../cura/slice_petg.sh part.stl

    This writes part_PETG.gcode next to the STL.

  3. Print with Tramline. It turns the printer on, always checks tram first, needs your confirmation that the bed is clear, and turns the printer off afterwards. See Tramline's README for printing from the card instead:

    tramline upload part_PETG.gcode
    tramline print part_PETG.gcode --from pi --bed-clear

    tramline is the client that just install puts on the PATH, see Tramline, for printing.

Not in this repository

These stay on the local machine, see .gitignore:

  • The SolidCraft binaries on Linux (solidcraft, solidcraft-cli, solvecraft-cli). On a Mac, SolidCraft is an app in /Applications.
  • projects/, the designs, STLs and G-code.
  • tramline/dist/, tramline/.cache/ and tramline/test-logs/. Tramline's engineering notes refer to files in test-logs/, and those only exist locally.

Tramline's keys stay out too, in ~/.config/tramline/ on the client and /var/lib/tramline/ on the Pi. See Setting up a new computer for how to replace what's missing.

Setting up a new computer

Claude Code picks up the skills by itself when started in this folder, but they rely on things git doesn't carry. Run these from the repository root. It works on Linux and macOS, and the steps say where they differ.

git clone git@github.com:Moudoux/stringing-along.git
cd stringing-along

SolidCraft, for designing

  1. Install it:

    • macOS: install the SolidCraft app in /Applications.
    • Linux: copy the binaries solidcraft, solidcraft-cli and solvecraft-cli into the repository root from a computer that has them.
  2. Connect it to Claude Code:

    # macOS
    claude mcp add solidcraft -- /Applications/SolidCraft.app/Contents/MacOS/solidcraft-cli mcp
    # Linux
    claude mcp add solidcraft -- "$PWD/solidcraft-cli" mcp
  3. Copy projects/ across too, if you want the existing designs.

Cura, for slicing

Install Cura 5.13, as the scripts run the engine inside it and expect it in one place. These are the only paths that aren't relative:

  • macOS: /Applications/UltiMaker Cura.app, the usual place. Set CURA_APP if it's somewhere else. Cura has no command of its own to put on the PATH, and doesn't need one.
  • Linux: /opt/ultimaker-cura.

Older versions aren't safe to assume: 5.7.2 heats the nozzle to 235 C before the start G-code runs, so PETG oozes while probing. You also need Python 3 and bash.

Tramline, for printing

The server is already on the Pi, so a new computer only needs a client. It must be on the same network as the Pi, and needs Docker and just to build.

  1. Build the client and install it as tramline in ~/.local/bin. This runs tramline/build.sh, which builds in Docker and needs no Go on the host:

    just tramline/install

    Set TRAMLINE_BINDIR to install somewhere else. ~/.local/bin has to be on your PATH. Ubuntu and Fedora add it by default, but macOS and Arch don't, so add export PATH="$HOME/.local/bin:$PATH" to ~/.zshrc or ~/.bashrc there. Run it again after pulling changes.

  2. Create this computer's key, in ~/.config/tramline/ on Linux and macOS alike. It stays on this computer, and the command prints only the public fingerprint:

    tramline keygen
  3. On the Pi, get the server's fingerprint and allow the new client:

    sudo -u tramline tramline fingerprint
    sudo -u tramline tramline allow <client-fingerprint> --name <computer-name>
  4. Back on the new computer, log in and check it works:

    tramline login https://raspberrypi:8726 <server-fingerprint>
    tramline status
  5. Add an SSH host called raspberrypi to ~/.ssh/config, using user pi. Saving logs and deploy/install.sh both use it. The client itself doesn't need SSH.

Claude's rules and notes

These stay on the original computer, in ~/.claude/:

  • Global rules: ~/.claude/CLAUDE.md holds the rules on never reading secrets, never running sudo, and handing off to a new session. The tramline skill repeats the first two, but only while that skill is in use, so copy the file across to keep them in every session.
  • Memory: Claude's notes aren't copied, so it starts without them. The READMEs and skills hold most of what matters.

Setting up a new Pi

This is only needed if the Pi itself is replaced. See Security, Install and updates, Config and the test plan in Tramline's engineering notes. In short: deploy/install.sh <ssh-host>, tramline init --ip <address> and tramline hue pair on the Pi, then fill in /etc/tramline/config.json with the plug's UUID from tramline hue plugs. These need sudo on the Pi, and the printer needs the USB cable with its +5V wire cut, see The USB cable in that README.

Status

Tramline's stage 10 passed on the real printer on 2026-11-04, including a 63-minute streamed print. See the status table at the top of Tramline's engineering notes for what's proven on the printer and what has only run on the simulator.

About

Design, slice and print on an Ender 3 V2, with Claude Code and a Go print server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages