Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajput-vinay/file-operations-cli
A Command-Line Interface (CLI) tool for performing various file operations using Node.js. This tool allows you to create, read, write, edit, count words and lines, and delete files from the terminal.
https://github.com/rajput-vinay/file-operations-cli
Last synced: 5 days ago
JSON representation
A Command-Line Interface (CLI) tool for performing various file operations using Node.js. This tool allows you to create, read, write, edit, count words and lines, and delete files from the terminal.
- Host: GitHub
- URL: https://github.com/rajput-vinay/file-operations-cli
- Owner: Rajput-vinay
- Created: 2024-08-26T11:13:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T12:17:26.000Z (3 months ago)
- Last Synced: 2024-08-27T13:44:18.737Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/cdl-vinay
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# file-operations-cli
A Command-Line Interface (CLI) tool for performing various file operations using Node.js. This tool allows you to create, read, write, edit, count words and lines, and delete files from the terminal.
## Features
- **Count Words**: Count the number of words in a file.
- **Count Lines**: Count the number of lines in a file.
- **Create File**: Create a new file if it does not already exist.
- **Read File**: Read and display the content of a file.
- **Write File**: Write content to a file.
- **Edit File**: Replace specified text in a file with new content.
- **Delete File**: Delete a specified file.## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/Rajput-vinay/file-operations-cli.git2. **Navigate to the project directory:**
```bash
cd file-operations-cli3. **Install the dependencies:**
```bash
npm install4. **Run in terminal:**
```bash
npm link## Usage
You can use the CLI tool by running the following commands:
### Count Words
cdl-vinay countWord
### Create File
```bash
cdl-vinay createFile### Count Lines
```bash
cdl-vinay countLine### Read File
```bash
cdl-vinay readFile### Write File
```bash
cdl-vinay writeFile### Edit File
```bash
cdl-vinay editFile###Delete File
```bash
cdl-vinay deleteFile#Example
To count the number of words in a file named example.txt:```bash
cdl-vinay countWord example.txt## Contributing
1. **Fork the repository** to your own GitHub account.
2. **Create a new branch** for your feature or bug fix.
3. **Make your changes** and test them.
4. **Submit a pull request** with a description of the changes.