# Install newt
URL: /docs/install

Install the newt CLI as a global tool from the public newt-python repo. Takes about five minutes.



New Theory ships from a public GitHub repo today, not PyPI. The HTTPS install command below clones `new-theory-research/newt-python` anonymously — no GitHub account or access setup needed. A public PyPI release is eventually planned.

## Install the CLI with uv tool [#install-the-cli-with-uv-tool]

`uv tool install` puts `newt` on your PATH as a global command — no virtual environment to create or activate:

```bash
uv tool install "git+https://github.com/new-theory-research/newt-python.git"
```

On a machine set up for SSH-based GitHub auth instead, use the SSH URL:

```bash
uv tool install "git+ssh://git@github.com/new-theory-research/newt-python.git"
```

If `uv` is not installed: `curl -LsSf https://astral.sh/uv/install.sh | sh`, then `source $HOME/.local/bin/env`.

If `newt` isn't on PATH after install, run `uv tool update-shell` — this adds `~/.local/bin` to your shell profile. uv's own installer handles it automatically for new installs; a manual shell may need it once.

Python 3.11 or newer is required. `uv python install 3.12` if you need it.

## Add the library to a Python project [#add-the-library-to-a-python-project]

The `newt` Python library installs into a project, not globally. You add it when you have Python code to write:

```bash
uv init my-robot
cd my-robot
uv add "newt @ git+https://github.com/new-theory-research/newt-python.git"
```

On a machine set up for SSH-based GitHub auth instead, use `uv add "newt @ git+ssh://git@github.com/new-theory-research/newt-python.git"`.

`uv run python` resolves the project environment regardless of shell state — no activation needed, agent-safe:

```bash
uv run python -c "from newt import Robot"
```

Starter kits run `uv sync` on first setup and handle the library install automatically.

## SSH-only machines [#ssh-only-machines]

If your machine routes all GitHub traffic over SSH, add the insteadOf rewrite before any install step that fetches `git+https://` URLs:

```bash
git config --global url."git@github.com:".insteadOf "https://github.com/"
```

## HTTPS-only machines [#https-only-machines]

If your machine authenticates to GitHub over HTTPS (the `gh` CLI credential helper, for example) and has no SSH key registered, add the reverse rewrite before any install step that fetches `git+ssh://` URLs:

```bash
git config --global url."https://github.com/".insteadOf "git@github.com:"
```

## Verify [#verify]

```bash
newt --version
```

Or continue to [Getting started](/docs/getting-started) — `newt login` in step 2 confirms the tool is on PATH and can reach the API.

## Next [#next]

[Getting started →](/docs/getting-started) — authenticate with an API key and confirm the API answers. No hardware needed.
