Fork of zed-extensions/perplexity
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
zed-zippy[bot] add652ab6a
Update CI workflows to 3183c04 (#15)
This PR updates the CI workflow files from the main Zed repository
based on the commit
zed-industries/zed@3183c04515

The update includes a new version of the extension CLI which adds
validation for semantic token rules for languages

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-25 18:56:15 +00:00
.github/workflows Update CI workflows to 3183c04 (#15) 2026-03-25 18:56:15 +00:00
src Fix warnings (#4) 2025-07-08 12:50:00 -04:00
.gitignore Fix for move to new repo (#3) 2025-07-08 12:44:52 -04:00
Cargo.lock v0.2.0 (#5) 2025-07-08 12:51:13 -04:00
Cargo.toml v0.2.0 (#5) 2025-07-08 12:51:13 -04:00
extension.toml v0.2.0 (#5) 2025-07-08 12:51:13 -04:00
LICENSE-APACHE Update license year (zed-industries/zed#24191) 2025-02-04 09:02:59 -05:00
README.md Switch to non-deprecated model (sonar) (#1) 2025-07-08 12:33:30 -04:00

Zed Perplexity Extension

This example extension adds the /perplexity slash command to the Zed AI assistant.

Usage

Open the AI Assistant panel (cmd-r or ctrl-r) and enter:

/perplexity What's the weather in Boulder, CO tomorrow evening?

Development Setup

  1. Install the Rust toolchain and clone the zed repo:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
    mkdir -p ~/code
    cd ~/code
    git clone https://github.com/zed-industries/zed
    
  2. Open Zed

  3. Open Zed Extensions (cmd-shift-x / ctrl-shift-x)

  4. Click "Install Dev Extension"

  5. Navigate to the "extensions/perplexity" folder inside the zed git repo.

  6. Ensure your PERPLEXITY_API_KEY environment variable is set (instructions below)

    env | grep PERPLEXITY_API_KEY
    
  7. Quit and relaunch Zed

PERPLEXITY_API_KEY

This extension requires a Perplexity API key to be available via the PERPLEXITY_API_KEY environment variable.

To obtain a Perplexity.ai API token, login to your Perplexity.ai account and go Settings->API and under "API Keys" click "Generate". This will require you to have Perplexity Pro or to buy API credits. By default the extension uses sonar, currently cheapest model available which is $0.008 per request (less than a penny) + a penny per 10,000 tokens. So most requests will cost $0.01 - $0.02 USD.

Take your API key and add it to your environment by adding export PERPLEXITY_API_KEY="pplx-0123456789abcdef..." to your ~/.zshrc or ~/.bashrc. Reload close and reopen your terminal session. Check with env |grep PERPLEXITY_API_KEY.