DEV Community

StackFoss
StackFoss

Posted on • Originally published at stackfoss.com on

Controlled File System Interaction and Script Execution with Kaguya: A ChatGPT Plugin

Kaguya: Empowering Developers with Controlled File System Interaction

Kaguya

Kaguya is a powerful ChatGPT plugin designed to provide developers with enhanced control over their local files. With Kaguya, you can seamlessly load and edit your files in a controlled manner, while also running Python, JavaScript, and bash scripts directly from within ChatGPT. This innovative tool revolutionizes the way developers interact with their file systems, enabling efficient collaboration and development workflows.

API Endpoints

Kaguya offers a comprehensive set of API endpoints that allow you to interact with your file system seamlessly. The API is documented in the openapi.yaml file and provides the following functionality:

  • POST /api/executeCommand: Execute a shell command.
  • GET /api/listFilesInDirectory: List files and directories in the specified directory.
  • GET /api/readFile: Read the content of a file in the user's directory.
  • POST /api/update: Update a file in the user's directory by performing a search-and-replace operation.
  • POST /api/updateWholeFile: Replace the entire content of a file in the user's directory.
  • POST /api/createFile: Create a new file.
  • POST /api/deleteFile: Delete a file in the user's directory.
  • POST /api/renameFile: Rename a file in the user's directory.
  • POST /api/appendToFile: Append content to the end of an existing file.
  • POST /api/createDirectory: Create a new directory.
  • POST /api/deleteDirectory: Delete a directory and its contents.
  • POST /api/readMultipleFiles: Read the content of multiple files.

These API endpoints empower developers with granular control over their files and directories, making it easy to perform a wide range of file system operations.

Running the Project

Getting started with Kaguya is straightforward. You can run the project using Docker by executing the docker.sh script:

docker.sh

Enter fullscreen mode Exit fullscreen mode

Once the script is executed, you can access Kaguya through ChatGPT by using the appropriate localhost port.

Discover Kaguya in Action

To get a firsthand look at Kaguya's capabilities, check out the demo videos shared on Twitter:

These demos showcase how Kaguya seamlessly integrates with ChatGPT, empowering developers with efficient file system interaction and script execution.

Join the Kaguya Community on Discord

For further engagement and support, we invite you to join our Discord server. Connect with like-minded developers, share your experiences, and stay up to date with the latest Kaguya developments. Join our Discord community here.

Experience the power and convenience of Kaguya as it transforms the way developers work with their local files. Elevate your development workflow and unlock new possibilities with Kaguya today!

Top comments (0)