Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jesusgraterol/argv-utils

The argv-utils package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from process.argv property.
https://github.com/jesusgraterol/argv-utils

args arguments argv argvs node parser sh shell shell-script utilities utils

Last synced: 22 days ago
JSON representation

The argv-utils package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from process.argv property.

Awesome Lists containing this project

README

        

# argv Utils

The `argv-utils` package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from `process.argv` property.

## Getting Started

Install the package:
```bash
$ npm install -D argv-utils
```

Manage your arguments with ease:
```typescript
$ node my-script.js --one --two="Hello World!" --someValue="false"

// my-script.js
import { argv } from 'node:process';
import { parseArgs } from 'argv-utils';

parseArgs(argv);
// {
// execPath: '/usr/local/bin/node',
// scriptPath: '/path/to/my-script.js',
// one: 'true',
// two: 'Hello World!',
// someValue: 'false',
// }
```


## Built With

- JavaScript / TypeScript


## Running the Tests

```bash
$ npm run test:unit
```


## License

[MIT](https://choosealicense.com/licenses/mit/)


## Acknowledgments

- ...


## @TODOS

- [ ] ...


## Deployment

Install dependencies:
```bash
$ npm install
```

Build the library:
```bash
$ npm start
```

Publish to `npm`:
```bash
$ npm publish
```