# The CLI

> Running it with npx, signing in, and deploying from CI.

Source: https://storeware.ai/docs/cli

> **Early access.** The CLI and the SDK are not on npm yet, so the commands below do not run for everyone. To build an app now, write to https://storeware.ai/contact.

Run the CLI with npx, from your app's directory. npx fetches it the first time, so there is nothing to install.

```bash
npx @storeware/cli <command>
```

Every command, with its arguments, flags and examples, is in the [command reference](https://storeware.ai/docs/cli/commands). Your terminal has the same: `npx @storeware/cli help` lists the commands, and `--help` after any command shows its page.

## Signing in

```bash
npx @storeware/cli login
```

It shows a code and opens the admin in your browser. Approve the code there, where you are already signed in, and pick the organisation. The sign-in lasts until you log out.

`logout` ends the sign-in, on the server as well as here. `whoami` shows who you are, in which organisation, and your apps.

## In CI

Make a CI token on the Developer page, for one app. It deploys that app and reads its releases, and nothing else: it reaches no store and cannot make another token. Set it as `STOREWARE_CLI_TOKEN` and deploy:

```bash
STOREWARE_CLI_TOKEN=swdk_... npx @storeware/cli app deploy
```

A CI token carries the authority of the person who made it, checked on every call, so it ends when they leave the organisation.
