New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

file-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-cli

CLI tool to do basic file operations (copy, read, write, move...) in a cross-platform way

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

File CLI

npm David MIT license

CLI tool to do basic file operations in a cross-platform way. Uses fs-extra under the hood.

Install

Install globally:

npm i -g file-cli

Or install into your project's dev-dependencies to use in your scripts:

npm i -D file-cli

Commands

The CLI can be used as fcli, which is a little shorter than file-cli.

Run fcli --help to view a list of commands in your terminal.

Read
fcli read <path>

Reads a file and prints it to stdout

Write
fcli write <path> <data>

Writes data to a file

Ensure
fcli ensure <path> [-f]

Ensures a file or directory exists.

  • -f, --file: path is a file
Copy
fcli copy <from> <to> [-o]

Copies a file or the contents of a directory (unix equivalent: cp -r)

  • -o, --overwrite: overwrite target file if it already exists
Move
fcli move <from> <to> [-o]

Moves or renames a file (unix equivalent: mv)

  • -o, --overwrite: overwrite target file if it already exists
Remove
fcli remove <path>

Removes a file or directory (unix equivalent: rm -rf)

Keywords

FAQs

Package last updated on 17 Feb 2020

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