• Stars
    star
    1,195
  • Rank 39,145 (Top 0.8 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A ChatGPT plugin that allows you to load and edit your local files in a controlled way, as well as run any Python, JavaScript, and bash script.

Kaguya

Kaguya is a ChatGPT plugin that allows you to load and edit your local files in a controlled way, as well as run any Python, JavaScript, and bash script. This makes it a powerful tool for developers, enabling them to interact with their file system and run scripts directly from ChatGPT. To interact with Kaguya, you'll need access to plugin devtools by getting on their waitlist here. In case this approach doesn't work for you, we may be able to come up with a more open approach at some point in the future.

Demo

Here are a few demo videos of Kaguya:

C7GcV0-YN6Pt6CnI.mp4
FchDrHVGdP2WVWsn.mp4

Getting Started Guide

  1. Gain access to OpenAI's plugin devtools for ChatGPT here
  2. Install Docker and run it locally
  3. Clone this repo to your local environment
  4. Execute docker.sh script
  5. Setup localhost port 3000
  6. Interact with Kaguya through ChatGPT
  7. If you want Kaguya to be able to interact with your files, put them in the FILES folder.
  8. Note: Kaguya won't have access to files outside of its own directory.

Recommended Custom Instructions

When editing a file, use search and replace and NOT updateWholeFile unless we're dealing with a very small file. Confirm with me before you edit a file.

When you have output from Kaguya, there's no need to repeat everything from there. Instead, you can summarize it concisely.

When you want to use executeCommand in a subdirectory, make sure to cd there first every time.

API Endpoints

The project provides several API endpoints that allow you to interact with the file system within the Kaguya directory. The API is described in the openapi.yaml file. Here is a brief overview:

  • GET /api/listFilesInDirectory: List files and directories in the specified directory. Defaults to FILES.
  • GET /api/readFile: Read the content of a file in the user's directory.
  • GET /api/readMultipleFiles: Read the content of multiple files.
  • POST /api/update: Update a file in the user's directory by performing a search-and-replace operation.
  • POST /api/updateAll: Update a file in the user's directory by performing a search-and-replace operation (all occurrences).
  • POST /api/updateWholeFile: Replace the entire content of a file in the user's directory.
  • POST /api/appendToFile: Append content to the end of an existing file.
  • 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/createDirectory: Create a new directory.
  • POST /api/deleteDirectory: Delete a directory and its contents.
  • POST /api/executeCommand: Execute a shell command.

Tips

  • If listFilesInDirectory tries to show too many files, a good solution would be to add a git repo or submodule, in which files in .gitignore are ignored.
  • Best to keep each file under 100 lines of code, particularly for writing
  • Writing more than ~80 lines of code at once is not recommended. It's slow and it might not even be able to finish the task.
  • You can have it read more code though. However, reading more than 500-600 lines of code at once is not recommended.
  • If the target file you want to edit is long, you may want to explicitly ask it to use search and replace and NOT updateWholeFile.
  • It may not get the intention of your instructions right away. It's meant to be a conversational tool.
  • If the assistant starts hallucinating, it may be helpful to start a new conversation or limit the length of each file being loaded.

Discord

Feel free to join our Discord server here.

VS Code Extension

We're also working on a VS Code extension version of Kaguya. Feel free to sign up for the waitlist here.

More Repositories

1

editdojo

(I'm no longer working on this - currently working on https://github.com/ykdojo/defaang)
CSS
332
star
2

csqa

No longer working on this - currently working on https://github.com/ykdojo/kaguya/
Python
172
star
3

OpenStream

OpenStream is an open-source project for creating a free tool that records screen and webcam footage simultaneously into separate files. It's designed for content creators and developed collaboratively through our community on Discord.
TypeScript
106
star
4

twitterbotsample

A sample Twitter bot - created by @ykdojo. This is part of the Edit Dojo project.
Python
82
star
5

open-source-hiring

A GitHub repo (and later a website) that lists job postings that are open at open source companies!
81
star
6

friendlyreminderbot

A friendly reminder twitter bot to keep you healthy and happy - not actively maintaining it anymore. Currently working on: https://github.com/ykdojo/defaang
Python
65
star
7

sensei

An AI terminal helper that helps you remember a terminal command, explains what a command does, and answers any question you have.
JavaScript
48
star
8

text_difference_finder

A text difference finder script in JavaScript - created by @ykdojo. This is part of the Edit Dojo project.
JavaScript
33
star
9

100DaysofOpenSource

#100DaysofOpenSource - join us here and on Twitter!
13
star
10

personalized_search_challenge

Attempt on a Kaggle competition, Personalized Web Search Challenge, hosted by Yandex (http://www.kaggle.com/c/yandex-personalized-web-search-challenge)
Python
12
star
11

StreamSafe

StreamSafe is a browser extension that's designed to enhance the privacy of livestreamers. It's branched out from https://github.com/ykdojo/OpenStream/blob/hide-suggested-posts-on-linkedin/
JavaScript
10
star
12

supabase-nextjs-simple-auth

Learn how to set up Supabase auth for both the frontend and backend of your application using a JWTβ€Š-β€ŠJSON web token.
TypeScript
6
star
13

editdojo2

This used to be Edit Dojo's private repo - now it's public.
CSS
4
star
14

my_node_skelton

JavaScript
3
star
15

StreamForce

CRM (Chatter Relationship Management) for Twitch streamers, used to keep track of who is who in the chat
JavaScript
3
star
16

WordCounterGPT

A ChatGPT plugin for precise character and word counting
Python
2
star
17

AskHNGPT

A custom GPT for asking the HN audience anything.
Python
2
star
18

To-Do-Is-To-Live-Is-To-Code

JavaScript
1
star
19

supabase-nextjs-simple-auth-starter

This example shows how to use Supabase's auth on both the frontend and backend.
JavaScript
1
star
20

nextjs-with-supabase-auth

1
star
21

t

JavaScript
1
star
22

markovbook

Visualize markov chains interactively as you type
JavaScript
1
star
23

csqa_previous_repo

An open source Q&A website for CS learners
CSS
1
star
24

gemini_test

Python
1
star
25

snowflake_hackathon

Python
1
star