# @pythoncoderas/get-github-token

> Get a github token from multiple locations.

Latest version **1.0.0** (published 2022-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pythoncoderas/get-github-token
pnpm add @pythoncoderas/get-github-token
yarn add @pythoncoderas/get-github-token
bun add @pythoncoderas/get-github-token
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-07-03 |
| First published | 2022-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | PythonCoderAS |
| Maintainers | pythoncoderas |

## Links

- npm: https://www.npmjs.com/package/@pythoncoderas/get-github-token
- Repository: https://github.com/PythonCoderAS/get-github-token
- Homepage: https://github.com/PythonCoderAS/get-github-token#readme
- Issues: https://github.com/PythonCoderAS/get-github-token/issues
- npm.io page: https://npm.io/package/@pythoncoderas/get-github-token

## Dependencies (1)

- [dotenv](https://npm.io/package/dotenv.md) ^16.0.1

## Recent versions

- 1.0.0 (latest) — 2022-07-03

## README

# @pythoncoderas/get-github-token

Get a github token from multiple locations.

## API

### `getToken(tokenInput?: string | null, environmentVariableName = "GITHUB_TOKEN"): string | null`

Gets a token from the environment or a command line argument.

**Parameters**

- `tokenInput?: string | null` - The token input from the command line.
- `environmentVariableName: string` - The environment variable name to check for a token. Defaults to `GITHUB_TOKEN`.

**Returns**: `string | null` - The token if found, otherwise returns `null`.

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