{"id":18265312,"url":"https://github.com/exafunction/codeium-react-code-editor","last_synced_at":"2025-04-09T09:07:07.787Z","repository":{"id":217716919,"uuid":"730429065","full_name":"Exafunction/codeium-react-code-editor","owner":"Exafunction","description":"AI-enabled code editor for React. Unlimited AI autocomplete capabilities with full Typescript support.","archived":false,"fork":false,"pushed_at":"2024-02-16T19:33:38.000Z","size":4260,"stargazers_count":110,"open_issues_count":4,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T03:07:35.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Exafunction.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}},"created_at":"2023-12-11T22:51:47.000Z","updated_at":"2024-04-13T06:24:10.000Z","dependencies_parsed_at":"2024-02-16T14:43:39.594Z","dependency_job_id":"16215ef7-d2ca-4215-a7de-c080e4aae2e5","html_url":"https://github.com/Exafunction/codeium-react-code-editor","commit_stats":null,"previous_names":["exafunction/codeium-react-code-editor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exafunction%2Fcodeium-react-code-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exafunction%2Fcodeium-react-code-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exafunction%2Fcodeium-react-code-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exafunction%2Fcodeium-react-code-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Exafunction","download_url":"https://codeload.github.com/Exafunction/codeium-react-code-editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008631,"owners_count":21032556,"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":[],"created_at":"2024-11-05T11:17:47.987Z","updated_at":"2025-04-09T09:07:07.767Z","avatar_url":"https://github.com/Exafunction.png","language":"TypeScript","readme":"# Codeium Editor\n\n[![built with Codeium](https://codeium.com/badges/main)](https://codeium.com?referrer=github)\n\n[![NPM](https://nodei.co/npm/@codeium/react-code-editor.png?downloads=true)](https://www.npmjs.com/package/@codeium/react-code-editor)\n\nCodeium React Code Editor is a free, open-source code editor as a React component with unlimited AI autocomplete. Brought to you by the team at [Codeium](https://www.codeium.com/). **Free with no account required.**. All you need to do is install our NPM package, add it to your website and you're good to go!\n\n![codeium demo](docs/codeium_playground.gif)\n\n## Features\n\n- Unlimited AI autocomplete (no account required)\n- Customizable API extended from [Monaco React](https://github.com/suren-atoyan/monaco-react?tab=readme-ov-file#editor)\n\n## Demo\n\nCheck it out [here](https://codeium.com/playground)!\n\n## Getting Started\n\nInstall using any of these package manager.s\n\n```sh\n# NPM\nnpm install @codeium/react-code-editor\n\n# Yarn\nyarn add @codeium/react-code-editor\n\n# PNPM\npnpm install @codeium/react-code-editor\n```\n\nNow import the `CodeiumEditor` and enjoy lightning fast AI autocomplete, directly in your browser, 100% for free!\n\n```tsx\nimport { CodeiumEditor } from \"@codeium/react-code-editor\";\n\nexport const IdeWithAutocomplete = () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003eHere's an AI-powered Python editor using Codeium.\u003c/p\u003e\n      \u003cCodeiumEditor language=\"python\" theme=\"vs-dark\" /\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\nHere's an advanced example that uses multi-document context to provide more intelligent autocompletion:\n\n```tsx\nimport { CodeiumEditor, Document, Language } from \"@codeium/react-code-editor\";\n\nexport const JavaScriptEditorWithContext = () =\u003e {\n  const html = `\u003chtml\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eContact Us\u003c/h1\u003e\n    \u003cform\u003e\n      \u003clabel\u003eName:\u003c/label\u003e\n      \u003cinput id=\"name\" type=\"text\" /\u003e\n      \u003clabel\u003eEmail:\u003c/label\u003e\n      \u003cinput id=\"email\" type=\"text\" /\u003e\n    \u003c/form\u003e\n  \u003c/body\u003e\n\u003c/html\u003e`;\n\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003eThis editor has context awareness of a neighboring HTML file and can provide better autocompletion suggestions.\u003c/p\u003e\n      \u003cCodeiumEditor\n        language=\"javascript\"\n        theme=\"vs-dark\"\n        otherDocuments={[\n          new Document({\n            absolutePath: \"/app/index.html\",\n            relativePath: \"index.html\",\n            text: html,\n            editorLanguage: \"html\",\n            language: Language.HTML,\n          }),\n        ]}\n      /\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\nNote that the `otherDocuments` prop has a limit of 10 documents. Within those documents, Codeium will run a reranker behind the scenes to optimize what is included in the token limit.\n\n### Examples\n\nHere are some examples of Codeium React Editor used in production:\n\n- [https://khou22.com/programming/codeium](https://khou22.com/programming/codeium?referrer=github) [[src](https://github.com/khou22/khou22.github.io/blob/b2352449d101f7f9cf8a9382f031091d7dd4cfdd/src/app/programming/codeium/page.tsx#L20)]\n\n## How it works\n\nThis project is a wrapper around Microsoft's Monaco editor which is the editor that powers VS Code with the extended capability of providing code autocompletion.\n\nThe autocompletes are provided by analyzing the editor's content and predicting and providing suggestions based on that context. To learn more about how the autocompletion works, visit [Codeium's FAQ](https://codeium.com/faq).\n\n## What is Codeium\n\n[Codeium](https://www.codeium.com?referrer=github) is a free, AI-powered developer toolkit that plugs into 70+ IDEs, including: Visual Studio Code, JetBrains IDEs, Google Colab, and Vim. Codeium provides unlimited AI context-aware autocomplete, chat assistant, intelligent search, codebase indexing, and more. Codeium also offers flexible deployments within your VPC or in on-prem, airgapped environments. Learn more at [codeium.com](https://www.codeium.com?referrer=github).\n\n## API\n\nThe core API of the editor is the same as that of the wrapped project. You can view the editor API [here](https://github.com/suren-atoyan/monaco-react?tab=readme-ov-file#editor).\n\n## FAQ\n\n#### How can I import the ESM version of this?\n\nTo import the ESM version of this, you can use `import { CodeiumEditor } from \"@codeium/react-code-editor/dist/esm\";`. If you're using TypeScript, your editor might warn that the types are missing. A current workaround is:\n\n- Create a `codeiumeditor.d.ts` file,\n- Add `declare module '@codeium/react-code-editor/dist/esm';` to the file\n- Import the types file in the file using the `CodeiumEditor` component.\n\nThis is an open issue in terms of supporting both CommonJS and ESM. If you're interested in contributing and have a fix for this, pull requests are welcome.\n\n## Acknowledgements\n\nThis project would not have been possible without [Suren Atoyan's Monaco React project](https://github.com/suren-atoyan/monaco-react).\n\n## Issues\n\nCreate issues in this repositories for anything related to autocompletion functionality. If you have any issues with the editor API or functionality, create an issue in the [editor repository](https://github.com/suren-atoyan/monaco-react).\n\n## License\n\n[License](https://github.com/Exafunction/codeium-react-editor/blob/main/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexafunction%2Fcodeium-react-code-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexafunction%2Fcodeium-react-code-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexafunction%2Fcodeium-react-code-editor/lists"}