Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@socketsecurity/cli

Package Overview
Dependencies
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socketsecurity/cli

CLI tool for Socket.dev

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
615
decreased by-20.95%
Maintainers
3
Weekly downloads
 
Created
Source

Socket CLI

npm version js-standard-style Follow @SocketSecurity

CLI tool for Socket.dev

Usage

npm install -g @socketsecurity/cli
socket --help
socket info webtorrent@1.9.1
socket report create package.json --view
socket report view QXU8PmK7LfH608RAwfIKdbcHgwEd_ZeWJ9QEGv05FJUQ

Commands

  • socket info <package@version> - looks up issues for a package
  • socket report create <path(s)-to-folder-or-file> - uploads the specified package.json and/or package-lock.json to create a report on socket.dev. If only one of a package.json/package-lock.json has been specified, the other will be automatically found and uploaded if it exists
  • socket report view <report-id> - looks up issues and scores from a report

Flags

Command specific flags

  • --view - when set on socket report create the command will immediately do a socket report view style view of the created report, waiting for the server to complete it

Output flags

  • --json - outputs result as json which you can then pipe into jq and other tools
  • --markdown - outputs result as markdown which you can then copy into an issue, PR or even chat

Other flags

  • --dry-run - like all CLI tools that perform an action should have, we have a dry run flag. Eg. socket report create supports running the command without actually uploading anything
  • --debug - outputs additional debug output. Great for debugging, geeks and us who develop. Hopefully you will never need it, but it can still be fun, right?
  • --help - prints the help for the current command. All CLI tools should have this flag
  • --version - prints the version of the tool. All CLI tools should have this flag

Environment variables

  • SOCKET_SECURITY_API_KEY - if set, this will be used as the API-key

Contributing

Environment variables for development

  • SOCKET_SECURITY_API_BASE_URL - if set, this will be the base for all API-calls. Defaults to https://api.socket.dev/v0/
  • SOCKET_SECURITY_API_PROXY - if set to something like http://127.0.0.1:9090, then all request will be proxied through that proxy

Similar projects

See also

FAQs

Package last updated on 23 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc