diff --git a/en.html b/en.html new file mode 100644 index 0000000..0b09de9 --- /dev/null +++ b/en.html @@ -0,0 +1,436 @@ + + + + + + + + + + + + + +dstalk — DeepSeek V4 AI Coding CLI + + + + + +
+
+
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 exposes a stable C ABI through dstalk-core.dll, so the CLI, GUI, and third-party tools can share the same local AI coding engine.

+ +
+ v0.1.0 + C11 / C++20 + CDLL + C ABI + GPL v3.0 +
+
+ CurrentPhase 1 + Coredstalk-core.dll + FrontendCLI available +
+
+
+
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 handles configuration, sessions, file I/O,
+    HTTP transport, and the DeepSeek API adapter.
+    Frontends only handle input and rendering.
+
+> /file read dstalk-core/src/api.cpp
+--- dstalk-core/src/api.cpp ---
+
+
+ +
+
+
+

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 CDLL 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

DeepSeek V4 is the primary target, with OpenAI / Anthropic-style APIs configurable through base_url, api_key, and model settings.

+
CLI

CLI-first workflow

The current CLI uses ANSI terminal UI and supports natural-language chat, model switching, file I/O, and session save/load.

+
DLL

Decoupled frontends

The CLI and GUI do not own business logic. They call the same dstalk-core.dll, allowing additional hosts to be added later.

+
OSS

Open source and hackable

dstalk is released under GNU GPL v3.0 and welcomes learning, customization, and workflow-specific 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
+
+
+
+ +
+
+

CDLL + decoupled multi-frontend architecture

+

dstalk-core.dll provides networking, AI API adaptation, file I/O, and session management. Frontends focus on interaction. The GUI directory is reserved, while the root CMake currently enables the CLI and core library first.

+
+
+
architecture
+
┌─────────────────────────────────────────────┐
+│ Frontends                                    │
+│  dstalk-cli (ANSI UI)     dstalk-gui (SDL3)  │
+│  enabled today             roadmap           │
+└───────────────┬─────────────────────────────┘
+                │ C ABI
+┌───────────────▼─────────────────────────────┐
+│ dstalk-core.dll                              │
+│  API / Session / File I/O / AI Adapter       │
+└───────┬──────────────┬──────────────┬────────┘
+        │              │              │
+    Boost.JSON     HTTP Client     OpenSSL TLS
+                  Boost.Asio / Beast
+
+
+ +
+
+

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, public C ABIEnabled
CLI frontendANSI terminal UI using dstalk/dstalk_api.hEnabled
GUI frontendSDL3 graphical frontendRoadmap
DependenciesConan2, boost/1.86.0, openssl/3.4.1Configured
Build systemCMake 3.21+, Ninja, LLVM/ClangConfigured
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 website reflects dstalk's current README roadmap and avoids presenting planned capabilities as already complete.

+
+
+ + + + + + +
PhaseScopeStatus
Phase 1Project skeleton, CMake build, DLL exports, frontend main loopCurrent
Phase 2HTTPS networking, DeepSeek API integration, basic chatIn progress
Phase 3Streaming output, multi-turn sessions, file tools, CLI experience polishPlanned
Phase 4SDL3 GUI, plugin system, LSP integrationPlanned
+
+
+ +
+
+

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

Good starting points include build scripts, error handling, CLI interaction, streaming output, file tools, and cross-platform compatibility.

+
DOC

Improve docs and examples

Installation notes, config templates, API examples, and real usage scenarios all help new users get started faster.

+
IDEA

Discuss the roadmap

If you care about the SDL3 GUI, plugin system, LSP integration, or multi-model adapters, issues and design suggestions are welcome.

+
+ +
+ +
+

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.

+ +
+
+ + + + diff --git a/index.html b/index.html index d81cbd4..a50ffd4 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,8 @@ + + dstalk — DeepSeek V4 AI 编程 CLI