# cdenv

> cdenv is a self-hostable and secured system for storing keys and variables for different environments and projects

Latest version **1.1.0** (published 2021-08-25) · MIT license · 0 weekly downloads

## Install

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

Provides the command `cdenv`.

## 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.1.0 |
| Published | 2021-08-25 |
| First published | 2020-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 33.4 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Taiwo Yusuf Hassan |
| Maintainers | teehazzan |
| Keywords | env, environment, config, settings, .env, variables |

## Links

- npm: https://www.npmjs.com/package/cdenv
- Repository: https://github.com/teezzan/cdEnv-client
- Homepage: https://github.com/teezzan/cdEnv-client#readme
- Issues: https://github.com/teezzan/cdEnv-client/issues
- npm.io page: https://npm.io/package/cdenv

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.19.2
- [terminal-kit](https://npm.io/package/terminal-kit.md) ^1.43.0

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-08-25
- 1.0.9 — 2021-07-27
- 1.0.8 — 2021-07-27
- 1.0.7 — 2021-07-27
- 1.0.6 — 2021-07-27
- 1.0.5 — 2021-07-27
- 1.0.4 — 2021-07-24
- 1.0.3 — 2021-07-24
- 1.0.2 — 2020-09-27
- 1.0.1 — 2020-09-27
- 1.0.0 — 2020-09-27

## README

# cdEnv-client
![Logo](https://github.com/teezzan/cdEnv/blob/master/images/cdenv-logo.png)

>[cdEnv](https://github.com/teezzan/cdEnv) is a self-hostable and secured system for storing keys and variables for different environments and projects. It allows easy access via HTTP API and CLI.

**This is a client to access any hosted [cdEnv](https://github.com/teezzan/cdEnv) instance in your code and via the CLI.**



## Screenshots/Demo
![ScreenShot](https://github.com/teezzan/cdEnv/blob/master/images/cdenv.png)
## Built With

- [Nodejs](https://nodejs.org/en/)


## Example Code

The variables in an environment can be accessed as a `key:value` pair via an HTTP API request to the hosted app. This library was developed to do this and many more. It is as simple as 

```javascript
let cdenv = require('cdenv');
cdenv.fetch('API-TOKEN-GENERATED-FROM-SERVER','APP-ENVIRONMENT-NAME', "URL_TO_SERVER_INSTANCE");

```
where `API-TOKEN-GENERATED-FROM-SERVER` is your user generated secret token, `APP-ENVIRONMENT-NAME` is the name of your environment on the server and `URL_TO_SERVER_INSTANCE` is the url to access your server instance running [cdEnv](https://github.com/teezzan/cdEnv).


You could also add the URL to your [cdEnv](https://github.com/teezzan/cdEnv) to path as `CDENV_SERVER`and the code becomes

```javascript
let cdenv = require('@teehazzan/cdenv');
cdenv.fetch('S2W42GJ-VM041FV-H00RZT5-6PG63F5','Heroku_Env');

```
This will populate your environment with the variables.

## Quick Installation
Using npx, running the following will get ypu started quickly.
```bash
npx cdenv
```

## Installation

Use the package manager [npm](https://www.npmjs.com/get-npm) to install this cdEnv client.

```bash
npm install --save cdenv
```
 or run `npm install -g cdenv` to install system-wide.


## Starting CLI Console
This library comes packaged with a cli interface to help ease setting up of environments. You can 
- Signup as a User
- Login as a User
- Create environments and populate it with Keys and values
- View environmental Keys and Variables.
- Modify and delete environments.
- Generate and Revoke access tokens.
- and many more.

**You need to add the URL to your [cdEnv](https://github.com/teezzan/cdEnv) to path as `CDENV_SERVER`.**

Simply run the cli with its command. 

```bash
cdenv
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)

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