# @pageshare/cli

> This package provides commands to publish local frontend web app into [PageShare.dev](https://www.pageshare.dev).

Latest version **1.0.1** (published 2022-01-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @pageshare/cli
pnpm add @pageshare/cli
yarn add @pageshare/cli
bun add @pageshare/cli
```

Provides the commands `cli`, `pageshare`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-01-03 |
| First published | 2021-12-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| >=14.13.1 |
| Dependencies | 38 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | PageShare |
| Maintainers | kryskruk |

## Links

- npm: https://www.npmjs.com/package/@pageshare/cli
- Repository: https://github.com/PageShare/pageshare
- Homepage: https://github.com/PageShare/pageshare#readme
- Issues: https://github.com/PageShare/pageshare/issues
- npm.io page: https://npm.io/package/@pageshare/cli

## Dependencies (38)

- [url](https://npm.io/package/url.md) ^0.11.0
- [util](https://npm.io/package/util.md) ^0.12.4
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [assert](https://npm.io/package/assert.md) ^2.0.0
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [events](https://npm.io/package/events.md) ^3.3.0
- [esbuild](https://npm.io/package/esbuild.md) ^0.14.0
- [process](https://npm.io/package/process.md) ^0.11.10
- [webpack](https://npm.io/package/webpack.md) ^5.64.4
- [punycode](https://npm.io/package/punycode.md) ^2.1.1
- [commander](https://npm.io/package/commander.md) ^8.2.0
- [clipboardy](https://npm.io/package/clipboardy.md) ^3.0.0
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.33
- [node-fetch](https://npm.io/package/node-fetch.md) ^3.0.0
- [@types/node](https://npm.io/package/@types/node.md) ^15.14.1
- [stream-http](https://npm.io/package/stream-http.md) ^3.2.0
- [git-url-parse](https://npm.io/package/git-url-parse.md) ^11.6.0
- [os-browserify](https://npm.io/package/os-browserify.md) ^0.3.0
- [vm-browserify](https://npm.io/package/vm-browserify.md) ^1.1.2
- [browser-stdout](https://npm.io/package/browser-stdout.md) ^1.3.1
- [domain-browser](https://npm.io/package/domain-browser.md) ^4.22.0
- [esbuild-loader](https://npm.io/package/esbuild-loader.md) ^2.16.0
- [string_decoder](https://npm.io/package/string_decoder.md) ^1.3.0
- [tty-browserify](https://npm.io/package/tty-browserify.md) ^0.0.1
- [browserify-zlib](https://npm.io/package/browserify-zlib.md) ^0.2.0
- [path-browserify](https://npm.io/package/path-browserify.md) ^1.0.1
- [querystring-es3](https://npm.io/package/querystring-es3.md) ^0.2.1
- [@types/form-data](https://npm.io/package/@types/form-data.md) ^2.5.0
- [https-browserify](https://npm.io/package/https-browserify.md) ^1.0.0
- [node-html-parser](https://npm.io/package/node-html-parser.md) ^5.0.0
- [@types/mime-types](https://npm.io/package/@types/mime-types.md) ^2.1.1
- [crypto-browserify](https://npm.io/package/crypto-browserify.md) ^3.12.0
- [stream-browserify](https://npm.io/package/stream-browserify.md) ^3.0.0
- [timers-browserify](https://npm.io/package/timers-browserify.md) ^2.0.12
- [console-browserify](https://npm.io/package/console-browserify.md) ^1.2.0
- [playwright-chromium](https://npm.io/package/playwright-chromium.md) ^1.15.2
- [constants-browserify](https://npm.io/package/constants-browserify.md) ^1.0.0
- [browser-process-hrtime](https://npm.io/package/browser-process-hrtime.md) ^1.0.0

## Recent versions

- 1.0.1 (latest) — 2022-01-03
- 1.0.0 — 2022-01-03
- 0.0.2 — 2022-01-03
- 0.0.1 — 2021-12-27
- 0.0.0 — 2021-12-04

## README

# @pageshare/cli

This package provides commands to publish local frontend web app into [PageShare.dev](https://www.pageshare.dev).

## How to use

Build your frontend web app and execute:

```
npx @pageshare/cli ./dist
```

or

```
npm install -g @pageshare/cli
pageshare ./dist
```

Replace `./dist` with a path to your built frontend project (must include `index.html` file).

In order to finish the process, you need to create an account on [PageShare.dev](https://www.pageshare.dev) and provide your personal access token in a command as `--access-token ...` or as an environment variable `PAGESHARE_ACCESS_TOKEN`. Copy your access token from https://www.pageshare.dev/user/settings.

### Parameters

- `--version` - prints script version
- `--access-token` - your personal access token copied from https://www.pageshare.dev/user/settings; can be also stored as an environment variable `PAGESHARE_ACCESS_TOKEN`
- `--dry` - opens a browser and doesn't upload the page; useful for testing configuration
- `--verbose` - turns on verbose logging
- `--ci` - alias for `--verbose`
- `--config` - path to the config file; `pageshare.config.(ts|cjs|js)` by default; see https://github.com/PageShare/pageshare/blob/master/packages/cli/src/types.ts for documentation
- `--mock-server` - path to the node mock-server directory or index file; learn more reading https://www.pageshare.dev/blog/how-to-use-mock-server
- `--git-remote-url` - URL to your git remote as it shows in `git remote -v`, needed for integrations; by default it uses git from local directory
- `--git-commit` - hash of the latest git commit, needed for integrations; by default it uses git from local directory
- `--force` - continue process by ignoring warnings

## Integration with GitHub

Install GitHub app on https://github.com/apps/pageshare/installations/new.

Each publish will create a commit status and Pull Request comment.

## Use with GitHub actions

We provide custom GitHub action at https://github.com/PageShare/gh-action-publish.

## Use in CI/CD

This package requires additional system dependencies to run Chromium browser.

Check [our Dockerfile](https://github.com/PageShare/pageshare/blob/master/packages/cli/Dockerfile) or use it directly from [docker hub](https://hub.docker.com/r/pageshare/cli) (recommended):

```
docker run --rm -v "$(pwd)/dist:/usr/share/pageshare/dist" pageshare/cli /usr/share/pageshare/dist
```

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