← 开源

Simple proxy worker for using ollama in cursor

InfrastructureGatewayTypeScript
增长势头
+-124 小时新增 Star-0.2%
416
Star
51
Fork
+-1
本周
3
贡献者
创建于 2024-04-19 · 更新于 2026-12-05 · 今日第 28557 名
主要开发者
README

curxy

cursor + proxy = curxy

An proxy worker for using ollama in cursor

What is this?

This is a proxy worker for using ollama in cursor. It is a simple server that forwards requests to the ollama server and returns the response.

Why do you need this?

When we use llm prediction on cusor editor, the editor sends to the data to the official cursor server, and the server sends the data to the ollama server. Therefore, even if the endpoint is set to localhost in the cursor editor configuration, the cursor server cannot send communication to the local server. So, we need a proxy worker that can forward the data to the ollama server.

requirements

  • deno
  • ollama server

How to use

  1. Launch the ollama server

  2. Launch curxy

    deno run -A jsr:@ryoppippi/curxy

    if you limit the access to the ollama server, you can set OPENAI_API_KEY environment variable.

    OPENAI_API_KEY=your_openai_api_key deno run -A jsr:@ryoppippi/curxy
    
    Listening on http://127.0.0.1:62192/
    ◐ Starting cloudflared tunnel to http://127.0.0.1:62192                                                                                                                                                                                                                                                           5:39:59 PM
    Server running at: https://remaining-chen-composition-dressed.trycloudflare.com

    You can get the public URL hosted by cloudflare.

  3. Enter the URL provided by curxy with /v1 appended to it into the "Override OpenAl Base URL" section of the cursor editor configuration.

  1. Add model names you want to "Model Names" section of the cursor editor configuration.

  1. (Optional): Additionally, if you want to restrict access to this Proxy Server for security reasons, you can set the OPENAI_API_KEY as an environment variable, which will enable access restrictions based on the key.

  2. Enjoy!

Also, you can see help message by deno run -A jsr:@ryoppippi/curxy --help

Related

Japanese Article

Sponsors

License

MIT

排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载