dstalk.top is the official website for the dstalk project

dstalk

An AI coding CLI powered by DeepSeek V4 and compatible with OpenAI / Anthropic APIs. The core is written in C11 / C++20 and ships dstalk-core.dll as a plugin host that exposes a stable C ABI. Nine functional plugins (AI, networking, LSP, sessions, files, tools, and more) compile to standalone DLLs and plug into the CLI, the SDL3 GUI, and any third-party host.

v0.1.0 C11 / C++20 Plugin host + C ABI 9 plugins GPL v3.0
Coredstalk-core.dll (plugin host) FrontendsCLI + SDL3 GUI Pluginsdeepseek · anthropic · network · lsp · session · context · config · file-io · tools
dstalk-cli
$ build/dstalk-cli/dstalk-cli.exe config.toml

dstalk v0.1.0  |  DeepSeek V4  |  /help for help

> Explain the role of dstalk-core
thinking...
AI: dstalk-core is the plugin host. It handles plugin
    loading, service registry, the event bus, and
    configuration. AI, networking, sessions, LSP, and
    file I/O are provided by standalone plugin DLLs;
    frontends only deal with input and rendering.

> /file read dstalk-core/include/dstalk/dstalk_api.h
--- dstalk-core/include/dstalk/dstalk_api.h ---

Why rebuild an AI coding assistant in C/C++?

dstalk is positioned alongside tools like Claude Code, OpenCode, and KiloCode, but uses a systems-language implementation and a plugin-host architecture to optimize startup time, runtime footprint, embeddability, and long-running terminal workflows.

C

No Node.js runtime

The core is built with C11 / C++20 for fast startup and lower memory usage in long-lived terminal sessions.

ABI

Stable C ABI

Public functions such as dstalk_init, dstalk_chat, and dstalk_file_read make it easy to embed from C/C++, Python, Rust, C#, and Go.

AI

Compatible AI APIs

Two AI plugins ship in the box: DeepSeek and Anthropic, with OpenAI-style compatibility. Switch providers via ai.provider in config.toml.

CLI

CLI and GUI frontends

dstalk-cli is an ANSI terminal UI; dstalk-gui is a cross-platform SDL3 window. Both share the same plugin host and core capabilities.

PLG

Plugin host

The core only handles plugin loading, service registry, event bus, and configuration. AI, networking, LSP, and sessions are independent DLLs you can replace or extend.

OSS

Open source and hackable

Released under GNU GPL v3.0, with example plugins, unit tests, and tutorial docs. Suitable for learning, customization, and local workflow extensions.

Quick Start

dstalk provides an automated toolchain script and a one-command build script. Keep API keys in local config.toml or a secure environment, and never commit them to the repository.

1

Install the local toolchain

Run setup.bat inside the tools directory to download CMake, Ninja, LLVM/Clang, and Conan2.

2

Build dstalk

Run build.bat to install Conan dependencies, configure CMake, and build with Ninja.

3

Start the CLI

Run build/dstalk-cli/dstalk-cli.exe with config.toml, or let it use the default config lookup.

quickstart
# Install toolchain
cd tools
setup.bat

# Return to repo root and build
cd ..
build.bat

# Create config.toml
[api]
base_url = "https://api.deepseek.com/v1"
api_key = "sk-xxxxxxxx"
model = "deepseek-chat"

# Run CLI
build/dstalk-cli/dstalk-cli.exe config.toml

Plugin host + decoupled multi-frontend architecture

dstalk-core.dll acts as a plugin host responsible for plugin loading, service registry, event bus, and configuration. Nine functional plugins — AI, networking, LSP, sessions, files, tools, and more — compile to standalone DLLs, while frontends reach the core only through the C ABI. The GUI is opt-in via the CMake option DSTALK_BUILD_GUI.

architecture
┌─────────────────────────────────────────────────────┐
│ Frontends                                            │
│  dstalk-cli (ANSI UI)        dstalk-gui (SDL3)       │
└───────────────────────┬─────────────────────────────┘
                        │ C ABI
┌───────────────────────▼─────────────────────────────┐
│ dstalk-core.dll  —  Plugin Host                     │
│  Plugin Loader · Service Registry · Event Bus ·     │
│  Config Manager                                      │
└──┬───────┬───────┬───────┬───────┬───────┬──────────┘
   ▼       ▼       ▼       ▼       ▼       ▼
 deepseek  anthropic  network  lsp     session  context
 (ai)      (ai)       (http)   client
   ▼       ▼       ▼
 config  file-io  tools
   │       │       │
   └── Boost.JSON / Boost.Asio / Beast / OpenSSL TLS ──┘

Tech stack and project status

The following is based on dstalk's CMake files, Conan configuration, and public API header.

ModuleCurrent technologyStatus
Core libraryC11 / C++20, dstalk-core.dll, plugin host, public C ABIEnabled
CLI frontendANSI terminal UI using dstalk/dstalk_api.hEnabled
GUI frontendSDL3 graphical frontend, enabled via CMake option DSTALK_BUILD_GUIIn place
Plugins9 functional plugins (deepseek · anthropic · network · lsp · session · context · config · file-io · tools), standalone DLLsEnabled
Teststests/ ships host_api_test and smoke_test, integrated with CTestEnabled
Docsdocs/tutorial, docs/reference (commands, plugin-abi)Published
Examplesexamples/example_plugin shows a plugin templateAvailable
DependenciesConan2, boost/1.86.0, openssl/3.4.1Configured
Build systemCMake 3.21+, Ninja, LLVM/Clang, CMakePresetsConfigured
LicenseGNU GPL v3.0Confirmed

Common CLI commands

In addition to natural-language prompts, dstalk-cli provides commands for files, models, and session management.

CommandsDescriptionExample
/helpShow help/help
/clearClear the current conversation context/clear
/model <name>Switch the current model/model deepseek-chat
/file read <path>Read file content and print it to the terminal/file read README.md
/file write <path> <content>Write content to a file/file write note.txt hello
/save <path> / /load <path>Save or restore a session/save session.json

Public C API

dstalk-core exposes functions through dstalk-core/include/dstalk/dstalk_api.h, so frontends and third-party hosts call the same core interface.

dstalk_api.h
int  dstalk_init(const char* config_path);
void dstalk_destroy(void);

void dstalk_set_api_key(const char* api_key);
void dstalk_set_base_url(const char* base_url);
void dstalk_set_model(const char* model);

int  dstalk_chat(const char* input, char** output);
int  dstalk_chat_stream(const char* input, dstalk_stream_cb cb, void* userdata);
void dstalk_free_string(char* str);

void dstalk_session_clear(void);
int  dstalk_session_save(const char* path);
int  dstalk_session_load(const char* path);

int  dstalk_file_read(const char* path, char** content);
int  dstalk_file_write(const char* path, const char* content);

Roadmap

The plugin host, CLI, SDL3 GUI, nine core plugins, tests, and documentation are already in place. Future work focuses on deeper capabilities and ecosystem expansion.

PhaseScopeStatus
SkeletonProject skeleton, CMake/Ninja build, Conan dependencies, DLL exports, frontend main loopDone
Plugin hostPlugin loader, service registry, event bus, configuration; 9 core plugins (deepseek · anthropic · network · lsp · session · context · config · file-io · tools)Done
Chat capabilityHTTPS networking, DeepSeek / Anthropic API adapters, streaming output, multi-turn sessions, file I/O toolsAvailable
GUI frontendSDL3 graphical window (DSTALK_BUILD_GUI), sharing the same plugin host as the CLIIn progress
Next phaseDeeper LSP integration, third-party plugin SDK, cross-platform distribution, ongoing documentationPlanned

Open source contributors welcome

dstalk is an open project. Developers interested in C/C++, terminal UX, AI API adapters, GUI, documentation, and testing are welcome to participate.

PR

Improve the codebase

The core, CLI, SDL3 GUI, and nine plugins (AI, networking, LSP, sessions, files, tools, and more) all welcome patches; build scripts and cross-platform compatibility have headroom too.

PLG

Build new plugins

Use examples/example_plugin and docs/reference/plugin-abi.md as a starting point — register new services through the C ABI to bring your own models, tools, or data sources into dstalk.

DOC

Improve docs and tests

docs/tutorial and docs/reference are taking shape; help expand tutorials, command references, plugin-ABI notes, and the coverage of host_api_test / smoke_test.

Start in the terminal, embed dstalk everywhere

dstalk is more than a CLI. It is a local AI coding core that can be reused by multiple frontends. dstalk.top will keep tracking project progress, build instructions, and available capabilities.