dscli

command module
v0.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

README ยถ

dscli โ€” AI-Powered Developer Toolbox

     o
    /|\
     |   +---------------+
    / \  | dscli tools   |
 ~~~~~~~~~| AI assistant  |
dscli    +---------------+

๐ŸŽฏ What is dscli?

dscli is an intelligent CLI tool powered by the DeepSeek API, combining an AI coding assistant, code analysis, and project management in one.

  1. AI Coding Assistant โ€” Deep integration with DeepSeek, supporting tool-calling multi-turn conversations
  2. Developer Toolbox โ€” File operations, code search, Git management, static analysis, Shell execution
  3. Session Memory โ€” Project-level conversation history, note system, cross-session recall
  4. Customizable โ€” Custom system prompts, skill system, multi-format output

Simply put: dscli = AI assistant + dev tools + session memory + CLI efficiency

๐Ÿ“ฆ Version Information

Version History
  • v0.8.0 (2026-05-17) โ€” AI personality system (32 scientists), skill author auto-fill, unified output format, git author style user display
  • v0.7.6 (2026-05-03) โ€” P0 nil panic fix, type alias cleanup, recall limits, 11 new tests
  • v0.7.5 (2026-05-03) โ€” Toolcall result truncation threshold raised to 1M context
  • v0.7.4 (2026-04-29) โ€” Package restructuring, integrated prompt/note/session
  • v0.7.3 (2026-04-15) โ€” Recall tool supports keyword search in history
  • v0.7.2 (2026-04-10) โ€” Note tool supports cross-session memory
  • v0.7.1 (2026-03-16) โ€” Test refactoring, performance improved from 27s to 6s (4.2x)
  • v0.7.0 (2026-03-16) โ€” Integrated auto code formatting toolchain, refactored shell command logic, added timeout control
  • v0.6.0 (2026-03-13) โ€” Merged vimscript branch, added vimscript language support, optimized web reader
  • v0.5.5 (2026-03-12) โ€” Fixed issues from modernize tool, code structure optimization
  • v0.5.4 (2026-03-09) โ€” Added AskExpert function, improved AI assistant interaction
  • v0.5.2 (2026-03-08) โ€” Code restructuring, separation of concerns
  • v0.5.0 (2026-02-28) โ€” Feature-complete release, 43 iterations
  • v0.4.0 โ€” Format system refactoring, multiple output modes
  • v0.3.0 โ€” Git issue management
  • v0.2.0 โ€” Enhanced AI tool calling
  • v0.1.0 โ€” Initial release

โœจ Core Features

๐Ÿค– AI Chat
  • dscli chat โ€” Multi-turn conversation with DeepSeek AI, supports tool calls (file I/O, code search, Git operations, etc.)
  • dscli fim โ€” Code completion (Fill-in-the-Middle), boost coding efficiency
  • dscli models โ€” List available AI models
  • dscli balance โ€” Check API balance and usage
๐Ÿ“ Session Management
  • dscli history โ€” Conversation history management (list / load / show / edit / update)
  • dscli history recall <keywords> โ€” Search conversation history, recall past discussions
๐Ÿ› ๏ธ Developer Tools
  • dscli flycheck <path> โ€” Static code analysis (Go with staticcheck, Python with ruff)
  • dscli skill โ€” Skill management (list / show / add / remove / query / validate / set-auto-inject / save; with YAML frontmatter author auto-fill)
  • dscli prompt โ€” System prompt management (show / edit, supports project-level and global)
  • dscli completion โ€” Generate shell completion scripts (bash / zsh / fish / powershell)
  • dscli config edit โ€” Edit configuration file
๐ŸŽจ General Features
  • Multi-format output โ€” Supports --mode markdown (default) and --mode org
  • Database support โ€” SQLite for conversation history, configuration, notes, etc.
  • Project awareness โ€” Automatically detects Git repository root, isolates conversation history per project
  • Session statistics โ€” Shows elapsed time, cost, and balance after each conversation
  • dscli version โ€” Display version and runtime information
๐ŸŽญ AI Personas

32 scientist personalities assigned randomly, each with unique character traits and email.

  • Random assignment โ€” Randomly drawn on first use, persistently bound
  • Persona injection โ€” Character descriptions automatically injected into system prompts

๐Ÿš€ Quick Start

Installation
# Option 1: go install (recommended)
go install github.com/dscli/dscli@latest

# Option 2: Build from source
git clone https://github.com/dscli/dscli.git
cd dscli
git checkout v0.8.0
make install    # installs to $GOPATH/bin

# Option 3: Download pre-built binary
# Check the Releases page for the latest version
Configuration
  1. Get a DeepSeek API key: DeepSeek Platform
  2. Set the environment variable:
export DEEPSEEK_API_KEY="your-api-key-here"

๐Ÿ“– Usage Examples

1. AI Coding Assistant
# Basic conversation (Markdown output)
echo "How to implement an HTTP server in Go?" | dscli chat

# Org mode output
echo "Explain the time complexity of this algorithm" | dscli chat --mode org

# Code completion
echo "def fibonacci(n):" | dscli fim
2. Session Management
# List conversation history
dscli history list

# Search history messages
dscli history recall "Go error handling"

# View message details
dscli history show 42

# Edit message content
dscli history edit 42
3. Skill Management
# List all skills
dscli skill list

# Search skills
dscli skill query "go fix"

# View skill details
dscli skill show go-fix

# Validate a skill
dscli skill validate go-fix

# Install skills
dscli skill add ~/src/agent-skills/skills/go-fix
dscli skill add ~/src/agent-skills/skills/go-fix --target=global

# Remove a skill
dscli skill remove go-fix

# Set auto-inject
dscli skill set-auto-inject go-fix true

# Create/update a skill (author auto-filled from git config)
dscli skill save --name my-skill --content "..." --desc "description"
4. Memory Management
# List memories for the current project
dscli memory list

# Search memories
dscli memory search "flycheck timeout"

# View full memory content
dscli memory show 1

# Memory statistics
dscli memory stats
5. Role Customization

dscli has three built-in AI roles: dev (development assistant, full tools/skills), expert (domain expert, no tools/skills), review (code review, shell+file_read/no skills). Each role has independently configurable system prompts, available tools, and skill lists.

Browse tools:

# List all available tools (categorized)
dscli tool list

# Filter by category
dscli tool list --category file

Manage prompts:

# List all prompts
dscli prompt list

# View prompt content
dscli prompt show review

# Add a new prompt based on review
dscli prompt show review | dscli prompt add editor

# Edit a prompt
dscli prompt edit editor

Configure roles:

# View current role configuration
dscli role list
dscli role show dev

dscli role update review --skills "go-fix,gofumpt" \
    --tools "shell,file_read" --prompt editor

# Reset to defaults
dscli role reset review
6. Developer Tools
# Static code analysis
dscli flycheck internal/...

# Emacs flycheck (supports 119+ languages)
dscli flycheck --emacs internal/

# Parse file structure (for LLM editing)
dscli parse main.go
dscli parse main.go -l python
7. View Models and Balance
# List available models
dscli models

# Check account balance
dscli balance

# JSON format output
dscli models --format json
dscli balance --format json
8. Configuration File

The configuration file defaults to ~/.dscli/config.dscli, auto-generated on first run via environment variables:

# Line-start comment
deepseek-api-key = sk-xxx          # Line-end comment
deepseek-base-url = https://api.deepseek.com

Format rules:

  • One key = value per line
  • # supports both line-start and line-end comments

Common configuration options:

Key Default Description
deepseek-api-key API key
context-window 1000000 Context window size (tokens)
max-tokens 393216 Max output tokens per request
user-balance true Show balance consumption after chat
deepseek-v4 true Enable V4 model

๐Ÿ”„ Workflow

  1. Project awareness โ€” Automatically detects Git repository root, establishes project context
  2. System prompts โ€” Loads project/global/default three-tier prompts, injects skills and notes
  3. Context isolation โ€” Each project has independent sessions and conversation history
  4. Tool integration โ€” AI can directly manipulate files, search code, execute Git/Shell commands
  5. Session statistics โ€” Displays elapsed time and balance consumption after each conversation

๐Ÿค Contributing

Contributions, bug reports, and feature requests are welcome! See CONTRIBUTING.md for detailed guidelines.

Apache License 2.0

๐Ÿ“ž Support


dscli โ€” Smarter, more efficient CLI development!

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
ainame
Package ainame manages AI persona names for system prompt injection.
Package ainame manages AI persona names for system prompt injection.
chimein
Package chimein ๆไพ›็”จๆˆทๆ’่ฏๅŠŸ่ƒฝใ€‚
Package chimein ๆไพ›็”จๆˆทๆ’่ฏๅŠŸ่ƒฝใ€‚
config
Package config ๆไพ› dscli ้…็ฝฎ็ฎก็†๏ผŒๅŒ…ๆ‹ฌๅ…จๅฑ€้…็ฝฎ็›ฎๅฝ• (~/.dscli) ๅ’Œ้กน็›ฎ็บง .dscli/ ็›ฎๅฝ•็š„ๅˆๅง‹ๅŒ–ๅทฅใ€‚
Package config ๆไพ› dscli ้…็ฝฎ็ฎก็†๏ผŒๅŒ…ๆ‹ฌๅ…จๅฑ€้…็ฝฎ็›ฎๅฝ• (~/.dscli) ๅ’Œ้กน็›ฎ็บง .dscli/ ็›ฎๅฝ•็š„ๅˆๅง‹ๅŒ–ๅทฅใ€‚
dsc
Package dsc provides deepseek client
Package dsc provides deepseek client
flycheck
Package flycheck provides on-the-fly syntax checking for code files, inspired by Emacs flycheck.
Package flycheck provides on-the-fly syntax checking for code files, inspired by Emacs flycheck.
gse
Package gse Go efficient multilingual NLP and text segmentation
Package gse Go efficient multilingual NLP and text segmentation
gse/hmm
Package hmm is the Golang HMM cut module
Package hmm is the Golang HMM cut module
lockfile
Package lockfile ๆไพ›้กน็›ฎ็บงไธŽๅ…จๅฑ€็บงๆ–‡ไปถ้”ใ€‚
Package lockfile ๆไพ›้กน็›ฎ็บงไธŽๅ…จๅฑ€็บงๆ–‡ไปถ้”ใ€‚
lp
Package lp provides web page reading via LightPanda's MCP transport.
Package lp provides web page reading via LightPanda's MCP transport.
mail
Package mail implements inter-AI messaging.
Package mail implements inter-AI messaging.
memories
Package memories implements persistent memory tools backed by SQLite FTS5.
Package memories implements persistent memory tools backed by SQLite FTS5.
roles
Package roles does one thing: map role names to allowed skills/tools/prompts.
Package roles does one thing: map role names to allowed skills/tools/prompts.
shell
Package shell ๆไพ›ๅฎ‰ๅ…จ็š„ Shell ่„šๆœฌๆ‰ง่กŒๅŠŸ่ƒฝ ๅŸบไบŽ mvdan/sh interp ๅฎž็Žฐ๏ผŒๆ›ฟไปฃ os/exec
Package shell ๆไพ›ๅฎ‰ๅ…จ็š„ Shell ่„šๆœฌๆ‰ง่กŒๅŠŸ่ƒฝ ๅŸบไบŽ mvdan/sh interp ๅฎž็Žฐ๏ผŒๆ›ฟไปฃ os/exec
sqlite
Package sqlite provides a declarative, lazy-initialized SQLite connection with built-in test isolation and schema migration support.
Package sqlite provides a declarative, lazy-initialized SQLite connection with built-in test isolation and schema migration support.
tokenizer
Package tokenizer is the cornerstone of Chinese full-text search in dscli.
Package tokenizer is the cornerstone of Chinese full-text search in dscli.
toolcall
Package toolcall provides toolcall framework
Package toolcall provides toolcall framework
toolcall/alltools
Package alltools to load all tools
Package alltools to load all tools
toolcall/cwd
Package cwd implements current-working-directory tools (cwd_get, cwd_push, cwd_pop)
Package cwd implements current-working-directory tools (cwd_get, cwd_push, cwd_pop)
toolcall/file
Package file provides file ops tool calls
Package file provides file ops tool calls
toolcall/flycheck
Package flycheck registers the flycheck tool for LLM-driven syntax checking.
Package flycheck registers the flycheck tool for LLM-driven syntax checking.
toolcall/history
Package history ๆณจๅ†Œ note ๅทฅๅ…ท๏ผŒไพ› LLM ๅœจๅฏน่ฏ็ป“ๆŸๆ—ถ่ฎฐๅฝ•็ฌ”่ฎฐ
Package history ๆณจๅ†Œ note ๅทฅๅ…ท๏ผŒไพ› LLM ๅœจๅฏน่ฏ็ป“ๆŸๆ—ถ่ฎฐๅฝ•็ฌ”่ฎฐ
toolcall/mail
Package mail registers mail tools (sendmail/readmail/mail_search/contacts) with the toolcall framework and parses LLM-issued tool arguments.
Package mail registers mail tools (sendmail/readmail/mail_search/contacts) with the toolcall framework and parses LLM-issued tool arguments.
toolcall/memory
Package memory registers memory tools (mem_save/update/search/delete/get_observation/stats) with the toolcall framework and parses LLM-issued tool arguments.
Package memory registers memory tools (mem_save/update/search/delete/get_observation/stats) with the toolcall framework and parses LLM-issued tool arguments.
toolcall/shell
Package shell for shell tools
Package shell for shell tools
userservice
Package userservice manages OS-level user services (daemons that run as the current user, independent of the calling process lifecycle).
Package userservice manages OS-level user services (daemons that run as the current user, independent of the calling process lifecycle).
version
Package version is the single source of truth for the dscli version string.
Package version is the single source of truth for the dscli version string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL