# Install & run

> How to build Langoost from source with Go and run your first .goost script, start the REPL, or launch the persistent execution server.

# Install & run

Langoost is in active development. Today you build it from source with the Go
toolchain; prebuilt binaries are planned for a later release.

## Prerequisites

- [Go](https://go.dev/dl/) 1.21 or newer

## Build from source

```
$ git clone <langoost-repo>
$ cd langoost
$ go build -o langoost .
```

This produces a single `langoost` binary in the current directory.

> During development you can skip the build step and run directly with
> `go run . run script.goost`.

## Your first script

Create **hello.goost**:

```goost
let name: string = "world"
print("Hello, " + name + "!")
```

Run it:

```
$ ./langoost run hello.goost
Hello, world!
```

## The REPL

Start an interactive session to experiment line by line:

```
$ ./langoost repl
> let x = 21
> print(x * 2)
42
```

Press `Ctrl+D` to exit.

## Server mode

Langoost can run as a persistent execution server — the model it's designed
for. The process stays warm and serves requests with no cold start:

```
$ ./langoost server --port 8080
```

| Flag | Default | Description |
| --- | --- | --- |
| `--port` | `8080` | Port to listen on |
| `--timeout` | `30s` | Max execution time per request |
| `--dir` | `.` | Directory to search for `.goost` files |

To build an HTTP API directly from a script instead, see the
**[HTTP server](/docs/http-server)** guide.

## Inspect the bytecode

Curious what the compiler produces? Disassemble any script:

```
$ ./langoost disasm hello.goost
```

Next: take the **[language tour](/docs/language-tour)**.