j178 / chatgpt

An elegant interactive CLI for ChatGPT
692 stars 52 forks source link

multi-instance mode #92

Open tennox opened 3 months ago

tennox commented 3 months ago

Love this tool ❤️

But when I want to use it in multiple terminal tabs:

❯ chatgpt -n
Error: Another chatgpt instance is running, chatgpt works not well with multiple instances, please close the other one first.
If you are sure there is no other chatgpt instance running, please delete the lock file: /tmp/chatgpt.lock
You can also try `chatgpt -d` to run in detach mode, this check will be skipped, but conversation will not be saved.

How (much effort) would it be to support multiple insances? Would be amazing :)

Ready to throw a sunday at it (at some point this year 😅)

j178 commented 3 months ago

Thanks, this might not be easy. We’re faced with two challenges:

  1. We need a more capable storage system allowing concurrent reads and writes, like SQLite?, instead of a plain file.
  2. Ensure that when two instances access the same conversation, updates made by one instance are automatically synchronized in the other.