<!-- Install · Tin · https://tin.ad/docs/install/ · generated from the built page -->

# Install

One line on macOS or Linux with Node 24 or newer. Or nothing at all: the [playground](https://tin.ad/docs/play/) runs the real compiler in your tab.

```tin
curl -fsSL https://tin.ad/install.sh | bash
```

 The script downloads one release (about 0.6 MB), checks its SHA-256 against the manifest it names, and installs to
`~/.tin`. If Node is missing or too old it stops and says how to get it. Run it again to update; set
`TIN_VERSION` to pin one. Where a native [`tinc`](https://tin.ad/docs/ref/cli/#tinc) is published for your machine
(macOS on Apple silicon for now), it also installs `~/.tin/bin/tinc`, the Tin compiler written in Tin, one file that needs no Node.

## Check it

```tin
export PATH="$HOME/.tin/bin:$PATH"
tin new hello && tin run hello/main.tin
```

 `tin` with no arguments lists every command; the [command reference](https://tin.ad/docs/ref/cli/) explains each.

## Remove it

```tin
rm -rf ~/.tin
```

 Then drop the `PATH` line from your shell profile.

## Your editor

Any editor that speaks the Language Server Protocol can run `tin lsp`: errors as you type, hovers, go to definition,
rename, completion and formatting. The VS Code extension is in `editors/vscode` in the source, not on the marketplace yet:

```tin
ln -s "$PWD/editors/vscode" ~/.vscode/extensions/tin-lang
```

## Where a program runs

| Target | Command | Needs |
| --- | --- | --- |
| Node | `tin run app.tin` | Node 24+ |
| Browser | `tin build app.tin -o app.wasm` | a modern browser; agents need Chrome or Edge 137+ |
| WASI | `tin build app.tin --target wasi` | a WASI 0.2 runtime such as wasmtime (`--preview1` for older ones) |
| Native | `tin build app.tin --native` | wasm2c, a C compiler and Mbed TLS: `sh scripts/install-native.sh` |
| Cloud | `tin deploy app.tin` | see [Deploying](https://tin.ad/docs/ref/deploy/) and [its limits](https://tin.ad/docs/ref/deploy/#limits) |

 Without a JavaScript host (WASI and native) Tin runs agents with tools, memory, typed replies, A.try, A.save / restore, guarded tools and agents as tools (the mock model and real ones), spawn and tasks, approve, files (with the directories the runner gives: wasmtime --dir), panics with their backtrace, fetch() and http(), telemetry spans (console, or OTLP/HTTP JSON when the program uses the network), and servers with their agent endpoints (POST /agents/<Name>, /mcp; an event stream arrives whole). Not yet: WebSocket routes (native), spawn inside a server, tool parameters of type i64 or an enum with data, robot worlds other than the built-in kinematic one (MuJoCo) (WASI) and learned robot policies (onnx, hub, remote). Not without JavaScript, by design: WebSocket routes (WASI), because wasi:http 0.2 has no connection upgrade; code: true agents (agent-written code), because running code the model wrote needs the Tin compiler and a wasm engine inside the program; voice agents and audio, because they need audio devices and a realtime model session over a WebSocket, which the JavaScript host provides; import js / mcp / py and extern fn, because they call into a JavaScript or Python host. Everything else runs on all four.

There is no package on npm yet and the source is not public yet. Built from `c9137d6`, Tin 0.1.0.
