CodeStash Settings

AI Provider (Code Explanation)

Optional: AI can explain code snippets, suggest improvements, and more.
REQUIRED: Allow this extension in Ollama
Ollama blocks browser extensions by default. You must set the environment variable OLLAMA_ORIGINS=chrome-extension://* to allow Chrome extensions. Without this step you get a 403 error.
Windows (recommended way via GUI):
  1. Install Ollama from ollama.com
  2. Quit Ollama completely (System Tray bottom-right → right-click Ollama icon → Quit)
  3. Press Win key, type environment variables, open "Edit the system environment variables"
  4. Click "Environment Variables..." button
  5. Under "User variables" click "New..." and enter:
    Name: OLLAMA_ORIGINS Value: chrome-extension://*
  6. Click OK three times to close all dialogs
  7. Start Ollama again (from Start Menu) — if Ollama autostarts, you may need to restart Windows for it to pick up the new variable
  8. Pull a model (open cmd or PowerShell):
    ollama pull llama3
  9. Reload this extension at chrome://extensions (click the reload icon)
Mac:
launchctl setenv OLLAMA_ORIGINS "chrome-extension://*"
Then quit Ollama from the menu bar and restart it.
Linux:
systemctl edit ollama.service # add under [Service]: Environment="OLLAMA_ORIGINS=chrome-extension://*" # then: systemctl daemon-reload && systemctl restart ollama
Still getting 403? Click here for troubleshooting
  • Did Ollama actually restart? The new variable only takes effect after a full restart. On Windows, restart your PC to be sure.
  • Verify the variable was set: Open a NEW cmd/PowerShell window and run echo %OLLAMA_ORIGINS% — must print chrome-extension://*
  • Direct test: Open http://127.0.0.1:11434/api/tags in browser — JSON response = Ollama is running
  • Try the wildcard for testing only: set value to * instead of chrome-extension://*
  • Ollama running as Windows Service? Open services.msc → find Ollama → Restart
  • Firewall/Antivirus blocking port 11434? Add an exception
FREE & 100% private — runs entirely on your computer, no data leaves your PC.
Setup Ollama (Network):
1. On the OTHER computer: install Ollama from ollama.com
2. Set: OLLAMA_HOST=0.0.0.0 and OLLAMA_ORIGINS=*
3. Restart Ollama, pull a model: ollama pull llama3
FREE - runs on another PC in your network

Scan your local network for Ollama instances.

Setup LM Studio:
1. Download from lmstudio.ai
2. Download a model and start the local server (http://localhost:1234)
FREE - runs on your computer, 100% private
Leave empty to use whatever model is loaded.
Setup Groq:
1. Go to console.groq.com/keys
2. Click "Create API Key"
3. Copy the key and paste it below
FREE - generous free tier, extremely fast
Setup OpenAI:
1. Go to platform.openai.com/api-keys
2. Create a new API key
PAID - pay per use, from ~$0.15/1M tokens
Setup Anthropic:
1. Go to console.anthropic.com/settings/keys
2. Create a new API key
PAID - pay per use, from ~$0.25/1M tokens
Setup Google Gemini:
1. Go to aistudio.google.com/apikey
2. Click "Create API Key"
FREE TIER - free up to 15 requests/min
Setup OpenRouter:
1. Go to openrouter.ai/keys
2. Create an account (free) and generate an API key
FREE TIER - many free models available
Setup Mistral AI:
1. Go to console.mistral.ai/api-keys
2. Create an account and generate an API key
PAID - European AI, pay per use
Setup DeepSeek:
1. Go to platform.deepseek.com/api_keys
2. Create an account and generate an API key
PAID - very budget-friendly, ~$0.07/1M tokens
Setup Together AI:
1. Go to api.together.xyz/settings/api-keys
2. Create an account and generate an API key
PAID - open source models, $5 free credit
Setup Cohere:
1. Go to dashboard.cohere.com/api-keys
2. Create an account and generate an API key
PAID - enterprise AI, trial key available

General

Language used when auto-detection is uncertain.

Tag Management

Your saved tags from all snippets. Remove tags you no longer need.

Appearance

Dark Theme
Toggle between dark and light

Data