# create-opub-app

> Create OPub app with one command

Latest version **0.1.7** (published 2024-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-opub-app
pnpm add create-opub-app
yarn add create-opub-app
bun add create-opub-app
```

Provides the command `create-opub-app`.

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2024-03-12 |
| First published | 2023-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 514.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | CDL Team |
| Maintainers | civicdatalab |
| Keywords | react, next, next.js, opub, cli, commander |

## Links

- npm: https://www.npmjs.com/package/create-opub-app
- Repository: https://github.com/civicdatalab/opub-mono
- Homepage: https://github.com/civicdatalab/opub-mono#readme
- Issues: https://github.com/civicdatalab/opub-mono/issues
- npm.io page: https://npm.io/package/create-opub-app

## 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.1.7 (latest) — 2024-03-12
- 0.1.6 — 2024-03-08
- 0.1.5 — 2024-03-06
- 0.1.4 — 2024-03-05
- 0.1.3 — 2024-02-07
- 0.1.2 — 2024-02-06
- 0.1.1 — 2024-02-06
- 0.0.9 — 2024-02-02
- 0.0.8 — 2024-02-02
- 0.0.7 — 2023-12-22
- 0.0.6 — 2023-12-22
- 0.0.5 — 2023-09-08
- 0.0.4 — 2023-09-08
- 0.0.3 — 2023-09-08
- 0.0.2 — 2023-09-08
- … 1 more at https://npm.io/package/create-opub-app/versions

## README

# Create OPub App

A CLI tool to create a new OPub app.

## Why

We need a way for anyone to start a new personalized OPub app as fast and easily as possible. They should be able to choose a project name, theme, or a template while starting. A CLI checks those boxes.

## Get Started

```bash
npm create opub-app@latest
```

## Arguments

The CLI takes optinal arguments

```bash
npm create opub-app@latest [package-name] -- [options]

eg: npm create opub-app@latest my-opub-app -- -e d4d -m pnpm
```

### Options

- `-e, --example` - An example to bootstrap the app with. `[d4d | data-exchange]`
- `-m, --manager` - Explicitly tell the CLI to bootstrap the application using specific package manager. `[npm | pnpm | yarn | bun]`
- `--noGit` - Explicitly tell the CLI to not initialize a new git repo in the project
- `--noInstall` - Explicitly tell the CLI to not run the package manager's install command

## Tech Stack

- [commander](https://github.com/tj/commander.js) - backbone of the CLI
- [clack](https://github.com/natemoo-re/clack) - used for interactive prompt
- [got](https://github.com/sindresorhus/got) - HTML request library
- [tar](https://github.com/isaacs/node-tar) - extract tar compressed file
- [@vercel/ncc ](https://github.com/vercel/ncc)- compile Node.js modules into a single file

## Design

The CLI is designed to be as simple as possible. It asks for the project name, options and does some validations. It then fetches the template from the OPub GitHub repository and extracts it to the current working directory.

![OPub CLI Design](./assets/cli-design.png)

## Next Steps

- [x] Test in various environments

  - [x] Windows (WSL2)
  - [x] Linux
  - [x] Mac

- [ ] Add option to choose theme
- [x] Ask for new name if the provided one is not unique
- [x] Add option to select template based on initiative
- [x] Add support for multiple package managers

  - [x] npm
  - [x] yarn
  - [x] pnpm
  - [x] bun

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