# linxcommerce-cli

> This is a Linx Commerce development tool set.

Latest version **0.1.0** (published 2021-06-14) · ISC license · 0 weekly downloads

## Install

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

Provides the command `lccli`.

## 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.1.0 |
| Published | 2021-06-14 |
| First published | 2021-06-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 18.6 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Giovanni Mansueto |
| Maintainers | giovanni-linxcommerce |

## Links

- npm: https://www.npmjs.com/package/linxcommerce-cli
- npm.io page: https://npm.io/package/linxcommerce-cli

## Dependencies (16)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [open](https://npm.io/package/open.md) ^8.2.0
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [express](https://npm.io/package/express.md) ^4.17.1
- [dot-prop](https://npm.io/package/dot-prop.md) ^6.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^8.1.0
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.6
- [commander](https://npm.io/package/commander.md) ^5.1.0
- [configstore](https://npm.io/package/configstore.md) ^6.0.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.2.6
- [xdg-basedir](https://npm.io/package/xdg-basedir.md) ^5.0.1
- [unique-string](https://npm.io/package/unique-string.md) ^3.0.0
- [write-file-atomic](https://npm.io/package/write-file-atomic.md) ^3.0.3

## Recent versions

- 0.1.0 (latest) — 2021-06-14

## README

# Node CLI Boilerplate

This is a boilerplate for creating cli applications using node.

## 1. Adapting to your Application:
> Find and rename all the `lccli` occurances to whatever your application name is. Ex: `shiny-cli-app`

## 2. Development Commands

```bash
# To link the cli app, start the watch and rebuild process.
$> npm run start

# to just build the cli app:
$> npm run build
$> npm run clean:build

# This will build and link the cli app into your machine.
$> npm run setup

# use this to remove the cli app from your machine.
$> npm run remove

# see all available commands
$> npm run
```

## 3. Running the CLI app.
Once you start the watch and rebuild process, you should be able to run the cli app from the command line like so:

```bash
# Running the cli app
$> lccli disguise "Captian America"
```


## 3.1 Code Setup

- All the commands go in the `/src/commands` folder. Ex: `lccli.js`
- Each root level command needs to be configured in the `package.json` folder.
- The sub-commands need to be present in the same level as the main command. Ex: `lccli-disguise.js`
- If you have more than one root level command, then consider putting them in their own folders.
- The commands need to have `#!/usr/bin/env node` as the first line in the file.
- The commands need to be executable. `chmod +x ./src/commands/lccli/lccli.js`

### 3.2 What is the `./lib` directory?
> NOTE: As of boilerplate v2, this lib folder is excluded from git.
The code in the `./src` folder gets compiled down into the `./lib` directory.

> Do not manually change anything in the `./lib` directory.


### 3.3 Project structure for Single Root level command
```
  /src
      /helpers
      /commands
          | - lccli.js
          | - lccli-program.js
          | - lccli-disguise.js
```
In `package.json` we would setup the entry points like so:
```
  "bin": {
    "lccli": "./lib/commands/lccli.js"
  }
```

### 3.4 Project structure for Multiple Root level command
```
  /src
      /helpers
      /commands
          /lccli
              | - lccli.js
              | - lccli-program.js
              | - lccli-disguise.js
          /thor
              | - thor.js
              | - thor-hammer.js
              | - thor-hair.js
```
In `package.json` we would setup the entry points like so:
```
  "bin": {
    "lccli": "./lib/commands/lccli/lccli.js",
    "thor": "./lib/commands/thor/thor.js"
  }
```

### 3.5 Using the commands
``` bash
# once you run the: npm run start you should have the
# commands liked up and ready to be used like so:
$> lccli disguise "Thor"
$> thor hammer "smash"
```

### 3.6 Documentation for the libraries used:
Check the `package.json` file for exact versions for packages used.

- commander: https://github.com/tj/commander.js
- lodash: https://lodash.com/docs/4.17.10
- Other interesting CLI packages:
    - Check the **Command-line apps** section here: https://github.com/sindresorhus/awesome-nodejs#command-line-apps

## 4. FAQ

### 4.1 The link process fails.
It is probably due to the `./lib` folder not containing the file that you are trying to link. Run the `build` process first. (See **Commands** Section above).

### 4.2 The link process fails after I changed my `bin` configuration in `package.json`
This is probably due to the old link remaining on your machine.
You can revert your `bin` config in `package.json` and run `npm unlink`. This should remove the old link.

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