# unrev

> Unrevealed

Latest version **0.3.4** (published 2023-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install unrev
pnpm add unrev
yarn add unrev
bun add unrev
```

Provides the command `unrev`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2023-12-01 |
| First published | 2023-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Unrevealed |
| Maintainers | tgroutars |

## Links

- npm: https://www.npmjs.com/package/unrev
- Repository: https://github.com/unrevealedtech/unrevealed
- Homepage: https://github.com/unrevealedtech/unrevealed#readme
- Issues: https://github.com/unrevealedtech/unrevealed/issues
- npm.io page: https://npm.io/package/unrev

## Dependencies (8)

- [zod](https://npm.io/package/zod.md) ^3.20.6
- [open](https://npm.io/package/open.md) ^8.4.0
- [graphql](https://npm.io/package/graphql.md) ^16.6.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.0
- [appdirsjs](https://npm.io/package/appdirsjs.md) ^1.2.7
- [commander](https://npm.io/package/commander.md) ^10.0.0
- [graphql-request](https://npm.io/package/graphql-request.md) ^5.1.0
- [zod-validation-error](https://npm.io/package/zod-validation-error.md) ^0.3.2

## Recent versions

- 0.3.4 (latest) — 2023-12-01
- 0.3.1-rc.2 (canary) — 2023-07-14
- 0.3.3 — 2023-11-23
- 0.3.2 — 2023-11-23
- 0.3.1 — 2023-10-18
- 0.3.1-rc.1 — 2023-07-14
- 0.3.0 — 2023-06-28
- 0.3.0-rc.3 — 2023-06-28
- 0.3.0-rc.2 — 2023-06-28
- 0.3.0-rc.1 — 2023-06-28
- 0.2.3 — 2023-05-15
- 0.2.2 — 2023-05-08
- 0.2.1 — 2023-05-08
- 0.2.0 — 2023-05-06
- 0.2.0-rc.1 — 2023-05-06
- … 19 more at https://npm.io/package/unrev/versions

## README

# Unrevealed CLI

The Unrevealed CLI is a code generation tool designed to simplify the integration of [Unrevealed](https://unrevealed.tech) into your codebase. Using the CLI will allow you to automaticaly type the SDKs. This has multiple benefits:

- **Autocomplete:** Don't open Unrevealed every time you need to know the key of a feature
- **Validation:** Never make typos anymore, or forget to pass the right attributes of your users and teams
- **Maintenance:** Easily clean up your features by archiving them on Unrevealed then running the CLI to remove them from your codebase

![Feature autocomplete example](resources/autocomplete-example.gif)

## Getting started

Install the CLI. We recommend adding is as a `devDependency` of your project. If you have a monorepo, we also recommend installing it at the root if you're using it in multiple applications.

```bash
npm install -D unrev
```

## Usage

1. Login to Unrevealed

```bash
unrev login
```

2. Initialize your config

```bash
unrev init
```

This will ask you a few questions and generate `unrevealed.config.json` at the root of your project.

3. Generate

```bash
unrev generate
```

This command will generate types for the target SDKs, based on `unrevealed.config.json`

## `unrevealed.config.json`

The unrevealed config file is used by the CLI and the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=unrevealed.unrevealed-vscode) to generate code and give you context about your features. Here's an example of config file:

```json
{
  "productId": "YOUR_PRODUCT_ID",
  "generates": {
    "apps/webapp/src/generated/unrevealed.ts": {
      "sdk": "react"
    },
    "apps/api/src/generated/unrevealed.ts": {
      "sdk": "node"
    }
  }
}
```

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