- 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.
- 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).
- 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.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.- Example for the Helix editor
# See conf_example/helix_languages.toml
go install github.com/gvcgo/fcode@latestfcode stop && fcode serve>/dev/null 2>&1 &
# I prefer alias for helix:
# alias hx="fcode stop && fcode serve>/dev/null 2>&1 & ; hx"
