# Quickstart

> Install Theoria-CLI, set up Lean and Mathlib, and prove a first theorem.

## 1. Install

```sh
curl -fsSL https://www.theoria.sh/install/cli.sh | bash
theoria version
```

If `~/.local/bin` is not on your `PATH`, the installer prints the line to add to your shell profile.

## 2. Start Theoria and create a project

```sh
mkdir -p ~/research && cd ~/research
theoria
```

```text
/new-project "Goldbach conjecture"
```

A project's type (mathematics, theoretical physics, AI/ML, quantitative finance, other) decides which commands it gets. Mathematics and physics projects get the Lean workflows. See [`/project`](https://www.theoria.sh/docs/commands.md#project).

## 3. Set up Lean and Mathlib

```text
/lean install          # clone a Mathlib release and fetch its build cache (about 7 GB)
/lean config           # choose the Mathlib version for this project
/lean search install   # Mathlib search: Loogle, Lean Finder and local search
```

Lean comes from [elan](https://github.com/leanprover/elan); install it first if `lean --version` does not work. How Theoria shares one Mathlib build across projects is explained in [Lean environments](https://www.theoria.sh/docs/lean-environments.md).

## 4. Connect a model

Theoria runs on the [Pi coding agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent). With AWS credentials it starts on Amazon Bedrock; otherwise use `/login` for a provider account, or set an API key, then `/model` to choose.

## 5. Formalize and prove

```text
/formalize every finite group of prime order is cyclic --name prime_order_cyclic
/prove formal/PrimeOrder.lean prime_order_cyclic
```

Each workflow ends with a verdict from Lean: the statement unchanged, no `sorry`, only standard axioms. Ask in plain language too, and the agent starts the right workflow. Every form of these commands is in [Slash commands](https://www.theoria.sh/docs/commands.md#lean-and-proofs).

## 6. Explore what is next

```text
/next-steps 2401.01234 --n 5
/help
```

## Related

- [Slash commands](https://www.theoria.sh/docs/commands.md): Every Theoria-CLI slash command, with its forms and examples.
- [Lean environments](https://www.theoria.sh/docs/lean-environments.md): How Theoria finds, installs and shares Lean and Mathlib, and keeps long Lean runs light on disk.
- [Configuration](https://www.theoria.sh/docs/configuration.md): Settings, harness profiles, the interface and where Theoria keeps its files.

Last updated 2026-11-10. Web page: https://www.theoria.sh/docs/quickstart