> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniac.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Scaffold, deploy, and call your first Uniac service.

By the end you will have a deployed service reachable at `https://<endpoint-id>.svc.uniac.ai`.

## Prerequisites

* Python 3.11 or newer
* Node 16 or newer (to install the CLI via npm)
* Docker (for `uniac dev`)

## 1. Install the CLI and SDK

```bash theme={null}
npm i -g @uniac/cli
pip install uniac
```

## 2. Log in

```bash theme={null}
uniac auth login
```

This opens a browser to complete the sign-in flow and writes a token to `~/.uniac/auth.json`.

## 3. Scaffold a project

```bash theme={null}
uniac init
cd my-first-service
```

`uniac init` is interactive — pick `app` for the kind, Python for the language, and accept the default entrypoint. The result is a `uniac.json` manifest and a starter `app.py`.

Replace `app.py` with a minimal System:

```python app.py theme={null}
from uniac import System, load

class MyFirstService(System):
    def __init__(self, greeting: str = "hello"):
        self.greeting = greeting

service = load(MyFirstService)

# Your handler — Uniac runs whatever your entrypoint command starts.
# For a FastAPI app:
from fastapi import FastAPI
api = FastAPI()

@api.get("/hello")
def hello(name: str = "world"):
    return {"message": f"{service.greeting}, {name}!"}
```

Add a `requirements.txt`:

```text requirements.txt theme={null}
fastapi
uvicorn[standard]
```

## 4. Run it locally

```bash theme={null}
uniac dev
```

The simulator starts a local Docker stack and opens the dashboard. Send `GET /hello?name=cloud` from the dashboard's request panel.

## 5. Deploy

```bash theme={null}
uniac link
uniac deploy
```

`uniac link` binds the project to a remote Uniac project (created on the fly if it doesn't exist). `uniac deploy` builds, pushes the image, and registers the deployment. The CLI prints the public URL on success:

```
Deployed: https://ab12cd.svc.uniac.ai
```

Call it:

```bash theme={null}
curl https://ab12cd.svc.uniac.ai/hello?name=cloud
```

## Next steps

<CardGroup cols={2}>
  <Card title="Your first service" icon="book-open" href="/get-started/your-first-service">
    The same flow with deeper explanations.
  </Card>

  <Card title="Concepts" icon="cube" href="/concepts/services">
    Services, Systems, Nodes, projects, deployments.
  </Card>
</CardGroup>
