---
title: Quickstart
slug: quickstart
summary: Install the CLI, sign in, query your data, and publish and run your first Function in six steps.
---

# Quickstart

This page takes you from nothing to a Function running on LimiLake. You need
macOS or Linux, Git 2.49 or later, and a LimiLake account with access to a
Workspace. The examples use a Workspace named `finance` and a Lakehouse named
`sales`; use your own names.

## 1. Install the CLI

```bash
curl -fsSL https://get.limilake.com/ | sh
limilake version
```

You see the CLI's version, source commit and platform.

## 2. Sign in

```bash
limilake auth login --host app.limilake.com
```

The CLI prints a link and a code. Open the link, check that it shows the same
code, and sign in. `limilake auth status` then shows who you are.

## 3. Look at your data

```bash
limilake lakehouse list --workspace finance
limilake query "SELECT * FROM gold.customers LIMIT 5" --lakehouse sales
```

You see the Workspace's Lakehouses, then up to five rows. Queries are
read-only. `limilake table list --lakehouse sales` shows the tables you can
read.

## 4. Clone the Workspace and add a Function

```bash
limilake workspace clone finance
cd finance
limilake add function hello
```

The CLI writes `functions/hello/function.py`. Below a short docstring, it
holds this:

```python
import limilake

fn = limilake.function(
    id="c6b05c7a-997e-4160-984e-f5c32f0a5941",
    name="hello",
    access="private",
    run_as="caller",
)


@fn.action
def hello(payload: dict[str, str]) -> dict[str, str]:
    """Describe what this Function does."""
    return {"message": payload.get("message", "Hello from LimiLake")}
```

Your `id` is different: the CLI generates it once. Keep it when you edit or
move the file.

## 5. Publish it

```bash
git add -- functions/hello/function.py
git commit -m "Add hello Function"
git push origin HEAD:main
```

A push to `main` publishes the Workspace. There is no separate deploy step.
`limilake function list` shows `hello` once LimiLake has indexed the push.

## 6. Run it and see the run

```bash
limilake function invoke hello --input '{"message":"Hi"}'
```

LimiLake runs the Function in a sandbox on its servers and prints the new
Run's id. Follow it to the end:

```bash
limilake function watch functions/hello/function.py <run-id>
```

You see the status reach `completed` and the result
`{"message": "Hi"}`. `limilake function logs functions/hello/function.py`
lists the Function's recent Runs.

To run a Function on your machine instead, use
`limilake function invoke hello --local`. It needs the version-matched
`limilake[serve]` runtime in your Workspace; see
[Functions](./functions.md#running).

For everything around setup, such as verifying the download, updating the
CLI, CI tokens and access errors, see the full
[setup reference](./getting-started.md).

## Next steps

- [Functions](./functions.md): actions, HTTP routes and syncs.
- [Apps](./apps.md): show your data in a React App.
- [Schedules](./schedules.md): run a Function on a schedule.
- [Templates](./templates.md): start an App from a dashboard or finance
  template.
