{"id":21128708,"url":"https://github.com/Snowflyt/typora-copilot","last_synced_at":"2025-07-08T23:33:03.507Z","repository":{"id":211950039,"uuid":"730339621","full_name":"Snowflyt/typora-copilot","owner":"Snowflyt","description":"GitHub Copilot \u0026 Copilot Chat plugin for Typora on both Windows, macOS and Linux.","archived":false,"fork":false,"pushed_at":"2025-05-10T06:39:54.000Z","size":14203,"stargazers_count":149,"open_issues_count":8,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-25T16:01:56.753Z","etag":null,"topics":["copilot","github-copilot","lsp-client","markdown","plugin","typora","typora-copilot","typora-extension","typora-plugin"],"latest_commit_sha":null,"homepage":"https://github.com/Snowflyt/typora-copilot","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Snowflyt.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-11T17:55:04.000Z","updated_at":"2025-05-24T10:13:02.000Z","dependencies_parsed_at":"2023-12-19T10:49:40.335Z","dependency_job_id":"e89129d1-fc95-46c9-9575-6113a6398b94","html_url":"https://github.com/Snowflyt/typora-copilot","commit_stats":null,"previous_names":["snowfly-t/typora-copilot","snowflyt/typora-copilot"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/Snowflyt/typora-copilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflyt%2Ftypora-copilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflyt%2Ftypora-copilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflyt%2Ftypora-copilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflyt%2Ftypora-copilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snowflyt","download_url":"https://codeload.github.com/Snowflyt/typora-copilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snowflyt%2Ftypora-copilot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264365981,"owners_count":23596945,"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":["copilot","github-copilot","lsp-client","markdown","plugin","typora","typora-copilot","typora-extension","typora-plugin"],"created_at":"2024-11-20T05:01:44.638Z","updated_at":"2025-07-08T23:33:03.494Z","avatar_url":"https://github.com/Snowflyt.png","language":"TypeScript","funding_links":[],"categories":["JavaScript","插件"],"sub_categories":[],"readme":"# Typora Copilot\n\nEnglish | [简体中文](./README.zh-CN.md)\n\n![Copilot suggestion screenshot](./docs/screenshot.png)\n\n[GitHub Copilot](https://github.com/features/copilot) \u0026 [Copilot Chat](https://docs.github.com/copilot/using-github-copilot/copilot-chat) plugin for [Typora](https://typora.io/) on both Windows, macOS and Linux.\n\nThis plugin uses the [official GitHub Copilot LSP server](https://www.npmjs.com/package/@github/copilot-language-server) to provide suggestions in real-time right from your editor.\n\n## Compatibility\n\n\u003e [!NOTE]\n\u003e\n\u003e Since Typora v1.10, all platforms require [Node.js](https://nodejs.org/en/download) ≥ 20 to use this plugin.\n\u003e\n\u003e (For those special users on Windows / Linux using Typora 1.9, no need for Node.js to be installed. :wink:)\n\n_\\*Note: `/` means not tested._\n\n| Typora Version | Windows 11 | Ubuntu 24.04 | macOS 15.x |\n| -------------- | ---------- | ------------ | ---------- |\n| 1.10.8         | ✓          | ✓            | ✓          |\n| 1.10.6         | ✓          | ✓            | ✓          |\n| 1.9.5          | ✓          | /            | /          |\n| 1.9.4          | /          | /            | ✓          |\n| 1.9.3          | /          | ✓            | /          |\n| 1.8.10         | ✓          | ✓            | ✓          |\n| 1.8.8          | /          | ✓            | /          |\n| 1.8.6          | ✓          | /            | /          |\n| 1.8.5          | ✓          | /            | ✓          |\n| 1.7.6          | ✓          | /            | /          |\n| 1.6.7          | ✓          | /            | /          |\n| 1.5.12         | ✓          | /            | /          |\n| 1.4.8          | ✓          | /            | /          |\n| 1.3.8          | ✓          | /            | /          |\n| 1.2.5          | ✓          | /            | /          |\n| 1.2.3          | ✓          | /            | /          |\n| 1.0.3          | ✓          | /            | /          |\n| 0.11.18-beta   | ✓          | /            | /          |\n\n## Prerequisites\n\n- Public network connection.\n- Active GitHub Copilot subscription.\n\n## Installation\n\n### Automated Installation (Recommended)\n\nTo install the plugin, you can just copy and paste the following command into your terminal:\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eWindows\u003c/strong\u003e\u003c/summary\u003e\n\nRun the following command in PowerShell **as administrator**:\n\n```powershell\niwr -Uri \"https://raw.githubusercontent.com/Snowflyt/typora-copilot/main/install.ps1\" | iex\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/summary\u003e\n\nRun the following command in your terminal:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Snowflyt/typora-copilot/main/install.sh | sudo bash\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eLinux\u003c/strong\u003e\u003c/summary\u003e\n\nRun the following command in your terminal:\n\n```bash\nwget -O - https://raw.githubusercontent.com/Snowflyt/typora-copilot/main/install.sh | sudo bash\n```\n\n\u003c/details\u003e\n\n### Script Install\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eWindows\u003c/strong\u003e\u003c/summary\u003e\n\nFor Windows users, first download the latest release from [the releases page](https://github.com/Snowflyt/typora-copilot/releases) and unzip it. Then locate to the folder where you unzipped the release and run the following command in PowerShell **as administrator**:\n\n```powershell\n.\\bin\\install_windows.ps1\n```\n\nIf the script fails to find Typora, you can specify the path to Typora manually:\n\n```powershell\n.\\bin\\install_windows.ps1 -Path \"C:\\Program Files\\Typora\\\" # Replace with your Typora path\n# Or use the alias\n# .\\bin\\install_windows.ps1 -p \"C:\\Program Files\\Typora\\\" # Replace with your Typora path\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/summary\u003e\n\nFor macOS users, first download the latest release from [the releases page](https://github.com/Snowflyt/typora-copilot/releases) and unzip it. Then locate to the folder where you unzipped the release and run the following command in terminal:\n\n```bash\nsudo bash ./bin/install_macos.sh\n```\n\nIf the script fails to find Typora, you can specify the path to Typora manually:\n\n```bash\nsudo bash ./bin/install_macos.sh --path \"/Applications/Typora.app/\" # Replace with your Typora path\n# Or use the alias\n# sudo bash ./bin/install_macos.sh -p \"/Applications/Typora.app/\" # Replace with your Typora path\n```\n\nYou’ll see a message logging the installation directory of the plugin. _Keep it in mind, you’ll need it when uninstalling the plugin._ After that, you can safely delete the release folder.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eLinux\u003c/strong\u003e\u003c/summary\u003e\n\nFor Linux users, first download the latest release from [the releases page](https://github.com/Snowflyt/typora-copilot/releases) and unzip it. THen locate to the folder where you unzipped the release and run the following command in terminal:\n\n```bash\nsudo bash ./bin/install_linux.sh\n```\n\nIf the script fails to find Typora, you can specify the path to Typora manually:\n\n```bash\nsudo bash ./bin/install_linux.sh --path \"/usr/share/typora/\" # Replace with your Typora path\n# Or use the alias\n# sudo bash ./bin/install_linux.sh -p \"/usr/share/typora/\" # Replace with your Typora path\n```\n\nYou’ll see a message logging the installation directory of the plugin. _Keep it in mind, you’ll need it when uninstalling the plugin._ After that, you can safely delete the release folder.\n\n\u003c/details\u003e\n\n### Manual Install\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand\u003c/summary\u003e\n\n1. Download the latest release from [the releases page](https://github.com/Snowflyt/typora-copilot/releases) and unzip it.\n2. For Windows / Linux users, find `window.html` in your Typora installation folder, usually located at `\u003ctypora_root_path\u003e/resources/`; For macOS users, find `index.html` in your Typora installation folder, usually located at `\u003ctypora_root_path\u003e/Contents/Resources/TypeMark/`. `\u003ctypora_root_path\u003e` is the path where Typora is installed, replace it with your real Typora installation path (note that the angle brackets `\u003c` and `\u003e` should also be removed). This folder is called Typora resource folder in the following steps.\n3. Create a folder named `copilot` in Typora resource folder.\n4. Copy the downloaded release to the `copilot` folder.\n5. For Windows / Linux users, open the previous `window.html` file you found in Typora resource folder with a text editor, and add `\u003cscript src=\"./copilot/index.js\" defer=\"defer\"\u003e\u003c/script\u003e` right after something like `\u003cscript src=\"./appsrc/window/frame.js\" defer=\"defer\"\u003e\u003c/script\u003e` or `\u003cscript src=\"./app/window/frame.js\" defer=\"defer\"\u003e\u003c/script\u003e`; For macOS users, open the previous `index.html` file you found in Typora resource folder with a text editor, and add `\u003cscript src=\"./copilot/index.js\" defer\u003e\u003c/script\u003e` right after something like `\u003cscript src=\"./appsrc/main.js\" aria-hidden=\"true\" defer\u003e\u003c/script\u003e` or `\u003cscript src=\"./app/main.js\" aria-hidden=\"true\" defer\u003e\u003c/script\u003e`.\n6. Restart Typora.\n7. For macOS users, if you see a warning dialog saying Typora may be damaged, Ctrl-click Typora and select “Open” to open Typora.\n\n\u003c/details\u003e\n\n## Setup\n\nWhen finished installation, you’ll find an icon in the toolbar of Typora (i.e. the bottom-right corner of Typora). Click **the arrow button** next to the icon to open the panel of Copilot, and then click “Sign in to authenticate Copilot”.\n\n![Copilot icon](./docs/toolbar-icon.png)\n\nFollow the prompts to authenticate Copilot plugin:\n\n1. The User Code will be auto copied to your clipboard.\n2. Follow the instructions on the pop-up dialog to open the GitHub authentication page in your browser.\n3. Paste the User Code into the GitHub authentication page.\n4. Return to Typora and press OK on the dialog.\n5. If you see a “Signed in to Copilot” dialog _after a few seconds_, Copilot plugin should start working since then.\n\n## Copilot Chat\n\nClicking the Copilot icon in the toolbar will toggle the Copilot Chat panel. You can use it to chat with Copilot, and the current document and previous chat history will be sent to Copilot as context.\n\nMake sure you have signed in to Copilot before using the Copilot Chat panel. After signing in, restart Typora to make sure the Copilot Chat panel works properly.\n\nYou can:\n\n- Select, create, edit chat title, or delete a chat session from the dropdown list at the top of the panel.\n- Click the “Send” button or press \u003ckbd\u003eEnter\u003c/kbd\u003e to send the message. (You can use \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eEnter\u003c/kbd\u003e or \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eEnter\u003c/kbd\u003e to insert a new line.)\n- Click the “Stop” button to stop the current request.\n- Select a prompt style from the dropdown list at the bottom of the panel.\n- Pick the model you want to use from the dropdown list at the bottom of the panel.\n\n## Uninstallation\n\n### Automated Uninstallation (Recommended)\n\nTo uninstall the plugin, you can just copy and paste the following command into your terminal:\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eWindows\u003c/strong\u003e\u003c/summary\u003e\n\nRun the following command in PowerShell **as administrator**:\n\n```powershell\niwr -Uri \"https://raw.githubusercontent.com/Snowflyt/typora-copilot/main/bin/uninstall_windows.ps1\" | iex\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/summary\u003e\n\nRun the following command in your terminal:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Snowflyt/typora-copilot/main/bin/uninstall_macos.sh | sudo bash\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eLinux\u003c/strong\u003e\u003c/summary\u003e\n\nRun the following command in your terminal:\n\n```bash\nwget -O - https://raw.githubusercontent.com/Snowflyt/typora-copilot/main/bin/uninstall_linux.sh | sudo bash\n```\n\n\u003c/details\u003e\n\n### Script Uninstall\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eWindows\u003c/strong\u003e\u003c/summary\u003e\n\nFor Windows users, locate to the installation directory of the plugin and run the following command in PowerShell **as administrator**.\n\n```powershell\n.\\bin\\uninstall_windows.ps1\n```\n\nYou can still specify the path to Typora manually by adding `-Path` or `-p`, just like the installation script.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/summary\u003e\n\nFor macOS users, locate to the installation directory of the plugin and run the following command in terminal.\n\n```bash\nsudo bash ./bin/uninstall_macos.sh\n```\n\nYou can still specify the path to Typora manually by adding `--path` or `-p`, just like the installation script.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eLinux\u003c/strong\u003e\u003c/summary\u003e\n\nFor Linux users, locate to the installation directory of the plugin and run the following command in terminal.\n\n```bash\nsudo bash ./bin/uninstall_linux.sh\n```\n\nYou can still specify the path to Typora manually by adding `--path` or `-p`, just like the installation script.\n\n\u003c/details\u003e\n\n### Manual Uninstall\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand\u003c/summary\u003e\n\n1. For Windows / Linux users, find `window.html` in your Typora installation folder, usually located at `\u003ctypora_root_path\u003e/resources/`; For macOS users, find `index.html` in your Typora installation folder, usually located at `\u003ctypora_root_path\u003e/Contents/Resources/TypeMark/`. `\u003ctypora_root_path\u003e` is the path where Typora is installed, replace it with your real Typora installation path (note that the angle brackets `\u003c` and `\u003e` should also be removed). This folder is called Typora resource folder in the following steps.\n2. Delete the `copilot` folder in Typora resource folder.\n3. For Windows / Linux users, open the previous `window.html` file you found in Typora resource folder with a text editor, and delete `\u003cscript src=\"./copilot/index.js\" defer=\"defer\"\u003e\u003c/script\u003e`; For macOS users, open the previous `index.html` file you found in Typora resource folder with a text editor, and delete `\u003cscript src=\"./copilot/index.js\" defer\u003e\u003c/script\u003e`.\n4. Restart Typora.\n\u003c/details\u003e\n\n## Known Issues\n\n1. Sometimes accepting a suggestion may cause the editor rerendering (i.e. code blocks, math blocks, etc. will be rerendered). This is due to the limitation of Typora's API that I have to force the editor to rerender sometimes to accept a suggestion, and currently I can't find a more safe and efficient way to resolve this issue.\n\n## FAQs\n\n### How to temporarily disable Copilot?\n\nJust click the Copilot icon in the toolbar, and then click “Disable completions”. You can enable it again by clicking the icon and then clicking “Enable completions”.\n\n### Why use suggestion panel in live preview mode (normal mode) and completion text in source mode by default? Can I change that?\n\nThe usage of suggestion panel in live preview mode is intentional. Typora uses a complex mechanism to render the content in live preview mode, it is hard to make completion text work properly in live preview mode.\n\nBut it is possible to also use suggestion panel in source mode, you can click the `toolbar icon -\u003e Settings` and toggle the `Use inline completion text in source mode` option.\n\nAn option called `Use inline completion text in preview code blocks` is also provided. If you enable this option, the completion text instead of suggestion panel will also be used in code blocks and math blocks in live preview mode. But it is currently not recommended to enable this option, as it is likely to corrupt the editor content or history.\n\n### Can I use keys other than `Tab` to accept suggestions?\n\nCurrently, no. It is technically possible, but currently I don't have enough time to implement it. Maybe I will implement it in the future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSnowflyt%2Ftypora-copilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSnowflyt%2Ftypora-copilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSnowflyt%2Ftypora-copilot/lists"}