# midrun-cli

> ⚡ Midrun CLI. Creating API doesn't have to be messy.

Latest version **0.0.17** (published 2023-02-12) · MIT license · 0 weekly downloads

## Install

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

Provides the command `midrun`.

## 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.0.17 |
| Published | 2023-02-12 |
| First published | 2023-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 31 |
| Unpacked size | 102.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | mid.run |
| Maintainers | midrun |
| Keywords | Midrun, framework, api, AI, codegen, code generation, cli, fullstack, API tools, API spec |

## Links

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

## Dependencies (31)

- [npm](https://npm.io/package/npm.md) ^9.4.2
- [meow](https://npm.io/package/meow.md) ^4.0.0
- [open](https://npm.io/package/open.md) ^8.4.0
- [axios](https://npm.io/package/axios.md) ^1.2.3
- [boxen](https://npm.io/package/boxen.md) ^5.1.2
- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [execa](https://npm.io/package/execa.md) ^5.1.1
- [json5](https://npm.io/package/json5.md) ^2.2.3
- [ngrok](https://npm.io/package/ngrok.md) ^4.3.3
- [yargs](https://npm.io/package/yargs.md) ^16.1.1
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [figlet](https://npm.io/package/figlet.md) ^1.5.2
- [keytar](https://npm.io/package/keytar.md) ^7.9.0
- [install](https://npm.io/package/install.md) ^0.13.0
- [node-fs](https://npm.io/package/node-fs.md) ^0.1.7
- [nodemon](https://npm.io/package/nodemon.md) ^2.0.20
- [slugify](https://npm.io/package/slugify.md) ^1.6.5
- [archiver](https://npm.io/package/archiver.md) ^5.3.1
- [enquirer](https://npm.io/package/enquirer.md) ^2.3.6
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.5
- [pino-http](https://npm.io/package/pino-http.md) ^8.3.1
- [socket.io](https://npm.io/package/socket.io.md) ^2.3.0
- [chalk-pipe](https://npm.io/package/chalk-pipe.md) ^6.0.0
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.10
- [cli-spinners](https://npm.io/package/cli-spinners.md) ^2.7.0
- [queryencoder](https://npm.io/package/queryencoder.md) ^1.1.2
- [zip-a-folder](https://npm.io/package/zip-a-folder.md) ^1.1.5
- [readline-sync](https://npm.io/package/readline-sync.md) ^1.4.10
- [update-notifier](https://npm.io/package/update-notifier.md) ^5.1.0
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^2.3.1
- [random-animal-name](https://npm.io/package/random-animal-name.md) ^0.1.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.17 (latest) — 2023-02-12
- 0.0.16 — 2023-02-11
- 0.0.15 — 2023-02-11
- 0.0.14 — 2023-02-10
- 0.0.13 — 2023-02-06
- 0.0.12 — 2023-02-06
- 0.0.10 — 2023-02-05
- 0.0.9 — 2023-02-02
- 0.0.8 — 2023-02-02
- 0.0.7 — 2023-02-02
- 0.0.5 — 2023-01-23
- 0.0.4 — 2023-01-22
- 0.0.3 — 2023-01-22
- 0.0.2 — 2023-01-22
- 0.0.1 — 2023-01-22

## README

<p align="center">
  <img src="images/screen.png"  >
 </p>
 <p align="center">
 
 </p>
 <br>
<p align="center">A Sample CLI tool manage Midrun APIs.</p>
<br>


```
npm i -g midrun-cli
```


View documentation for details: https://mid.run/



<p align="center">
<!--   
<img src="images/demo.gif" alt="demonstration" height="500" width="800" >  -->
</p>


---

## Usage

```
~$ midrun --help
              _       _
  _ __ ___   (_)   __| |      _ __   _   _   _ __
 | '_ ` _ \  | |  / _` |     | '__| | | | | | '_ \
 | | | | | | | | | (_| |  _  | |    | |_| | | | | |
 |_| |_| |_| |_|  \__,_| (_) |_|     \__,_| |_| |_|


Usage: midrun -id <projectId>  --client
┌──────────────────────────────────────┐
│                                      │
│                                      │
│   Initialize a Midrun API client,    │
│   keep its spec up to date.          │
│                                      │
│   mid.run/docs                       │
│                                      │
└──────────────────────────────────────┘


Options:
      --version  Show version number                                   [boolean]
      --id       Your Midrun project ID                      [string] [required]
  -s, --subset   Hide some methods in this client, only selected methods (useful
                 for public APIs)                                       [string]
      --output   Path and filename where API settings will be saved     [string]
      --client   Exclude server properties from spec                   [boolean]
      --server   Exclude client properties from spec                   [boolean]
      --prod     Exclude debugging props like colors and descriptions  [boolean]
      --help     Show help                                             [boolean]
```



<br>

# Installation

See <a href="mid.run">mid.run/docs</a> for the full documentation.

Run ```npm i -g midrun-cli  ``` to install the CLI globally.

Alternatively, Run ```npm i -D midrun-cli ``` to install it as a dev dependency.
You can then invoke the library from ```packages.json``` scripts. ex:
 

```
  "scripts": {
    "start": "node index.js",
    "midrun": "midrun --id myApp",
    "dev": "npm run && midrun"
```
This will automatically update your your API spec on server start.



# Potential issues with global installs

> :warning: **This might cause an error** which can be resolved easily by using ```sudo``` with the command, **however**, using ```sudo``` with ```npm``` is **not recommended** because it might cause permission issues later. So instead put the code below in your .bashrc file and then run the above command again.
```
npm set prefix ~/.npm
PATH="$HOME/.npm/bin:$PATH"
PATH="./node_modules/.bin:$PATH"
```
 

Type ```midrun``` or ```midrun --help``` to get started.

<br>

## License

MIT © ***mid.run***

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