# newton-cli

> A CLI for the Newton API

Latest version **0.1.1** (published 2017-04-08) · MIT license · 0 weekly downloads

## Install

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

Provides the command `newton`.

## 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.1 |
| Published | 2017-04-08 |
| First published | 2017-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hafiz |
| Maintainers | ahafiz |

## Links

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

## Dependencies (2)

- [ora](https://npm.io/package/ora.md) ^1.2.0
- [commander](https://npm.io/package/commander.md) ^2.9.0

## Recent versions

- 0.1.1 (latest) — 2017-04-08
- 0.1.0 — 2017-04-08
- 0.0.3 — 2017-04-08
- 0.0.2 — 2017-04-08
- 0.0.1 — 2017-04-08

## README

# Newton-CLI
A CLI of the [awesome Newton API](https://github.com/aunyks/newton-api).

*to-do: clean up dependencies*

## Installation
``` bash
$ npm i -g newton-cli
```

## Usage
Using newton is simple - all you need is an operation and an expression
``` bash
$ newton -o derive x^2
  2x
```
![newton](./newton.gif)

```   
Usage: newton <operation> <expression>

Options:

  -h, --help                   output usage information
  -V, --version                output the version number
  -o, --operation <operation>  Type of operation to be executed
```

There are a variety of operations you can use:

|Operation        |Eg. Expression        |Result           |
|-----------------|----------------------|-----------------|
|simplify         |2^2+2(2)              |8                |
|factor           |x^2 + 2x              |x (x + 2)        |
|derive           |x^2+2x                |2 x + 2          |
|integrate        |x^2+2x                |1/3 x^3 + x^2 + C|
|zeroes           |x^2+2x                |[-2, 0]          |
|tangent          |2 , x^3               |12 x + -16       |
|area             |2:4 , x^3             |60               |
|cos              |pi                    |-1               |
|sin              |0                     |0                |
|tan              |0                     |0                |
|arccos           |1                     |0                |
|arcsin           |0                     |0                |
|arctan           |0                     |0                |
|abs              |-1                    |1                |
|log              |2 , 8                 |3                |

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