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

@virtru/sdk-cli

v0.2.1

Published

Virtru SDK CLI

Downloads

1

Readme

virtru-sdk-cli

The Virtru CLI library drives the CLI tool

Usage

I/O

Input supports piping data as well as file specification. This will be detected automatically depending on the input type that is sent to the command.

echo "Hello World" | virtru-sdk encrypt
# or
virtru-sdk encrypt plaintext.txt

Output supports standard out as well as specifying a output file.

virtru-sdk encrypt # will write to std out
....
# or
virtru-sdk encrypt --out out.tdf # will write to out.tdf

Authentication

Authentication:
  --auth  Authentication string                                         [string]

Authentication by AppId:
  --user, -u  UserId for AppId authentication                           [string]
  --id, -i    AppId for AppId authentication                            [string]

Authentication by HMAC:
  --token, -t   Token for HMAC authentication                           [string]
  --secret, -s  Secret for HMAC authentication                          [string]
  --email, -e   Email of user accessing policy                          [string]

Encrypt

virtru-sdk encrypt [file]

Encrypt Options
  --out-html  Output as TDF HTML (file size limit exists)              [boolean]

Policy Options
  --expiration-deadline    Set policy expiration deadline (i.e., 2020-01-01,
                           2020-01-01T01:01, or 2020-01-01T01:01:01.000Z[string]
  --owner                  Set the policy owner                         [string]
  --persistent-protection  Enable persistent protection (requires Secure Reader
                           to decrypt)                [boolean] [default: false]
  --users-with-access      Add users to the policy     [string] [default: false]
  --watermarking           Enable watermarking (requires Secure Reader to
                           decrypt)                   [boolean] [default: false]

### Examples

# output to stdOut
> virtru-sdk encrypt --auth $AUTH secrets.txt
[ENCRYPTED DATA]

# output to stdOut as html format
> virtru-sdk encrypt --auth $AUTH secrets.txt --out-html
<html>
...

# output to file
> virtru-sdk decrypt --auth $AUTH secrets.txt > plain.tdf

# pipe to another command
> virtru-sdk decrypt --auth $AUTH .txt | aws s3 cp - s3://some-bucket/secrets.tdf

Decrypt

virtru-sdk decrypt [file]

Decrypt TDF to string

### Examples

# output to stdOut
> virtru-sdk decrypt --auth $AUTH secrets.tdf
Shhhh!

# output to file
> virtru-sdk decrypt --auth $AUTH secrets.tdf > plain.txt

# pipe to another command
> virtru-sdk decrypt --auth $AUTH secrets.tdf | grep !
!

Policy

The policy command is a collection of commands

Fetch

virtru-sdk policy fetch [file|policy-id]

Fetch policy by TDF or policy id

### Examples

# Pass an encrypted file
> virtru-sdk policy fetch --auth $AUTH secrets.tdf
Property                             | Value                               
---------------------------------------------------------------------------
Owner                                | 6c180b65-xxx-xxxx-xxx-9ea57aae348a
Owner                                |                                     
Users w/ Access                      | [email protected]                         
Expiration Deadline                  |                                     
                                     |                                     
= Authorizations =================== | ====================================
Can Copy                             | true                                
Can Persistent Protection            | false                               
Can Prevent Download                 | false                               
Can Print                            | true                                
Can Reshare                          | true                                
Can Watermarking                     | false                               

# Pass a policy id
> virtru-sdk policy fetch --auth $AUTH 6c180b65-xxx-xxxx-xxx-9ea57aae348a
...

Update

TBD