> ## 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.

# Overview

> Every envctl command, the environment variables it reads, the files it keeps and its exit codes.

`envctl` is one binary: the CLI, and envd, the agent that makes your machine a sandbox.

## Commands

| Command | What it does |
| - | - |
| [`envctl login`](/cli/login) | Store the API's address and a token |
| [`envctl templates`](/cli/login#envctl-templates) | List the templates you can lease |
| [`envctl sandbox`](/cli/sandbox) | Make this machine the sandbox, stop it, or show it |
| [`envctl env`](/cli/env) | Create, list and delete environments |
| [`envctl exec`](/cli/exec) | Run a command in an environment |
| [`envctl sync`](/cli/sync), `status`, `logs` | Sync now, show shares and peers, show connections |
| [`envctl snapshots`](/cli/snapshots) | List a project's snapshots |
| [`envctl artifact`](/cli/artifact) | Store, fetch, list, link and delete artifacts |
| [`envctl project`](/cli/project) | List project keys, or shred one |
| [`envctl skills`](/cli/skills) | Install or print the envlink skill for coding agents |
| `envctl version` | Print envctl's version |

`envctl <command> -h` prints a command's flags.

## Environment variables

| Variable | Used for |
| - | - |
| `ENVLINK_API` | The API's address; overrides what `login` stored |
| `ENVLINK_TOKEN` | A CLI token; overrides what `login` stored |
| `ENVLINK_INSTALL_DIR` | Where `install.sh` puts envctl |
| `ENVLINK_SOCKET` | The local envd's socket, for `status`, `sync` and `logs` inside an environment |

## Files

| Path | What it is |
| - | - |
| `~/.envlink/credentials.json` | The API's address and your token, mode 0600 |
| `~/.envlink/sandbox/` | The sandbox's envd: configuration, tailnet identity, project keyring, logs, socket |
| `.remote/<environment>/<share>/` | Results from an environment's out shares, in the sandbox's folder |

## Exit codes

| Code | Meaning |
| - | - |
| `0` | Success |
| `1` | Something went wrong: the message says what |
| `2` | The command line was wrong |
| Any other | `envctl exec` passes the remote command's code through; `124` means `--timeout` stopped it |


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