# @http2/live

> Http2live command line interface

Latest version **2.2.3** (published 2018-04-10) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @http2/live
pnpm add @http2/live
yarn add @http2/live
bun add @http2/live
```

Provides the command `http2live`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.2.3 |
| Published | 2018-04-10 |
| First published | 2017-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 29 |
| Unpacked size | 30.5 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Sebastiaan Deckers |
| Maintainers | seb |
| Keywords | http2, http/2, http 2, deploy |

## Links

- npm: https://www.npmjs.com/package/@http2/live
- Repository: https://gitlab.com/http2/live
- Homepage: https://gitlab.com/http2/live#README
- Issues: https://gitlab.com/http2/live/issues
- npm.io page: https://npm.io/package/@http2/live

## Dependencies (29)

- [ora](https://npm.io/package/ora.md) ^2.0.0
- [flat](https://npm.io/package/flat.md) ^4.0.0
- [chalk](https://npm.io/package/chalk.md) ^2.3.2
- [listr](https://npm.io/package/listr.md) ^0.13.0
- [yargs](https://npm.io/package/yargs.md) ^11.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [inquirer](https://npm.io/package/inquirer.md) ^5.2.0
- [punycode](https://npm.io/package/punycode.md) ^2.1.0
- [form-data](https://npm.io/package/form-data.md) ^2.3.2
- [user-home](https://npm.io/package/user-home.md) ^2.0.0
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.1.2
- [http-errors](https://npm.io/package/http-errors.md) ^1.6.3
- [lodash.omit](https://npm.io/package/lodash.omit.md) ^4.5.0
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) ^3.0.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.2.1
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.1
- [lodash.unset](https://npm.io/package/lodash.unset.md) ^4.5.2
- [pretty-bytes](https://npm.io/package/pretty-bytes.md) ^4.0.2
- [project-name](https://npm.io/package/project-name.md) ^0.2.6
- [hard-rejection](https://npm.io/package/hard-rejection.md) ^1.0.0
- [zen-observable](https://npm.io/package/zen-observable.md) ^0.8.8
- [hosted-git-info](https://npm.io/package/hosted-git-info.md) ^2.6.0
- [lodash.throttle](https://npm.io/package/lodash.throttle.md) ^4.1.1
- [update-notifier](https://npm.io/package/update-notifier.md) ^2.4.0
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.2.2
- [graceful-fs-stream](https://npm.io/package/graceful-fs-stream.md) 0.0.1
- [human-readable-ids](https://npm.io/package/human-readable-ids.md) ^1.0.3
- [inquirer-directory](https://npm.io/package/inquirer-directory.md) ^2.1.0

## Recent versions

- 2.2.3 (latest) — 2018-04-10
- 2.2.2 — 2018-04-09
- 2.2.1 — 2018-04-09
- 2.1.0 — 2018-04-06
- 2.0.0 — 2018-04-05
- 1.3.6 — 2018-01-17
- 1.3.5 — 2018-01-16
- 1.3.4 — 2018-01-16
- 1.3.3 — 2018-01-11
- 1.3.2 — 2017-12-09
- 1.3.1 — 2017-11-07
- 1.3.0 — 2017-11-02
- 1.2.2 — 2017-10-22
- 1.2.1 — 2017-10-20
- 1.2.0 — 2017-10-20
- … 3 more at https://npm.io/package/@http2/live/versions

## README

# @http2/live 🐿

Command line interface for the Http2live service.

## Installation

### Global Installation

Registers the command in the system PATH. Convenient for command line use.

```
npm install --global @http2/live
```

## Local Installation

Adds the package to the `package.json` `devDependencies`. Useful when deploying using [`npm scripts`](https://docs.npmjs.com/misc/scripts). Avoids conflicts between multiple projects using incompatible versions of the command.

```
npm install --development @http2/live
```

## Usage

Run `http2live` if you globally installed. Run `./node_modules/.bin/http2live` if you locally installed.

### Create an account

```
$ http2live signup

? Email address: johnw@example.net
? Username: babayaga
? Password: ***************
 ✔ Registering account
 ✔ Creating new authentication token
 ✔ Saving credentials
```

### Use an existing account

```
$ http2live login

? Username or email address: babayaga
? Password: [hidden]
 ✔ Authenticating
 ✔ Saving token
```

### Deploy a static web site

```
$ http2live deploy --domain example.net --root ./ --confirm

To cancel, press Ctrl+C.

Deploying:

   Directory:  /Users/johnw/blog/public
   File count: 14
   Total size: 24 kB
   Options:    default
   URL:        https://example.net

 ✔ Uploading

Deployment successful!
```

## Commands

### Command: `signup`

Alias: `register`

Register a new account.

#### `--username "someone@example.com"`

Email or username for the account.

Optional. If supplied the prompt for this value will be skipped.

#### `--password "secret"`

Secret password key for the account.

Optional. If supplied the prompt for this value will be skipped.

### Command: `login`

Alias: `signin`

Authenticates the account credentials. Only one account is signed-in at a time.

#### `--email "someone@example.com"`

Email for the account.

If supplied as an option, the prompt for this value will be skipped.

#### `--username "janedoe"`

Username for the account.

If supplied as an option, the prompt for this value will be skipped.

#### `--password "secret"`

Secret password key for the account.

If supplied as an option, the prompt for this value will be skipped.

### Command: `logout`

Alias: `signout`

Clears the access token. Does not affect published sites.

### Command: `whoami`

Display currently authenticated username or email.

### Command: `deploy`

Aliases: `publish`, `serve`, `sync`, `upload`

Transfer static files and configuration options to the service.

#### `--domain "example.com"`

Domain name for the site.

If the domain is not specified as a command line option, the `./CNAME` file is checked for a valid domain. This is a text file that has a domain name as its first line.

If not specified, and no `CNAME` file can be loaded, an interactive prompt will suggest a few random domains or allow entry of a custom domain name. Make sure the DNS records for any custom domain are set up correctly. The suggested random domains are automatically configured. Upon successful deployment the domain name is saved in the `CNAME` file.

#### `--options "options.json"`

Path to a valid [`@http2/configuration`](https://gitlab.com/http2/configuration) options file containing either a server configuration or just a single host. If a server configuration contains multiple hosts, the host with matching domain is used, otherwise the first host is used.

Can be JSON or a JavaScript file that exports a configuration object.

#### `--root "./some/path"`

Path to a directory containing static files to upload.

#### `--confirm`

Skip the manual deployment confirmation.

### Command: `list`

Aliases: `ls`, `ll`, `la`, `l`

Display a list of all sites owned by the currently authenticated user.

### Command: `config [get|set|delete|reset]`

Aliases: `configure`, `configuration`, `setting`, `settings`, `option`, `options`

Edit the user settings.

Specify the setting name and value as `--my.setting.name "my setting value"`. Dot-notation is used for nested property names.

Multiple settings may be configured in sequence. `--foo=bar --lol=true`.

Settings can be removed by specifying the `delete` subdommand.

The entire settings file is cleared using the `reset` subcommand.

#### Example Configuration

```js
{
  // See the `login` command
  username: 'babayega',
  access_token: 'eyJ0eX...',
  // Base URL of the CDN API
  api: {
    origin: 'https://api.http2.live:8888'
  },
  // Auth0 tenant settings
  auth0: {
    client_id: 'WX1Kgy0NWL069OaiaCJLQE3OL0gqzq2e',
    domain = 'https://http2.au.auth0.com',
    database = 'Username-Password-Authentication',
    audience = 'https://http2.live/',
    scope = 'openid deploy'
  }
}
```

## See Also

- [@http2/api](https://gitlab.com/http2/api)
- [@http2/server](https://gitlab.com/http2/server)
- [@http2/configuration](https://gitlab.com/http2/configuration)

## Colophon

Made with ❤️ by Sebastiaan Deckers in 🇸🇬 Singapore.

---
_Source: https://npm.io/package/@http2/live · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
