Skip to content

gvcgo/fcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

中文|En

What is fcode?

  • fcode is an adapter for the lsp‑ai project. It supports Fitten Code, Cloudflare AI Workers, and other large‑model APIs compatible with the OpenAI interface, such as Meituan’s LongCat, Alibaba’s ModelScope (qwen), Google’s Gemini, OpenAI, etc.

What benefits does fcode bring?

  • Fitten Code, which originally does not work with lsp‑ai, can now be used within lsp‑ai.
  • Cloudflare AI Workers, previously unsupported, can also be used with lsp‑ai.
  • Quickly and seamlessly switch between different models/APIs.
  • Allows setting a local proxy for individual models (friendly for users in mainland China).

How to use

  • Edit the configuration file
mkdir -p ~/.fcode
cd ~/.fcode
touch conf.toml
# Copy the contents of conf_example/conf.toml into this file and modify username, password, key, etc. You can add or remove model configurations as needed.

Commands provided by fcode

fcode -h   
Usage:
   [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  list        List available model names.
  serve       Run server for lsp-ai.
  show        Show config file path.
  stop        Stop fcode server.
  use         Use an available model.

Flags:
  -h, --help   help for this command

Use " [command] --help" for more information about a command.

lsp‑ai conf

# See conf_example/helix_languages.toml

Installation

go install github.com/gvcgo/fcode@latest

Start the local service

fcode stop && fcode serve>/dev/null 2>&1 &
# I prefer alias for helix:
# alias hx="fcode stop && fcode serve>/dev/null 2>&1 & ; hx"

Gallery

  • Fitten Code

    fitten

  • Chat

    chat

Releases

No releases published

Packages

No packages published