{"id":20208437,"url":"https://github.com/scarvy/chatgpt-to-sqlite","last_synced_at":"2025-04-10T12:56:27.342Z","repository":{"id":223385277,"uuid":"756534805","full_name":"Scarvy/chatgpt-to-sqlite","owner":"Scarvy","description":"Import ChatGPT conversations into a SQLite database","archived":false,"fork":false,"pushed_at":"2024-02-20T00:17:30.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T11:44:58.732Z","etag":null,"topics":["chatgpt","dogsheep","openai","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scarvy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-12T21:01:38.000Z","updated_at":"2025-02-19T13:37:39.000Z","dependencies_parsed_at":"2024-02-20T00:42:09.336Z","dependency_job_id":null,"html_url":"https://github.com/Scarvy/chatgpt-to-sqlite","commit_stats":null,"previous_names":["scarvy/chatgpt-to-sqlite"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarvy%2Fchatgpt-to-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarvy%2Fchatgpt-to-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarvy%2Fchatgpt-to-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarvy%2Fchatgpt-to-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scarvy","download_url":"https://codeload.github.com/Scarvy/chatgpt-to-sqlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247708000,"owners_count":20982887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","dogsheep","openai","sqlite"],"created_at":"2024-11-14T05:35:38.470Z","updated_at":"2025-04-10T12:56:27.321Z","avatar_url":"https://github.com/Scarvy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chatgpt-to-sqlite\n\n[![PyPI](https://img.shields.io/pypi/v/chatgpt-to-sqlite.svg)](https://pypi.org/project/chatgpt-to-sqlite/)\n[![Changelog](https://img.shields.io/github/v/release/Scarvy/chatgpt-to-sqlite?include_prereleases\u0026label=changelog)](https://github.com/Scarvy/chatgpt-to-sqlite/releases)\n[![Tests](https://github.com/Scarvy/chatgpt-to-sqlite/actions/workflows/test.yml/badge.svg)](https://github.com/Scarvy/chatgpt-to-sqlite/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/Scarvy/chatgpt-to-sqlite/blob/master/LICENSE)\n\nImport ChatGPT conversations into a SQLite database\n\n## Installation\n\nInstall this tool using `pip`:\n\n    pip install chatgpt-to-sqlite\n\n## Usage\n\n**Pre-Requisite:**\n\nOpen [ChatGPT](https://chat.openai.com/) and navigate to your account settings.\n\nClick \"Data Controls and then \"Export\" under \"Export data\".\n\nFor help, run:\n\n    chatgpt-to-sqlite --help\n\nYou can also use:\n\n    python -m chatgpt_to_sqlite --help\n\nExport ChatGPT data into a SQLite Data:\n\n    chatgpt-to-sqlite path/to/chatGPT_conversations.json chatgpt.db\n\n**Database Schema:**\n\n    CREATE TABLE [conversations] (\n        [chat_id] TEXT PRIMARY KEY,\n        [title] TEXT,\n        [create_time] TEXT,\n        [update_time] TEXT\n    );\n    CREATE TABLE \"messages\" (\n        [message_id] TEXT PRIMARY KEY,\n        [sender] TEXT,\n        [create_time] TEXT,\n        [status] TEXT,\n        [weight] FLOAT,\n        [text] TEXT,\n        [model] TEXT,\n        [chat_id] TEXT REFERENCES [conversations]([chat_id])\n    );\n\n## Development\n\nTo contribute to this tool, first checkout the code. Then create a new virtual environment:\n\n    cd chatgpt-to-sqlite\n    python -m venv venv\n    source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarvy%2Fchatgpt-to-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscarvy%2Fchatgpt-to-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarvy%2Fchatgpt-to-sqlite/lists"}