amir-text-cli
v1.12.0
Published
 
Downloads
19
Readme
amir-text-cli
Table of Contents
A command-line interface (CLI) for managing files and directories in a specified path with a visual representation of the directory tree. Built with Vue.js, TypeScript, TailwindCSS, Node.js, Vite, and WebSocket. This tool allows you to create, rename, and delete files and directories efficiently.
Features
- Directory Tree Visualization: Displays a hierarchical view of the files and directories in the specified path.
- File Management: Create, rename, and delete files and directories via WebSocket communication.
- Multi-platform Support: Works seamlessly across different operating systems.
Installation
To install amir-text-cli, run the following command:
npm install -g amir-text-cliUsage
To use amir-text-cli, you need to specify a directory path. Run the following command:
npx amir-text-cli <directory_path>Example
npx amir-text-cli /path/to/your/directoryThis command will start the WebSocket server and visualize the directory tree of the specified path.
Commands
Once the server is running, you can perform the following actions:
1. Create a file/directory:
- Send a message with
CREATEaction. - Include
directory(path) anditem(object withnameand optionalchildren) in your message.
2.Rename a file/directory:
- Send a message with
RENAMEaction. - Include
directory(path) anditem(object witholdNameandnewName) in your message.
3. Delete a file/directory:
- Send a message with
DELETEaction. - Include
directory(path) in your message.
API
- WebSocket Server: Listens for client connections on port 8080.
- Directory Tree Updates: Automatically updates and sends the current state of the directory tree to the client on changes.
Development
Prerequisites
Ensure that you have Node.js and npm installed on your machine.
Contributing
Contributions are welcome! Please feel free to open an issue or submit a pull request.
Support
For support, please open an issue in the GitHub repository or contact the maintainer.
