# @flaze/git-vault

> A tool that allows you to encrypt files in your git repository.

Latest version **0.0.1** (published 2021-09-06) · 0 weekly downloads

## Install

```sh
npm install @flaze/git-vault
pnpm add @flaze/git-vault
yarn add @flaze/git-vault
bun add @flaze/git-vault
```

Provides the command `git-vault`.

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-09-06 |
| First published | 2021-09-06 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 30.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ingoandelhofs |
| Maintainers | ingoandelhofs |

## Links

- npm: https://www.npmjs.com/package/@flaze/git-vault
- Repository: https://github.com/flaze-web/git-vault
- npm.io page: https://npm.io/package/@flaze/git-vault

## Dependencies (5)

- [pjson](https://npm.io/package/pjson.md) ^1.0.9
- [prompts](https://npm.io/package/prompts.md) ^2.4.1
- [commander](https://npm.io/package/commander.md) ^8.0.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.2.7
- [@types/prompts](https://npm.io/package/@types/prompts.md) ^2.0.14

## Recent versions

- 0.0.1 (latest) — 2021-09-06
- 0.0.0 — 2021-09-06

## README

# git-vault (UNSTABLE - DEVELOPMENT)
A tool that allows you to encrypt files in your git repository.

## Installation
Install locally:
```bash
$ yarn add @flaze/git-vault
```

Install globally:
```bash
$ yarn global install @flaze/git-vault
```


## Development
Install all the packages of needed to run git-vault:
```bash
yarn install
```

For local development you can run:
```bash
yarn dev <args>
```

To install `git-vault` globally for development you can run:
```bash 
# Linux
$ yarn i

# Windows
$ yarn i:win
```


## Usage
To initialize `git-vault` in a `git` repository run:
```bash
# Install git hooks, generate a key and display it to the user.
# git-vault will now automatically encrypt files on git commit.
# git-vault will also automatically decrypt files on git pull.
$ git-vault init
```

If you already have a key, you can provide that key to the `init` command:
```bash
# Install git hooks and store the provided key
$ git-vault init --key <key>
```

Because encrypted files must be ignored, you can add all the files you want to encrypt to your .gitignore file. To make sure `git-vault` knows which files to encrypt make sure to surround those files with `#start:enc` and `#end:enc`.
```bash 
# .gitignore
#start:enc
secret.txt
#end:enc
```

To `encrypt` or `decrypt` files manually, you can run:
```bash
$ git-vault encrypt --key <key>
$ git-vault decrypt --key <key>
```

To `generate` a key manually, you can run:
```bash
$ git-vault generate
```

To view or set the current `key`, you can run:
```bash
# You can also set a new key if you provide --key <key>
$ git-vault key
```

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