# as-command

> Command line arguments parser for AssemblyScript

Latest version **0.1.0** (published 2023-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install as-command
pnpm add as-command
yarn add as-command
bun add as-command
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-09-15 |
| First published | 2023-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Emmanuel Vodor |
| Maintainers | ubermanu |
| Keywords | assemblyscript, assemblyscript-library, command-line, cli, arguments, parser |

## Links

- npm: https://www.npmjs.com/package/as-command
- Repository: https://github.com/ubermanu/as-command
- Homepage: https://github.com/ubermanu/as-command#readme
- Issues: https://github.com/ubermanu/as-command/issues
- npm.io page: https://npm.io/package/as-command

## 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.0 (latest) — 2023-09-15

## README

# as-command

A command line arguments parser for [AssemblyScript](https://www.assemblyscript.org/).

## Installation

```sh
npm install as-command --save
```

## Usage

```ts
import command from 'as-command'

const program = command
  .name('pizza-cli')
  .version('4.1.79')
  .description('Order your pizza')
  .option('-c, --cheese', 'Add the specified type of cheese [marble]', [
    'marble',
  ])
  .option('-p, --peppers', 'Add peppers')
  .option('-t, --tomatoes', 'Add tomatoes')
  .action((args) => {
    console.log(`Preparing pizza with:`)

    if (args.has('cheese')) {
      console.log(`+ cheese: ${args.get('cheese').join(', ')}`)
    }
    if (args.has('peppers')) {
      console.log('+ peppers')
    }
    if (args.has('tomatoes')) {
      console.log('+ tomatoes')
    }
  })

program.parse(process.argv)
```

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