# Overview

Install the eggox command line, log in, and take your games to your own machine.

The `eggox` command line brings a game to your machine as files, checks
them, pushes them back and publishes. It needs node 18 or newer and
nothing else.

## Installing

With npm:

```
npm install -g @eggox/cli
```

Without npm, from the site:

```
curl -fsSL https://eggox.net/cli/install.sh | sh
```

The installer puts the CLI in `~/.eggox` and a launcher at
`~/.local/bin/eggox`. Both ways give you the same file; the source is
[github.com/EggvelopStudio/eggox-cli](https://github.com/EggvelopStudio/eggox-cli).

## Checking the version

```
eggox --help
```

The first line is the version.

## Updating

Installed with npm:

```
npm install -g @eggox/cli@latest
```

Installed with the installer:

```
eggox update
```

## Logging in

```
eggox login
```

A browser opens on Eggox and asks you to let the command line in. The
login is kept in `~/.config/eggox/credentials.json` and renews itself.
Every other command needs it: nothing on the API answers without a valid
login, and each account is limited to 120 requests a minute.

## Without a browser

On a machine with no browser (a server, CI, an agent's sandbox), log in
elsewhere and set `EGGOX_TOKEN` to the access token from your
credentials file. A token lasts a day.

```
EGGOX_TOKEN=... eggox push
```

`EGGOX_SERVER` or `--server` picks a server other than eggox.net, for
example a staging one.

## Options every command takes

| option | does |
| --- | --- |
| `--server URL` | which Eggox to talk to (default: the one you logged in to last) |
| `--json` | machine-readable output |
| `--help`, `-h` | the command list |

## Commands

### eggox login

Log in to Eggox from this machine. [Learn more](/cli/login)

```
eggox login [--server URL]
```

### eggox logout

Forget the login. [Learn more](/cli/logout)

```
eggox logout
```

### eggox whoami

Who is logged in, on which server. [Learn more](/cli/whoami)

```
eggox whoami
```

### eggox games

The games you own. [Learn more](/cli/games)

```
eggox games
```

### eggox pull

A game as files, into a folder. [Learn more](/cli/pull)

```
eggox pull <game> [dir]
```

### eggox check

Would these files work? Errors as file:line. [Learn more](/cli/check)

```
eggox check [dir]
```

### eggox push

Make the game match the files. [Learn more](/cli/push)

```
eggox push [dir] [--force]
```

### eggox publish

Publish the game as it stands. [Learn more](/cli/publish)

```
eggox publish [dir]
```

### eggox bag

The mints in your bag. [Learn more](/cli/bag)

```
eggox bag
```

### eggox stock

The things a game holds; put one in, take one back. [Learn more](/cli/stock)

```
eggox stock [dir]
eggox stock add <mint> [dir]
eggox stock take <thing> [dir]
```

### eggox docs

The reference as markdown, for reading in a terminal or feeding an agent. [Learn more](/cli/docs)

```
eggox docs [api|project]
```

### eggox mcp

Serve the commands to an AI agent over MCP. [Learn more](/cli/mcp)

```
eggox mcp
```

### eggox update

Fetch the newest eggox from the server. [Learn more](/cli/update)

```
eggox update
```

