# lib-oa

> OpenAddresses CLI & Lib

Latest version **2.5.1** (published 2021-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install lib-oa
pnpm add lib-oa
yarn add lib-oa
bun add lib-oa
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2021-11-18 |
| First published | 2021-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 23.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ingalls |
| Maintainers | ingalls |

## Links

- npm: https://www.npmjs.com/package/lib-oa
- Repository: https://github.com/openaddresses/lib
- Homepage: https://github.com/openaddresses/lib#readme
- Issues: https://github.com/openaddresses/lib/issues
- npm.io page: https://npm.io/package/lib-oa

## Dependencies (4)

- [request](https://npm.io/package/request.md) ^2.88.2
- [inquirer](https://npm.io/package/inquirer.md) ^8.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [asciichart](https://npm.io/package/asciichart.md) ^1.5.25

## Recent versions

- 2.5.1 (latest) — 2021-11-18
- 2.5.0 — 2021-05-17
- 2.4.1 — 2021-04-16
- 2.4.0 — 2021-04-10
- 2.3.0 — 2021-04-09
- 2.2.3 — 2021-04-07
- 2.2.2 — 2021-03-24
- 2.2.1 — 2021-03-24
- 2.2.0 — 2021-03-16
- 2.1.0 — 2021-03-10
- 2.0.0 — 2021-02-26

## README

<h1 align='center'>OpenAddresses CLI & Lib</h1>

<p align='center'>Javascript Library and CLI for the <a href='https://github.com/openaddresses/batch'>OpenAddresses API</a></p>

## General Usage

<h3 align=center>Installation</h3>

**JS Library**

```sh
yarn add 'oa'
```

**CLI**

```sh
yarn global add 'oa'
```

<h3 align=center>Instantiation</h3>

Note: if the username & password is not explicitly set, OA will fallback to checking for
a `OA_USERNAME` & `OA_PASSWORD` environment variable. For the `url` parameter, be sure to include the protocol and (if necessary) port number.

Alternatively an API token can be provided via a `OA_TOKEN` environment variable, or the server secret via the `OA_SECRET` variable.

**JS Library**

```js
const OA = require('oa');

const oa = new OA({
    username: 'ingalls',
    password: 'yeaheh',
    url: 'http://example.openaddresses.io',
});
```

**CLI**

The CLI tool must be provided the URL to connect to for each subcommand.
This can be accomplished by providing the URL to a local or remote OA server. Be sure to include the protocol and, for local connections, the port number.

```sh
# Connecting to a remote oa server
./cli.js --url 'https://example.openaddresses.io'
```

```sh
# Connecting to a local oa dev server
./cli.js --url 'http://localhost:5000'
```

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