# Installing the SDK tools

One installer per system puts the SDK's tools on a machine: `sona`, the [command line](cli.md); `sona-mcp`, the
[MCP server](mcp.md) for agents; [SDK Studio](studio.md), the desktop app; and the offline docs. The SDK itself (headers and libraries for your game) is the download made for your app, not part of this.

A person setting up a computer uses [360sona SDK Setup](setup.md) instead: it installs these tools, downloads the SDK made
for the app and sets everything up in one window. This page is the tools alone, for agents, scripts and CI.

The installer is the same for every developer. `GET /sona/v1/sdk` lists it under `tools` (file, version, SHA-256)
and `GET /sona/v1/apps/<app id>/tools?platform=<system>` gives it, with your app key; later copies come with
`sona app tools <system>`. Nothing in it asks a question once started with `--quiet` on Windows, and `install.sh`
never asks ([Unattended agents](unattended.md)).

```sh
curl -s -H "Authorization: Bearer $SONA_APP_KEY" -OJ "https://360sona.com/sona/v1/apps/$SONA_APP/tools?platform=linux-x64"
```

- Windows x64: `360sona-sdk-tools-<version>-windows-x64-setup.exe`, into `%LOCALAPPDATA%\Programs\360sona SDK` (no administrator rights). To remove it: Apps and features, or `uninstall.exe` in that folder.
- Linux x64: `360sona-sdk-tools-<version>-linux-x64.tar.gz`, into `~/.local` (or `--prefix`). To remove it: `360sona-uninstall`.
- macOS: `360sona-sdk-tools-<version>-macos.tar.gz`, into `~/.local` (or `--prefix`). To remove it: `360sona-uninstall`.

## Windows

Run the setup program and say OK. It copies the tools, adds their `bin` folder to your PATH (open a new terminal),
puts SDK Studio in the Start menu, and adds "360sona SDK tools" to Apps and features. Every file it writes is listed
in `share\360sona\install-manifest.txt`.

```text
360sona-sdk-tools-1.1.0-windows-x64-setup.exe --quiet [--prefix <folder>] [--no-path]
"%LOCALAPPDATA%\Programs\360sona SDK\uninstall.exe" --quiet
```

`--quiet` (or `/S`) asks nothing. Started by a program without it (output piped or redirected, or `SONA_UNATTENDED`
or `CI` set), the setup program opens no window: it changes nothing and exits 2, saying to pass `--quiet`. It never overwrites a file it did not install: if the folder already holds one of its
files from elsewhere it stops and changes nothing. Uninstalling removes the files it wrote, the folders it made once
they are empty, its own entry in your PATH (the rest of the PATH stays as it was, however long), the shortcut and the
Apps and features entry. A folder that held your own files before keeps exactly them.

## Linux and macOS

```sh
tar xzf 360sona-sdk-tools-1.1.0-linux-x64.tar.gz
cd 360sona-sdk-tools-1.1.0-linux-x64
./install.sh                      # ~/.local; --prefix /opt/360sona, or sudo ./install.sh --prefix /usr/local
export PATH="$HOME/.local/bin:$PATH"   # when ~/.local/bin is not on PATH (root on Ubuntu, for one)
~/.local/bin/360sona-uninstall    # removes exactly what install.sh wrote
```

`install.sh` asks nothing and reads nothing from the terminal; `--quiet` only prints less. When `<prefix>/bin` is not
on PATH it prints the `export PATH=...` line to add (to `~/.profile` to keep it). It puts `sona`, `sona-mcp` and `sona-studio` in `<prefix>/bin`, the Studio and its libraries in
`<prefix>/lib/360sona`, and the docs and sample avatars in `<prefix>/share/360sona`. On Linux it adds a menu entry
for SDK Studio (`$XDG_DATA_HOME/applications`), on macOS an app in `~/Applications`; `--no-menu` leaves them out.
Every file and folder it makes is listed in `<prefix>/share/360sona/install-manifest.txt`; installing again first
removes the earlier install. It stops without changing anything if a file it would write is already there and was not
put there by an earlier install. On macOS the Studio draws with GL 4.1 core; the package needs no other library. The installed `sona` and `sona-mcp` find the docs and samples beside themselves
(`../share/360sona`), so `sona docs search ...` and an agent's `project_create` work with no options.
