> For the complete documentation index, see [llms.txt](https://gauntletlang.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gauntletlang.gitbook.io/docs/basics/file-setup-and-hello-world.md).

# File Setup & Hello World

## Starting a File

Gauntlet mirrors Go's package-based compilation model. As such, every file must start with `package <name>`.

## Importing and Using Modules

Gauntlet's import syntax is:<br>

```fsharp
import "<modulename>" as <aliasname>
```

It is **required** that you give an alias to every module you impor&#x74;**.**

Once you have imported it, you can use it like you normally would in Golang.

If you imported `fmt` as such:

```go
import "fmt" as fmt
```

Then you must access it using whatever is on the right side of the "as" keyword (`fmt`):

```go
fmt.println("Hello World!")
```

## The "main" Function

{% hint style="info" %}
Functions are explained in more detail later
{% endhint %}

The `main` function is the entry point of every Gauntlet program; it is not required in every file. It must have a return type of `Unit`.

## Working Hello World Example

{% tabs %}
{% tab title="Gauntlet" %}

```fsharp
package main

import "fmt" as fmt

fun main(): Unit {
  fmt.println("Hello World!")
}
```

{% endtab %}

{% tab title="Transpiled" %}

```go
package main

import fmt "fmt"

func main() {
	fmt.Println("Hello World!")
}
```

{% endtab %}

{% tab title="Output" %}

```
Hello World!
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gauntletlang.gitbook.io/docs/basics/file-setup-and-hello-world.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
