# libnpmteam [](https://npm.im/libnpmteam) [](https://npm.im/libnpmteam) [](https://travis-ci.org/npm/libnpmteam) [](https://ci.appveyor.com/project/zkat/libnpmteam) [](https://coveralls.io/github/npm/libnpmteam?branch=latest)
[`libnpmteam`](https://github.com/npm/libnpmteam) is a Node.js
library that provides programmatic access to the guts of the npm CLI's `npm
team` command and its various subcommands.
## Example
```javascript
const access = require('libnpmteam')
// List all teams for the @npm org.
console.log(await team.lsTeams('npm'))
```
## Table of Contents
* [Installing](#install)
* [Example](#example)
* [Contributing](#contributing)
* [API](#api)
* [team opts](#opts)
* [`create()`](#create)
* [`destroy()`](#destroy)
* [`add()`](#add)
* [`rm()`](#rm)
* [`lsTeams()`](#ls-teams)
* [`lsTeams.stream()`](#ls-teams-stream)
* [`lsUsers()`](#ls-users)
* [`lsUsers.stream()`](#ls-users-stream)
### Install
`$ npm install libnpmteam`
### Contributing
The npm team enthusiastically welcomes contributions and project participation!
There's a bunch of things you can do if you want to contribute! The [Contributor
Guide](CONTRIBUTING.md) has all the information you need for everything from
reporting bugs to contributing entire new features. Please don't hesitate to
jump in if you'd like to, or even ask us questions if something isn't clear.
All participants and maintainers in this project are expected to follow [Code of
Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
Happy hacking!
### API
#### `opts` for `libnpmteam` commands
`libnpmteam` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).
All options are passed through directly to that library, so please refer to [its
own `opts`
documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)
for options that can be passed in.
A couple of options of note for those in a hurry:
* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.
* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmteam` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`
* `opts.Promise` - If you pass this in, the Promises returned by `libnpmteam` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`
#### `> team.create(team, [opts]) -> Promise`
Creates a team named `team`. Team names use the format `@