Skip to content

devidw/replika-chat-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replika Chat Export

So you want to export your chat messages with your replika?

🔥
Looking for a no-code, one-click, zero-setup export? Check out the browser extension.

Here is how to do it:

  1. Clone the repo and open it in VS Code:

    git clone https://github.com/devidw/replika-chat-export
    code replika-chat-export
  2. Make sure you have the Dev Container’s extension installed and open the folder as container

  3. The export script will open a web socket connection to ws.replika.com. To authenticate yourself, you need to provide your auth details. Set the needed env variables and the script will include them when fetching your messages. You can set them in a .env file:

    REPLIKA_CHAT_ID=XXXXXXXXXXXXXXXXXXXXXXXX
    REPLIKA_USER_ID=XXXXXXXXXXXXXXXXXXXXXXXX
    REPLIKA_AUTH_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    REPLIKA_DEVICE_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

    To get your values, open the dev tools on https://my.replika.com and follow the details on the screenshot:

    extract
  4. Once you have all required env variables set, you can execute the export script:

    pnpm run dev
  5. This will call main.js and queries your messages in chunks of 100 messages, once there are no more messages to fetch, all your messages will be written into messages.json on your local file system

Performance

You should be able to export around 300 messags per second.