sharkcode
v0.3.8
Published
Local First, open-source AI Coding Agent
Readme
Shark Code
Local First, open-source AI coding agent.
A small CLI inspired by Claude Code / OpenCode, with DeepSeek as the default provider.
Install
npm install -g sharkcodeLaunch interactive mode:
sharkcodeOr single-shot mode:
sharkcode "explain this codebase"
sharkcode "fix the null pointer bug in auth.ts"Providers
Shark Code supports multiple providers. Switch between them anytime with /provider.
| Provider | Description | Docs |
|----------|-------------|------|
| deepseek | DeepSeek 官网 (default) | platform.deepseek.com |
| ark | 火山引擎 方舟 Coding Plan | volcengine.com/activity/codingplan |
Configure
Option 1: Slash commands (recommended)
Start sharkcode, then:
◆ /provider ark # switch to 方舟 Coding Plan
◆ /key sk-xxxxxxxxxx # set API key (saved automatically)
◆ /model ark-code-latest # optionally change modelOption 2: Config file
~/.sharkcode/config.toml
[default]
provider = "deepseek" # or "ark"
[providers.deepseek]
# API key from https://platform.deepseek.com
key = "sk-xxxxxx"
model = "deepseek-chat"
[providers.ark]
# API key from https://ark.cn-beijing.volces.com (方舟 Coding Plan)
key = "sk-xxxxxx"
model = "ark-code-latest"Option 3: Environment variables
$env:DEEPSEEK_API_KEY="sk-xxxxxx" # deepseek provider
$env:ARK_API_KEY="sk-xxxxxx" # ark providerSlash Commands
Type / commands anytime inside the interactive REPL:
| Command | Description |
|---------|-------------|
| /provider | show current provider & key status |
| /provider <name> | switch provider (deepseek | ark) |
| /key <api-key> | set API key for current provider |
| /model <model-id> | set model for current provider |
| /clear | clear conversation history |
| /help | show command list |
| /exit | quit |
Run from source
git clone https://github.com/syy-shark/sharkcode.git
cd sharkcode
bun install
bun run startUpgrade
npm update -g sharkcodeHow It Works
User input → Prompt + Tools → LLM → Tool execution → Result → RepeatBuilt-in tools:
| Tool | Description |
|------|-------------|
| read_file | Read a file |
| write_file | Create or overwrite a file |
| edit_file | Replace an exact string in a file |
| bash | Execute a shell command with approval |
Tech Stack
- Bun + TypeScript
- Vercel AI SDK
- DeepSeek API / 火山引擎 方舟 API
License
MIT
