Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Docs: Add guide to Codeium API key from VS Code (#2458)

Ryan Parkera05ff0faf19d
diff --git a/docs/_static/docs-ai-completion-codeium-vscode-dark.png b/docs/_static/docs-ai-completion-codeium-vscode-dark.png
new file mode 100644
index 0000000000..fe40294851
Binary files /dev/null and b/docs/_static/docs-ai-completion-codeium-vscode-dark.png differ
diff --git a/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics-dark.png b/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics-dark.png
new file mode 100644
index 0000000000..2c0bb58895
Binary files /dev/null and b/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics-dark.png differ
diff --git a/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics.png b/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics.png
new file mode 100644
index 0000000000..176d4f6b28
Binary files /dev/null and b/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics.png differ
diff --git a/docs/_static/docs-ai-completion-codeium-vscode.png b/docs/_static/docs-ai-completion-codeium-vscode.png
new file mode 100644
index 0000000000..ba6763fccc
Binary files /dev/null and b/docs/_static/docs-ai-completion-codeium-vscode.png differ
diff --git a/docs/guides/editor_features/ai_completion.md b/docs/guides/editor_features/ai_completion.md
index 1131df68c5..3b724e87a2 100644
--- a/docs/guides/editor_features/ai_completion.md
+++ b/docs/guides/editor_features/ai_completion.md
@@ -35,6 +35,37 @@ copilot = "codeium"
codeium_api_key = ""
```
+### Alternative: Obtain Codeium API key using VS Code
+1. Go to the Codeium website and sign up for an account: <https://codeium.com/>
+2. Install the [Codeium Visual Studio Code extension](vscode:extension/codeium.codeium) (see [here](https://codeium.com/vscode_tutorial) for complete guide)
+3. Sign in to your Codeium account in the VS Code extension
+4. Select the Codeium icon on the Activity bar (left side), which opens the Codeium pane
+5. Select the **Settings** button (gear icon) in the top-right corner of the Codeium pane
+
+<div align="center">
+<figure>
+<img src="/docs/_static/docs-ai-completion-codeium-vscode.png">
+</figure>
+</div>
+
+6. Click the **Download** link under the **Extension Diagnostics** section
+7. Open the diagnostic file and search for `apiKey` (it will look similar to the value shown in the image below, which was randomly generated and not an actual API key)
+
+<div align="center">
+<figure>
+<img src="/docs/_static/docs-ai-completion-codeium-vscode-download-diagnostics.png">
+</figure>
+</div>
+
+8. Copy the value of the `apiKey` to `.marimo.toml` in your home directory
+
+```toml
+[completion]
+codeium_api_key = "a1e8..." # <-- paste your API key here
+copilot = "codeium"
+activate_on_typing = true
+```
+
## Generate code with our AI assistant
marimo has built-in support for generating and refactoring code with AI, with a