# @absa-subatomic/occurrence-cli

> Occurrence Admin CLI

Latest version **0.0.6** (published 2020-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @absa-subatomic/occurrence-cli
pnpm add @absa-subatomic/occurrence-cli
yarn add @absa-subatomic/occurrence-cli
bun add @absa-subatomic/occurrence-cli
```

Provides the command `occurrence`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-01-13 |
| First published | 2019-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 7 |
| Unpacked size | 21.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kieran Bristow |
| Maintainers | absa-subatomic |
| Keywords | oclif |

## Links

- npm: https://www.npmjs.com/package/@absa-subatomic/occurrence-cli
- npm.io page: https://npm.io/package/@absa-subatomic/occurrence-cli

## Dependencies (7)

- [tslib](https://npm.io/package/tslib.md) ^1.10.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [@oclif/config](https://npm.io/package/@oclif/config.md) ^1.13.3
- [npm-cli-login](https://npm.io/package/npm-cli-login.md) ^0.1.1
- [@oclif/command](https://npm.io/package/@oclif/command.md) ^1.5.19
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) ^2.2.1
- [@absa-subatomic/occurrence-utils](https://npm.io/package/@absa-subatomic/occurrence-utils.md) ^0.0.10

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2020-01-13
- 0.0.5 — 2020-01-13
- 0.0.4 — 2020-01-13
- 0.0.3 — 2020-01-13
- 0.0.2 — 2020-01-13
- 0.0.1 — 2019-10-07

## README

occurrence-cli
==============

Occurrence Admin CLI

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/occurrence-cli.svg)](https://npmjs.org/package/occurrence-cli)
[![Downloads/week](https://img.shields.io/npm/dw/occurrence-cli.svg)](https://npmjs.org/package/occurrence-cli)
[![License](https://img.shields.io/npm/l/occurrence-cli.svg)](https://github.com/kbristow/occurrence-cli/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @absa-subatomic/occurrence-cli
$ occurrence COMMAND
running command...
$ occurrence (-v|--version|version)
@absa-subatomic/occurrence-cli/0.0.6 linux-x64 node-v12.14.1
$ occurrence --help [COMMAND]
USAGE
  $ occurrence COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`occurrence create-api-user USERNAME`](#occurrence-create-api-user-username)
* [`occurrence create-domain DOMAINNAME`](#occurrence-create-domain-domainname)
* [`occurrence create-schema DOMAINNAME`](#occurrence-create-schema-domainname)
* [`occurrence grant-user-domain-roles USERNAME DOMAIN ROLES`](#occurrence-grant-user-domain-roles-username-domain-roles)
* [`occurrence help [COMMAND]`](#occurrence-help-command)
* [`occurrence login`](#occurrence-login)
* [`occurrence update-domain-schema OCCURRENCECONFIGDIRECTORY`](#occurrence-update-domain-schema-occurrenceconfigdirectory)

## `occurrence create-api-user USERNAME`

Create an api user

```
USAGE
  $ occurrence create-api-user USERNAME

OPTIONS
  -h, --help                           show CLI help
  -r, --role=(admin|system_read|user)  [default: user] The SystemRole the user should have

EXAMPLE
  $ occurrence create-api-user username
  Api User created
```

## `occurrence create-domain DOMAINNAME`

Create a domain

```
USAGE
  $ occurrence create-domain DOMAINNAME

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ occurrence create-domain myDomain
  Domain created
```

## `occurrence create-schema DOMAINNAME`

Create a schema in a domain

```
USAGE
  $ occurrence create-schema DOMAINNAME

OPTIONS
  -f, --file=file  (required) File containing the GQL schema definition
  -h, --help       show CLI help

EXAMPLE
  $ occurrence create-schema myDomain -f=schema.graphql
  Schema created
```

## `occurrence grant-user-domain-roles USERNAME DOMAIN ROLES`

Grant an api user domain roles

```
USAGE
  $ occurrence grant-user-domain-roles USERNAME DOMAIN ROLES

ARGUMENTS
  USERNAME
  DOMAIN
  ROLES     (publisher|consumer|domain_admin|schema_viewer) The list of roles to grant to the user

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ occurrence grant-user-domain-roles username domain role1 role2
       Roles granted
```

## `occurrence help [COMMAND]`

display help for occurrence

```
USAGE
  $ occurrence help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.1/src/commands/help.ts)_

## `occurrence login`

set the occurrence session

```
USAGE
  $ occurrence login

OPTIONS
  -h, --help         show CLI help
  -t, --token=token  (required)
  -u, --host=host    (required) occurrence gateway host url

EXAMPLE
  $ occurrence login -u=http://localhost:4000/ -t=token
  Session set to http://localhost:4000/
```

## `occurrence update-domain-schema OCCURRENCECONFIGDIRECTORY`

Maintain all schema definitions for a Domain using an Occurrence configuration directory

```
USAGE
  $ occurrence update-domain-schema OCCURRENCECONFIGDIRECTORY

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ occurrence update-domain-schema occurrenceConfigDirectory
```
<!-- commandsstop -->

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