---
title: "Install and log in"
url: https://services.dev/docs/cli/install
---
# Install and log in

URL: https://services.dev/docs/cli/install

> Run services.dev with npx, or install it once on your PATH. On localhost there's nothing to log in to, because dev prints a test key and every call uses it.

You need Node 22.18 or later, and nothing else: no account, no key and no network on localhost.

## Run it with npx

npx runs the package without installing anything:

```txt
magic values: none

$ npx services.dev --version
0.3.0
```

`init` adds `services.dev` to your folder's `devDependencies`. After `npm install`, `npx services.dev` runs that pinned version, on your machine and in CI alike.

## Install it globally

To type `services.dev` without npx, install it once:

```txt
$ npm install --global services.dev
$ services.dev --version
0.3.0
```

Every command on these pages works either way.

## The key each call sends

`dev` prints a test key, and a call that sends no key uses it:

```txt
$ npx services.dev
lingua · AI delivers every job.
  key     sk_test_7Hq2 · a call with no key uses it, on localhost only
```

Set `SERVICES_DEV_KEY` and every call sends it as `Authorization: Bearer`. The CLI then reads a job the way that key does, with the buyer's view and no owner's record or ledger. A key that isn't your brand's is refused, and the exit code says so:

```txt
magic values: none

$ SERVICES_DEV_KEY=sk_test_7Hq2 npx services.dev get job_7Hq2
job_7Hq2 · waiting · on signature · $89.00 held
$ echo $?
0

$ SERVICES_DEV_KEY=sk_live_51Hq2 npx services.dev get job_7Hq2
sk_live_51Hq… isn't one of lingua's keys. On localhost the key is sk_test_7Hq2.
  docs    http://localhost:8787/docs/errors/key_invalid
$ echo $?
4
```

Exit code 4 is `authentication`. Every code is in [In CI](https://services.dev/docs/cli/ci.md#exit-codes).

`SERVICES_DEV_KEY` says who is calling. The `--key` a command takes is something else: an idempotency key, so the same order sent twice makes one job.

## Log in, and keys for CI

- `services.dev login` signs you in from your browser, so the CLI can deploy your brand and read its live jobs.
- `services.dev keys` makes your brand's test and live keys. A CI job sets one as `SERVICES_DEV_KEY` from its secrets, and every command in it calls your deployed brand as that key.

A CI job that only checks needs no key at all: it runs `check`, and serves `dev` on localhost for anything that calls the brand.

## Next

- [In CI](https://services.dev/docs/cli/ci.md): run `check` on every push.
- [Listening locally](https://services.dev/docs/cli/listen.md): watch your brand's events as they happen.

---

- Up: [The CLIs](https://services.dev/docs/cli.md)
- Previous: [The CLIs](https://services.dev/docs/cli.md)
- Next: [In CI](https://services.dev/docs/cli/ci.md)
