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

# Quickstart

> Install envctl, lease a Linux build box, build a project there and get the binary back, in about three minutes.

You need a Mac or a Linux machine and a CLI token from the [console](https://envlink.projectinwork.com).

<Note>
  Setting this up for a coding agent instead? Follow [Set up a coding agent](/agents/setup). It installs the envlink skill, which walks the agent through the same loop.
</Note>

<Steps>
  <Step title="Install envctl">
    ```bash theme={null}
    curl -fsSL https://envlink.projectinwork.com/install/install.sh | sh
    ```

    The script picks the build for your system, checks it against its published checksum, and puts `envctl` in `/usr/local/bin`, or `~/.local/bin` when that isn't writable. See [Install](/install) for other ways.
  </Step>

  <Step title="Log in">
    In the console, open **Settings → CLI tokens** and create a token. Then:

    ```bash theme={null}
    envctl login --api https://envlink-api.projectinwork.com --token elk_...
    ```

    The token is stored in `~/.envlink/credentials.json`, readable only by you. On a CI runner, set `ENVLINK_API` and `ENVLINK_TOKEN` instead.
  </Step>

  <Step title="Make this machine the sandbox">
    From the folder you want to work in:

    ```bash theme={null}
    envctl sandbox up
    ```

    envd starts in the background and joins your organization's tailnet. Share paths you use later are relative to this folder.
  </Step>

  <Step title="Lease a build box and share your folder">
    ```bash theme={null}
    envctl env create linux-build --share src=. --label demo=quickstart
    ```

    It prints the box's name, such as `linux-build-3f2a`, once it's ready, usually in three to four seconds. Your folder syncs to its `/work`. Files your `.gitignore` leaves out stay home, and so do secret files like `.env`.
  </Step>

  <Step title="Build there">
    ```bash theme={null}
    envctl exec linux-build-3f2a -- sh -c 'cd /work && go test ./... && go build -o out/app .'
    ```

    Output streams back as it happens, and envctl exits with the command's exit code. Anything the command writes to `/work/out` is on your machine by the time `exec` returns:

    ```bash theme={null}
    ls .remote/linux-build-3f2a/out/
    ```
  </Step>

  <Step title="Release it">
    ```bash theme={null}
    envctl env delete linux-build-3f2a
    ```

    The container and its data are removed. An environment you forget stops on its own after its idle timeout, an hour for `linux-build`.
  </Step>
</Steps>

## Try a database

```bash theme={null}
envctl env create postgres
psql postgres://app:app@127.0.0.1:5432/app -c 'select version()'
```

The database listens on your machine's `127.0.0.1:5432`, carried over the tailnet. "Ready" means it accepts connections. See [Services on localhost](/guides/services-on-localhost).

## Next

<CardGroup cols={2}>
  <Card title="Concepts" icon="book" href="/concepts">
    Environments, templates, shares, projects and snapshots.
  </Card>

  <Card title="File sync" icon="arrows-rotate" href="/guides/file-sync">
    What travels, what stays home, and how to change it.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.