npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fnet/filenet

v0.1.15

Published

This project is a command-line interface (CLI) tool designed to facilitate secure storage and retrieval of digital files using filenet.pro services. The core functionality allows users to encrypt and upload files (push) or download and decrypt files (pull

Downloads

429

Readme

@fnet/filenet

This project is a command-line interface (CLI) tool designed to facilitate secure storage and retrieval of digital files using filenet.pro services. The core functionality allows users to encrypt and upload files (push) or download and decrypt files (pull) from the filenet.pro storage platform, offering a simple method for managing file security and access.

How It Works

The tool operates through a series of interactive prompts or user-specified arguments to gather necessary information for file operations. For encryption and uploads, users provide an input file or directory, and for decryption and downloads, specify an output location. Users must provide a mnemonic seed phrase or a private key for cryptographic operations, which is essential for key generation and access rights.

Key Features

  • File Encryption and Upload: Securely encrypt files and upload them to filenet.pro, using a private key or derived key from a seed phrase.
  • File Decryption and Download: Retrieve encrypted files and decrypt them locally, ensuring access to your data when needed.
  • Secure Key Management: Optionally derive cryptographic keys from a mnemonic seed phrase, allowing for flexible access configurations.
  • User Interaction: Provides an interactive experience to guide users through the process, with options to bypass prompts using command-line arguments.

Conclusion

@fnet/filenet provides a straightforward solution for securely storing and accessing files with the filenet.pro service. By focusing on fundamental operations—file encryption, upload, retrieval, and decryption—it offers essential functionality for users who need a reliable method for managing sensitive information in a digital format.

Developer Guide for @fnet/filenet

Overview

The @fnet/filenet library provides a toolset for interacting with Filenet services, allowing developers to securely push (encrypt and store) and pull (retrieve and decrypt) content. Using a mnemonic seed phrase or private key, developers can generate cryptographic keys to perform operations with enhanced security, making it particularly suitable for managing encrypted data storage and retrieval.

Installation

To install @fnet/filenet, use npm or yarn:

npm install @fnet/filenet

or

yarn add @fnet/filenet

Usage

To utilize the @fnet/filenet library, you will typically interact with its primary exported function, which handles both pushing and pulling operations to and from Filenet services. The function requires specific parameters to define the operation type, keys for encryption, and input/output file paths.

Push Operation

This involves encrypting your content and safely storing it on Filenet.

import filenet from '@fnet/filenet';

async function pushContent() {
  try {
    const result = await filenet({
      operation: 'push',
      phrase: 'your mnemonic seed phrase here',
      input: './path/to/directory-or-file',
      no_prompt: true
    });
    console.log(result.message);
  } catch (error) {
    console.error(error);
  }
}

pushContent();

Pull Operation

This retrieves and decrypts your content from Filenet.

import filenet from '@fnet/filenet';

async function pullContent() {
  try {
    const result = await filenet({
      operation: 'pull',
      phrase: 'your mnemonic seed phrase here',
      output: './path/to/output/directory',
      no_prompt: true
    });
    console.log(result.message);
  } catch (error) {
    console.error(error);
  }
}

pullContent();

Examples

Example: Encrypting and Storing Data

// Assuming you have the seed phrase and the data path
await filenet({
  operation: 'push',
  phrase: 'your-mnemonic-seed-phrase',
  input: '/path/to/data'
});

Example: Retrieving and Decrypting Data

// Use the same seed phrase to retrieve the data back
await filenet({
  operation: 'pull',
  phrase: 'your-mnemonic-seed-phrase',
  output: '/path/to/save/decrypted-data'
});

Acknowledgement

This library utilizes various cryptographic and file-handling modules to ensure data integrity and security during transfer and storage.

Input Schema

$schema: https://json-schema.org/draft/2020-12/schema
title: Filenet CLI Operation Input Schema
description: Main handler for @fnet/filenet CLI operations with dynamic
  prompt-based input gathering. Handles push (encrypt & store) and pull
  (retrieve & decrypt) interactions with filenet.pro services.
type: object
properties:
  operation:
    type: string
    description: The operation to perform ('push' or 'pull').
  phrase:
    type: string
    description: The mnemonic seed phrase for key generation.
  private_key:
    type: string
    description: The private key for encryption/decryption.
  input:
    type: string
    description: The input directory or file path for encryption (used in push).
    default: .
  output:
    type: string
    description: The output path for decryption results (used in pull).
    default: .
  no_prompt:
    type: boolean
    description: If true, prompts are skipped and defaults or provided arguments are used.
    default: false
  organization:
    type: number
    description: The organization index for key derivation (used with phrase).
    default: 0
  scope:
    type: number
    description: The scope index for key derivation (used with phrase).
    default: 0
  account:
    type: number
    description: The account index for key derivation (used with phrase).
    default: 0
  index:
    type: number
    description: The index for key derivation (used with phrase).
    default: 0