# mocky-cli

> Mock your HTTP responses to test your REST API

Latest version **1.0.0** (published 2020-03-11) · MIT license · 0 weekly downloads

## Install

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

Provides the command `mocky`.

## 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.0 |
| Published | 2020-03-11 |
| First published | 2020-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Aleksandar Stojanoski |
| Maintainers | acestojanoski |
| Keywords | mocky, mockyio, rest, test, api, mock, response, cli |

## Links

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

## Dependencies (2)

- [acejax](https://npm.io/package/acejax.md) ^2.0.1
- [args-flagify](https://npm.io/package/args-flagify.md) ^2.1.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-03-11

## README

# mocky-cli
[![CircleCI](https://circleci.com/gh/acestojanoski/mocky-cli/tree/master.svg?style=svg)](https://circleci.com/gh/acestojanoski/mocky-cli/tree/master)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![install size](https://packagephobia.now.sh/badge?p=mocky-cli)](https://packagephobia.now.sh/result?p=mocky-cli)
[![Downloads](https://img.shields.io/npm/dm/mocky-cli.svg)](https://npmjs.com/mocky-cli)

> Mock your HTTP responses to test your REST API

It is using the [`www.mocky.io` API](https://www.mocky.io/).

## Install
```
$ npm install -g mocky-cli
```

## Usage
```
Usage:
  $ mocky

Options:
  --statusCode, The status code for the response (the default is 200)
  --body, The body for the response (the default is empty string)
  --location, The redirect location (it works if the status code is redirection status code)

Examples:
  $ mocky --statusCode 201 --body "{\"message\": \"CREATED\"}"
  $ mocky --statusCode 302 --location https://github.com/acestojanoski
```

## License

MIT

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