# nubi

> ```javascript const Nubi = require('nubi'); const nubi = new Nubi();

Latest version **1.0.2** (published 2017-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install nubi
pnpm add nubi
yarn add nubi
bun add nubi
```

## 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.2 |
| Published | 2017-08-29 |
| First published | 2017-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Matthew Grill |
| Maintainers | drpal |

## Links

- npm: https://www.npmjs.com/package/nubi
- Repository: https://github.com/mattgrill/nubi
- Homepage: https://github.com/mattgrill/nubi#readme
- Issues: https://github.com/mattgrill/nubi/issues
- npm.io page: https://npm.io/package/nubi

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.16.2

## Recent versions

- 1.0.2 (latest) — 2017-08-29
- 1.0.1 — 2017-08-28
- 1.0.0 — 2017-08-28

## README

# Nubi

```javascript
const Nubi = require('nubi');
const nubi = new Nubi();

nubi.api.tasks.listTasks({ site: '{MYSITE}' })
  .then(console.log)
  .catch(console.log)
```

## Documentation

**Authentication** - You can either pass `NUBI_USERNAME` & `NUBI_PASSWORD` containing your basic authentication credentials with each request, or specify them in your environment and they will be automatically used with each request. The credentials-as-arguments take precedence over environment variables if both are present.

All methods accept a single object as an argument with the `parameters` as `keys`. These are used for replacements in template strings.

### api.tasks

- #### `listTasks`
  List a site's tasks.

  **Parameters:**
  - `site` - The site name.

- #### `taskRecord`
  Get a task record.

  **Parameters:**
  - `site` - The site name.
  - `task` - The task id.

### api.servers

- #### `listEnvironmentServers`
  List a site environment's servers.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.

- #### `getServerRecord`
  Get a server record.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `server` - The server name.

- #### `getServerMaxPHPProcesses`
  Calculate a server's PHP max processes record.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `server` - The server name.

### api.domains

- #### `deleteDomain`
  Delete a domain.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `domain` - The domain name to delete.

- #### `purgeVarnishForDomain`
  Purge the Varnish cache for a domain.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `domain` - The domain name to purge.

- #### `listEnvironmentServers`
  List an environment's domains.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.

- #### `getDomainRecord`
  Get a domain record.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `domain` - The domain name.

- #### `addDomain`
  Add a domain name.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `domain` - The domain name to add.

### api.workflow

- #### `deployCode`
  Deploy code from one site environment to another.

  **Parameters:**
  - `site` - The site name.
  - `source` - The source environment name.
  - `target` - The target environment name.

- #### `copyDatabase`
  Copy a database from one site environment to another.

  **Parameters:**
  - `site` - The site name.
  - `db` - The database name.
  - `source` - The source environment name.
  - `target` - The target environment name.

- #### `moveDomains`
  Move domain(s) from one site environment to another.

  **Parameters:**
  - `site` - The site name.
  - `source` - The source environment name.
  - `target` - The target environment name.

- #### `deployVCSBranch`
  Deploy a specific VCS branch or tag to an environment.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.

- #### `copyFiles`
  Copy files from one site environment to another.

  **Parameters:**
  - `site` - The site name.
  - `source` - The source environment name.
  - `target` - The target environment name.

### api.databse

- #### `deleteDatabse`
  Delete a database.

  **Parameters:**
  - `site` - The site name.
  - `db` - The database name.

- #### `deleteDatabaseBackup`
  Delete a site environment database instance backup.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.
  - `backup` - The backup id.

- #### `listDatabases`
  List a site's databases.

  **Parameters:**
  - `site` - The site name.

- #### `getDatabaseRecord`
  Get a database record.

  **Parameters:**
  - `site` - The site name.
  - `db` - The database name.

- #### `listEnvironmentDatabaseInstances`
  List a site environment's database instances.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.

- #### `getDatabaseInstance`
  Get a database instance.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.

- #### `getDatabaseInstanceBackups`
  List a site environment's database instance backups.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.

- #### `getDatabaseInstanceBackupDetails`
  Get details about a database instance backup.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.
  - `backup` - The backup id.

- #### `downloadDatabaseInstanceBackup`
  Download a database instance backup from server.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.
  - `backup` - The backup id.

- #### `addDatabase`
  Add a database.

  **Parameters:**
  - `site` - The site name.

- #### `createDatabaseInstanceBackup`
  Create a database instance backup.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.

- #### `restoreEnvironmentDatabaseBackup`
  Restore a site environment database instance backup.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `db` - The database name.
  - `backup` - The backup id.

### api.sites

- #### `getSites`
  List all sites accessible by the caller.

- #### `getSiteRecord`
  Get a site record.

  **Parameters:**
  - `site` - The site name.

- #### `listSiteEnvironments`
  Get an environment record.

  **Parameters:**
  - `site` - The site name.

- #### `getEnvironmentRecord`
  Get an environment record.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.

- #### `getLogStreamCommand`
  Retrieve an authenticated command to stream log files for an environment.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.

- #### `installDrupal`
  Install a Drupal distro or Drush Make file into an environment.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `type` - The `distro_url` or `make_url`.

- #### `configureLiveDevelopment`
  Configure Live Development on an environment.

  **Parameters:**
  - `site` - The site name.
  - `env` - The environment name.
  - `action` - Valid options are `enable` or `disable`.

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