# furtive-file-system

> furtive-file-system

Latest version **1.0.10** (published 2023-05-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install furtive-file-system
pnpm add furtive-file-system
yarn add furtive-file-system
bun add furtive-file-system
```

Provides the command `ffs`.

## 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.10 |
| Published | 2023-05-30 |
| First published | 2023-05-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 32.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | juln |
| Maintainers | juln |

## Links

- npm: https://www.npmjs.com/package/furtive-file-system
- Repository: https://github.com/z-juln/furtive-file-system
- Homepage: https://github.com/z-juln/furtive-file-system/README.md
- Issues: https://github.com/z-juln/furtive-file-system/issues
- npm.io page: https://npm.io/package/furtive-file-system

## Dependencies (13)

- [cac](https://npm.io/package/cac.md) ^6.7.14
- [ora](https://npm.io/package/ora.md) 5
- [dree](https://npm.io/package/dree.md) ^4.5.4
- [gulp](https://npm.io/package/gulp.md) ^4.0.2
- [crypto](https://npm.io/package/crypto.md) ^1.0.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.1
- [gulp-zip](https://npm.io/package/gulp-zip.md) ^5.1.0
- [inquirer](https://npm.io/package/inquirer.md) 8
- [tty-table](https://npm.io/package/tty-table.md) ^4.2.1
- [gulp-unzip](https://npm.io/package/gulp-unzip.md) ^1.1.0
- [configstore](https://npm.io/package/configstore.md) 5
- [gulp-dir-cipher](https://npm.io/package/gulp-dir-cipher.md) ^1.2.0
- [config-cli-helper](https://npm.io/package/config-cli-helper.md) ^1.0.3

## Recent versions

- 1.0.10 (latest) — 2023-05-30
- 1.0.8 — 2023-05-30
- 1.0.7 — 2023-05-30
- 1.0.6 — 2023-05-29
- 1.0.5 — 2023-05-29
- 1.0.4 — 2023-05-29
- 1.0.3 — 2023-05-29
- 1.0.2 — 2023-05-29
- 1.0.1 — 2023-05-29
- 1.0.0 — 2023-05-29

## README

# furtive-file-system

Create a file system called `furtive file system`, where the directory name, file name, and file content are encrypted using `base64` + `blowfish` encryption method

## install

use api: `npm i furtive-file-system` or `yarn add furtive-file-system`

use cli: `npm i furtive-file-system -g` or `yarn global add furtive-file-system`

## use api

```typescript
import FurtiveFileSystem from 'furtive-file-system';

const cwd = '/Volumes/dev/furtive-workspace';
const password = 'you-password';

const ffs = new FurtiveFileSystem(cwd);
// if the password is illegal, an exception will be thrown
ffs.setPassword(password);

// push project <scope1/scope2/project1> from targetDir
ffs.pushProject('targetDir', {
  scope: 'scope1/scope2', // it can be one layer or multiple layers of scope
  rename: 'project1',
  ignore: [
    '.git/**/**',
    'node_modules/**/**',
  ],
})
  .then(() => console.log('=== pushProject okk'))
  .catch((error) => console.log('error', error?.message ?? error));
// result of furtive-file-system
// |-- scope1
//      |-- scope2
//            |-- project1

// restore project <scope1/scope2/project1> to <targetDir/rename-xxx>
ffs.restoreProject('scope1/scope2/project1', 'targetDir', { rename: 'rename-xxx' })
  .then(() => console.log('=== restoreProject okk'))
  .catch((error) => console.log('error', error?.message ?? error));

// ls all file-tree
ffs.ls()
  .then(tree => console.log('tree', JSON.stringify(tree, null, 2)))
  .catch((error) => console.log('error', error?.message ?? error));

// ls file-tree from scope <scope1/scope2>
ffs.ls('scope1/scope2')
  .then(tree => console.log('tree', JSON.stringify(tree, null, 2)))
  .catch((error) => console.log('error', error?.message ?? error));

// rmProject <scope1/scope2/project1> from furtive-file-system
ffs.rmProject('project1', 'scope1/scope2')
  .then(() => console.log('=== rmProject ok'))
  .catch((error) => console.log('error', error?.message ?? error));

// rmScope <scope1/scope2> from furtive-file-system
ffs.rmScope('scope1/scope2')
  .then(() => console.log('=== rmScope ok'))
  .catch((error) => console.log('error', error?.message ?? error));

// clean furtive-file-system
ffs.clean()
  .then(() => console.log('=== clean furtive-file-system ok'))
  .catch((error) => console.log('error', error?.message ?? error));
```

## use cli

help: `ffs -h`

version: `ffs -v`

set cwd: `ffs config set cwd=xxx`

get cwd: `ffs config get cwd`

ls all tree: `ffs ls`

ls scope: `ffs ls -l`

ls scope: `ffs ls scope1/scope2`

push project (by inquirer): `ffs push`

rm project: `ffs rm scope1/scope2/project1 --project`

rm scope: `ffs rm scope1/scope2 --scope`

clean all `ffs clean`

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