# Install

URL: https://skywake.dev/docs/getting-started/install

Install the CLI and the SDKs, sign in, and run the MCP server.

Most people start with the CLI from npm, then sign in:

```bash norun
npm install -g skywake
skywake login
```

## The CLI [#the-cli]

The npm package ships prebuilt binaries for Linux on x86_64 and arm64 (glibc). npm installs only the one for your machine. You need Node 18 or later. To run it without installing, use `npx skywake`.

On any other platform, build the `skywake-cli` crate from source:

```bash norun
cargo build --release -p skywake-cli    # target/release/skywake
```

## The SDKs [#the-sdks]

```bash tab="TypeScript" norun
npm install skywake
```

```bash tab="Python" norun
pip install skywake
```

The `skywake` npm package is the TypeScript SDK, plus `skywake/bash` and `skywake/ai` for [agents](../agents/bash.mdx), and the CLI. Go, Rust, Java, C# and Ruby SDKs have the same disks and verbs. See the [SDK reference](/reference/sdk).

## Sign in [#sign-in]

```bash norun
skywake login
```

[`skywake login`](/reference/cli/login) signs you in through the browser. It shows a code and opens the console at `/cli/CODE`. Check that the console shows the same code, choose the key's role and environment, and allow it. The CLI then saves a new key for you.

To use a key you already have, run `skywake login --paste` and paste it, or set `SKYWAKE_API_KEY` before you run `skywake login`. Make keys in the console under Settings → API keys, or see [API keys](../security/api-keys.mdx).

[`skywake whoami`](/reference/cli/whoami) shows the key's organization, environment and role. A key belongs to one organization and one environment, so you never name the environment again. An organization admin may make a key for every environment. With one of those, pick the environment with `skywake env staging`, `--env`, `SKYWAKE_ENV`, or `environment` in the SDKs.

## Where settings come from [#where-settings-come-from]

The SDKs, the CLI and the MCP server read their settings the same way. The first match wins:

| Setting     | Code          | Env var           | Credentials file     | Default                   |
| ----------- | ------------- | ----------------- | -------------------- | ------------------------- |
| key         | `key`         | `SKYWAKE_API_KEY` | from `skywake login` | none                      |
| URL         | `url`         | `SKYWAKE_URL`     | per profile          | `https://api.skywake.dev` |
| environment | `environment` | `SKYWAKE_ENV`     | per profile          | the key's own             |
| profile     | `profile`     | `SKYWAKE_PROFILE` | none                 | `default`                 |

With no key, the error says to run `skywake login` or set `SKYWAKE_API_KEY`.

The credentials file is `~/.config/skywake/credentials.toml` (on Windows, `%APPDATA%\skywake\credentials.toml`), readable only by you. It has one table for each profile:

```toml
[default]
key = "sw_..."

[local]
key = "sw_..."
url = "http://localhost:8080"
environment = "dev"
```

A self-hosted server is a profile with its own `url`. Sign in to it with `skywake login --profile local --url http://localhost:8080`, then pass `--profile local` or set `SKYWAKE_PROFILE=local`.

## The MCP server [#the-mcp-server]

```bash norun
skywake mcp
```

[`skywake mcp`](/reference/cli/mcp) runs the MCP server for agents. It runs on Node, so it works anywhere `npx skywake mcp` does, and `uvx skywake mcp` starts the same server from the Python package. It reads the settings above, plus `SKYWAKE_DISK` and `SKYWAKE_BRANCH` to fix where its file tools work. For example:

```json
{
  "mcpServers": {
    "skywake": {
      "command": "npx",
      "args": ["-y", "skywake", "mcp"],
      "env": { "SKYWAKE_API_KEY": "sw_...", "SKYWAKE_DISK": "app" }
    }
  }
}
```

See [MCP](../agents/mcp.mdx) for its tools.

## The daemon [#the-daemon]

You need `skywaked` only to [mount](../filesystem/mount.mdx) a branch as a folder. It uses FUSE, so it runs on Linux only. Build it from source:

```bash norun
cargo build --release -p skywake-daemon    # target/release/skywaked
```

## Without a server [#without-a-server]

Disk commands can also work straight on a bucket or a folder, with no API. Pass `--local`, or `--local=DIR`, or set `SKYWAKE_STORE`. The store is one disk, so only the branch in `NAME@BRANCH` is used. `fork`, `merge`, `branches`, `log`, `diff`, `destroy NAME@BRANCH`, `upload` and `download` work this way, plus `gc` and `recover`.

| Store                                  | Example                                                     |
| -------------------------------------- | ----------------------------------------------------------- |
| A local folder                         | `.skywake` (the default)                                    |
| An S3 bucket, or any S3 compatible one | `s3://bucket`, or `s3://bucket/folder` for one folder of it |
| A Google Cloud Storage bucket          | `gs://bucket`, or `gs://bucket/folder`                      |
| An Azure Blob Storage container        | `az://container`, or `az://container/folder`                |

Each bucket reads the usual variables of its cloud:

- **S3:** `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`, and `AWS_ENDPOINT` if the bucket is not on AWS, such as Cloudflare R2.
- **Google Cloud Storage:** `GOOGLE_SERVICE_ACCOUNT` (the path to a service account key file), or nothing on a Google Cloud machine with a service account.
- **Azure:** `AZURE_STORAGE_ACCOUNT_NAME` and `AZURE_STORAGE_ACCOUNT_KEY`.

To try a bucket locally, start the bundled object storage server:

```bash norun
docker compose -f docker/dev/compose.yaml up -d
export SKYWAKE_STORE=s3://skywake AWS_ENDPOINT=http://localhost:9100 AWS_ALLOW_HTTP=true \
       AWS_ACCESS_KEY_ID=skywake AWS_SECRET_ACCESS_KEY=skywake-dev AWS_REGION=us-east-1
skywake upload ./project app
```

The bucket must support conditional writes (`If-None-Match` and `If-Match`, or generation checks on Google Cloud Storage), because that is how Skywake keeps two writers from overwriting each other. It checks once, before its first conditional write, and refuses a store that ignores them.

## Next [#next]

<Cards>
  <Card href="./first-branch.mdx" />
  <Card href="/reference/cli" />
  <Card href="/reference/sdk" />
</Cards>