# cli-creator

> An npm with functions to create terminals with options and other functions of their own.

Latest version **1.0.6** (published 2021-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install cli-creator
pnpm add cli-creator
yarn add cli-creator
bun add cli-creator
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-10-29 |
| First published | 2021-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 7Silva |
| Maintainers | 7silva |
| Keywords | terminal, console, user, username, path, cls, clear |

## Links

- npm: https://www.npmjs.com/package/cli-creator
- Repository: https://github.com/7Silva/cli-creator
- Homepage: https://github.com/7Silva/cli-creator#readme
- Issues: https://github.com/7Silva/cli-creator/issues
- npm.io page: https://npm.io/package/cli-creator

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.6 (latest) — 2021-10-29
- 1.0.5 — 2021-10-29
- 1.0.4 — 2021-10-29
- 1.0.3 — 2021-10-29
- 1.0.2 — 2021-10-26
- 1.0.1 — 2021-10-26
- 1.0.0 — 2021-10-26

## README

<div align='start'>
  <h1>CLI Creator</h1><p>An npm with functions to create terminals with options and other functions of their own.</p>
</div>

## Installation

```npm
npm i cli_creator
```

## Functions Interface:
| Name | Params | Function |
| ---- | ------ | ------|
| `interface` | `(op)` | `Create an interface with questions` |
| `user` | `()` | `Returns the computer's username` |
| `pathh` | `(1)` | `Return current directory or nodejs application` |

## Others Functions:
| Name | Params | Function |
| ---- | ------ | ------|
| `cls` | `()` | `Clean console/terminals` |
| `title` | `('title here')` | `Set title on console` |
| `basic` | `('user') or ('sys')` | `Returns basic information` |

# Examples:

## Interface

```js
const { interface } = require('cli-creator');

interface('Type your name', (name) => {
    if (!name) {
      console.log('Please enter a name!');
      process.exit();
    } else return console.log(`Your name is: ${name}`);
});

// node . 
// Please enter a name: Silva // Output: Your name is: Silva
```

## User

```js
const { user } = require('cli-creator');

console.log(user()); // Output: Silva
```

## Pathh

```js
const { pathh } = require('cli-creator');

console.log(pathh(1)); // Here you can set other values to get. (0)

// node.
// Output: C:\Users\Silva\Documents\Nodejs\Npm\cli-creator\test
```

Exemple 2

```js
const { interface, pathh } = require('cli-creator');

path = pathh();

interface(`${path}> `, (op) => {
    if (!op) {
      console.log('Please enter a option!');
      process.exit();
    } else {
      // Your code
    }
});

// node . 
// C:\Users\Silva\Documents\Nodejs\Npm\cli-creator\test> 
// Output: Please enter a option!
```

## Others

```js
const { cls, title, basic } = require('cli-creator');

cls();
title('CLI-CREATOR');

console.log(basic('sys')) 

/* Output: 
x64 // Arch
win32 // Platform
7SILVA // Computername
Windows_NT // System (os)
*/
```

## License
CLI Creator is released under [the MIT License](LICENSE). Check [LICENSE](LICENSE) file for more information.

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