Definitive Manual

The Developer's Bible: Part 1

Zero-Config Toolchains: Mastering Rust, Go, Node, and Python Isolation.

The Philosophy of Clean Hosts

The cardinal sin of development is "Global Installation." When you run sudo npm install -g or pip install --user, you are creating a "Dependency Hell" that will eventually break your system. In Tebian, we follow the Clean Host doctrine: Your global OS should only contain the kernel, the compositor, and the container engine.

This treatise explains how to manage complex developer toolchains in user-space, ensuring that Project A's Node 18 dependency never conflicts with Project B's Node 20 requirement.

1. Mise: The Polyglot Version Manager

Historically, developers used separate tools for every language: nvm for Node, pyenv for Python, rustup for Rust, goenv for Go. This is bloat. Tebian standardizes on Mise (formerly RTX), a single, Rust-based binary that manages all your runtimes.

The .mise.toml Config

With Mise, you define your project's environment in a simple TOML file. When you cd into the directory, Mise automatically loads the correct versions into your PATH.

[tools]
node = "20.11.0"
python = "3.12"
rust = "1.76"
go = "1.22"

[env]
NODE_ENV = "development"
DATABASE_URL = "postgres://localhost:5432/mydb"

This file is committed to Git. When a new developer pulls your repo on a Tebian machine, they simply run mise install, and they have an identical environment to yours. Zero friction.

2. Direnv: The Shell Auto-Loader

Mise handles the binaries, but Direnv handles the context. It hooks into your shell (Bash/Zsh) and executes a .envrc script whenever you enter a directory. We use this to automatically activate Python virtual environments or load secrets.

The Python Workflow

Forget source venv/bin/activate. In Tebian, you create a .envrc file with one line:

layout python

The moment you cd into the folder, Direnv creates the venv (if missing) and activates it. Your prompt changes to show the active environment. When you cd .. out, it deactivates. It is seamless, C-level automation.

3. Rust and C Interoperability

For systems programming, you need more than just a compiler; you need libraries (`openssl`, `libssl-dev`, `pkg-config`). On a standard distro, installing these globally can break system packages. Tebian solves this with Dev Containers.

We provide a devcontainer.json template that spins up a pure Debian container with all the necessary C headers pre-installed. Your editor (Neovim/VSCode) connects to this container. You are compiling code inside the container, but editing it on your host. Your host OS stays clean; your build environment is reproducible.

4. The Node.js Trap (npm vs pnpm)

Node.js is notorious for consuming disk space. A standard node_modules folder can be 500MB. If you have 20 projects, that's 10GB of duplicated dependencies. Tebian defaults to pnpm (Performant NPM).

pnpm uses a global content-addressable store. If you use React 18 in 100 projects, it is stored on disk exactly once. It links the dependency into your project using hardlinks. This saves massive amounts of SSD space and makes installations instant.

Conclusion: The Reproducible Workstation

By using Mise, Direnv, and pnpm, you turn your workstation into a stateless engine. You can wipe your machine, reinstall Tebian, pull your Git repos, and be back to work in 5 minutes. The configuration lives in the code, not in the OS. This is the definition of a Sovereign Developer.