deepseek-search 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deepseek_search-0.1.0/.claude-plugin/marketplace.json +15 -0
- deepseek_search-0.1.0/.github/workflows/ci.yml +43 -0
- deepseek_search-0.1.0/.github/workflows/publish.yml +92 -0
- deepseek_search-0.1.0/.gitignore +36 -0
- deepseek_search-0.1.0/LICENSE +21 -0
- deepseek_search-0.1.0/PKG-INFO +136 -0
- deepseek_search-0.1.0/README.md +111 -0
- deepseek_search-0.1.0/plugins/deepseek_search/.claude-plugin/plugin.json +9 -0
- deepseek_search-0.1.0/plugins/deepseek_search/skills/deepseek_search/SKILL.md +74 -0
- deepseek_search-0.1.0/pyproject.toml +56 -0
- deepseek_search-0.1.0/setup.cfg +4 -0
- deepseek_search-0.1.0/src/deepseek_search.egg-info/PKG-INFO +136 -0
- deepseek_search-0.1.0/src/deepseek_search.egg-info/SOURCES.txt +18 -0
- deepseek_search-0.1.0/src/deepseek_search.egg-info/dependency_links.txt +1 -0
- deepseek_search-0.1.0/src/deepseek_search.egg-info/entry_points.txt +2 -0
- deepseek_search-0.1.0/src/deepseek_search.egg-info/requires.txt +1 -0
- deepseek_search-0.1.0/src/deepseek_search.egg-info/top_level.txt +1 -0
- deepseek_search-0.1.0/src/deepseek_search.py +770 -0
- deepseek_search-0.1.0/tests/test_deepseek_search.py +367 -0
- deepseek_search-0.1.0/uv.lock +433 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "deepseek_search",
|
|
3
|
+
"description": "deepseek api websearch能力",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "8de4732a"
|
|
6
|
+
},
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "deepseek_search",
|
|
10
|
+
"source": "./plugins/deepseek_search",
|
|
11
|
+
"description": "deepseek api websearch 能力封装"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["**"]
|
|
6
|
+
tags-ignore: ["v*"] # tags are handled by publish.yml
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ci-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Set up uv
|
|
31
|
+
uses: astral-sh/setup-uv@v6
|
|
32
|
+
with:
|
|
33
|
+
enable-cache: true
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
|
|
36
|
+
- name: Install the project
|
|
37
|
+
run: uv sync --dev
|
|
38
|
+
|
|
39
|
+
- name: Run tests
|
|
40
|
+
run: uv run pytest -q
|
|
41
|
+
|
|
42
|
+
- name: Smoke-build the package
|
|
43
|
+
run: uv build
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Build and publish the deepseek-search package to PyPI whenever a version
|
|
4
|
+
# git tag (matching `v*`) is pushed. Releases use PyPI Trusted Publishing
|
|
5
|
+
# (OIDC), so no long-lived API tokens are stored as secrets.
|
|
6
|
+
#
|
|
7
|
+
# Prerequisite: register this project as a Trusted Publisher on PyPI.
|
|
8
|
+
# PyPI publishing environment: "pypi"
|
|
9
|
+
# GitHub repository: 8DE4732A/deepseek-search
|
|
10
|
+
# Workflow filename: publish.yml
|
|
11
|
+
# Environment name: pypi
|
|
12
|
+
# See: https://docs.pypi.org/trusted-publishers/
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
tags:
|
|
17
|
+
- "v*"
|
|
18
|
+
workflow_dispatch: # manual run for debugging (still needs the env to publish)
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
# Cancel a superseded in-flight publish for the same tag.
|
|
24
|
+
concurrency:
|
|
25
|
+
group: publish-${{ github.ref }}
|
|
26
|
+
cancel-in-progress: false
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
build:
|
|
30
|
+
name: Build sdist + wheel
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0 # full history so setuptools-scm can resolve the version
|
|
37
|
+
|
|
38
|
+
- name: Set up Python
|
|
39
|
+
uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.13"
|
|
42
|
+
|
|
43
|
+
- name: Set up uv
|
|
44
|
+
uses: astral-sh/setup-uv@v6
|
|
45
|
+
with:
|
|
46
|
+
enable-cache: true
|
|
47
|
+
|
|
48
|
+
- name: Install build frontend
|
|
49
|
+
run: uv tool install build
|
|
50
|
+
|
|
51
|
+
- name: Build distributions
|
|
52
|
+
run: uv build
|
|
53
|
+
|
|
54
|
+
- name: Verify the version matches the tag
|
|
55
|
+
run: |
|
|
56
|
+
set -euo pipefail
|
|
57
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
58
|
+
PKG_VERSION=$(python -c "import pathlib,glob; \
|
|
59
|
+
print(pathlib.Path(glob.glob('dist/*.tar.gz')[0]).name.split('-')[1].removesuffix('.tar.gz'))")
|
|
60
|
+
echo "tag version: ${TAG}"
|
|
61
|
+
echo "built version: ${PKG_VERSION}"
|
|
62
|
+
if [ "${TAG}" != "${PKG_VERSION}" ]; then
|
|
63
|
+
echo "Version mismatch: tag ${TAG} != package ${PKG_VERSION}" >&2
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
- name: Upload distributions
|
|
68
|
+
uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/*
|
|
72
|
+
|
|
73
|
+
publish:
|
|
74
|
+
name: Publish to PyPI
|
|
75
|
+
needs: build
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
environment:
|
|
78
|
+
name: pypi # required for Trusted Publishing; add reviewers here if desired
|
|
79
|
+
url: https://pypi.org/project/deepseek-search/
|
|
80
|
+
permissions:
|
|
81
|
+
id-token: write # OIDC token for Trusted Publishing
|
|
82
|
+
steps:
|
|
83
|
+
- name: Download distributions
|
|
84
|
+
uses: actions/download-artifact@v4
|
|
85
|
+
with:
|
|
86
|
+
name: dist
|
|
87
|
+
path: dist
|
|
88
|
+
|
|
89
|
+
- name: Publish to PyPI
|
|
90
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
91
|
+
with:
|
|
92
|
+
attestations: true
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
.eggs/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
env/
|
|
14
|
+
ENV/
|
|
15
|
+
|
|
16
|
+
# uv
|
|
17
|
+
.uv-cache/
|
|
18
|
+
|
|
19
|
+
# Test / coverage output
|
|
20
|
+
.pytest_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
coverage.xml
|
|
23
|
+
htmlcov/
|
|
24
|
+
|
|
25
|
+
# Local environment and secrets
|
|
26
|
+
.env
|
|
27
|
+
.env.*
|
|
28
|
+
*.local
|
|
29
|
+
|
|
30
|
+
# OS / editor files
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
.vscode/
|
|
34
|
+
.idea/
|
|
35
|
+
*.swp
|
|
36
|
+
*.swo
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 8de4732a
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepseek-search
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: DeepSeek Anthropic-compatible web search CLI for Claude Code
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/8DE4732A/deepseek-search
|
|
7
|
+
Project-URL: Repository, https://github.com/8DE4732A/deepseek-search
|
|
8
|
+
Project-URL: Issues, https://github.com/8DE4732A/deepseek-search/issues
|
|
9
|
+
Keywords: deepseek,web-search,anthropic,claude-code,cli
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: anthropic>=0.92.0
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# DeepSeek Search
|
|
27
|
+
|
|
28
|
+
DeepSeek Search is a Claude Code plugin that wraps DeepSeek's Anthropic-compatible Web Search capability as a local Python CLI and exposes it through a Claude Code skill.
|
|
29
|
+
|
|
30
|
+
## What it provides
|
|
31
|
+
|
|
32
|
+
- A `deepseek-search` CLI (Python + [`uv`](https://docs.astral.sh/uv/)), [published on PyPI](https://pypi.org/project/deepseek-search/).
|
|
33
|
+
- DeepSeek API configuration under `~/.deepseek`.
|
|
34
|
+
- A Claude Code skill at `plugins/deepseek_search/skills/deepseek_search/SKILL.md` that tells Claude Code when and how to call the CLI.
|
|
35
|
+
|
|
36
|
+
## Project layout
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
.claude-plugin/marketplace.json
|
|
40
|
+
.github/workflows/ # CI + publish-to-PyPI on `v*` tags
|
|
41
|
+
plugins/deepseek_search/ # Claude Code plugin manifest + skill
|
|
42
|
+
.claude-plugin/plugin.json
|
|
43
|
+
skills/deepseek_search/SKILL.md
|
|
44
|
+
src/deepseek_search.py # CLI implementation
|
|
45
|
+
tests/test_deepseek_search.py
|
|
46
|
+
pyproject.toml
|
|
47
|
+
uv.lock
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The Python package lives at the repository root; `plugins/deepseek_search/` holds only the Claude Code plugin manifest and skill instructions.
|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
The recommended way to use the CLI is as a global `uv` tool:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uv tool install deepseek-search
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then `deepseek-search` is available on `PATH` everywhere.
|
|
61
|
+
|
|
62
|
+
### From source (development)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/8DE4732A/deepseek-search.git
|
|
66
|
+
cd deepseek-search
|
|
67
|
+
uv sync --dev # install dependencies
|
|
68
|
+
uv run pytest # run tests (no API key required)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Configure DeepSeek
|
|
72
|
+
|
|
73
|
+
All configuration lives under `~/.deepseek` and is managed through the `config` subcommand. There are **no environment variables** — settings come from the config files or one-off CLI flags.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
deepseek-search config init # write a default config.json
|
|
77
|
+
deepseek-search config set api_key YOUR_DEEPSEEK_API_KEY # stored in ~/.deepseek/credentials.json (chmod 600)
|
|
78
|
+
deepseek-search config set model deepseek-v4-pro[1m] # set any field
|
|
79
|
+
deepseek-search config get model # read a single value
|
|
80
|
+
deepseek-search config list # show full effective config (api_key masked)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Configurable keys (type-coerced automatically):
|
|
84
|
+
|
|
85
|
+
| Key | Stored in | Type |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| `api_key` | `credentials.json` | string (chmod 600) |
|
|
88
|
+
| `base_url`, `model`, `web_search_tool_type`, `output_format` | `config.json` | string |
|
|
89
|
+
| `max_tokens`, `max_retries` | `config.json` | int |
|
|
90
|
+
| `timeout_seconds` | `config.json` | float |
|
|
91
|
+
| `max_uses`, `allowed_domains`, `blocked_domains` | `config.json` (`search.*`) | int / comma-list |
|
|
92
|
+
|
|
93
|
+
Advanced search flags (`--model`, `--max-tokens`, `--timeout`, `--max-uses`, `--allowed-domain`, `--blocked-domain`, …) override `config.json` for a single run without writing it back.
|
|
94
|
+
|
|
95
|
+
## CLI usage
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
deepseek-search --json --query "DeepSeek Claude Code web search documentation"
|
|
99
|
+
deepseek-search "DeepSeek API Claude Code integration" # bare positional query also works
|
|
100
|
+
deepseek-search search --markdown "DeepSeek API Claude Code integration"
|
|
101
|
+
deepseek-search --help
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The JSON output includes:
|
|
105
|
+
|
|
106
|
+
- `answer`
|
|
107
|
+
- `citations`
|
|
108
|
+
- `warnings`
|
|
109
|
+
- `usage`
|
|
110
|
+
- `model`
|
|
111
|
+
- `request_id`
|
|
112
|
+
- `stop_reason`
|
|
113
|
+
|
|
114
|
+
## Releasing / publishing
|
|
115
|
+
|
|
116
|
+
Releases are produced automatically by the **Publish to PyPI** GitHub Action whenever a `v*` git tag is pushed:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git tag v0.1.0
|
|
120
|
+
git push origin v0.1.0
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Prerequisites (one-time, in the GitHub repo + PyPI):
|
|
124
|
+
|
|
125
|
+
1. Register the project as a **Trusted Publisher** on PyPI:
|
|
126
|
+
- PyPI publishing environment: `pypi`
|
|
127
|
+
- GitHub repository: `8DE4732A/deepseek-search`
|
|
128
|
+
- Workflow filename: `publish.yml`
|
|
129
|
+
- Environment name: `pypi`
|
|
130
|
+
2. No PyPI API token is required — publishing uses OIDC.
|
|
131
|
+
|
|
132
|
+
The package version is derived from the git tag via `setuptools-scm`, so the workflow fails fast if the tag and the built version disagree.
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT License. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# DeepSeek Search
|
|
2
|
+
|
|
3
|
+
DeepSeek Search is a Claude Code plugin that wraps DeepSeek's Anthropic-compatible Web Search capability as a local Python CLI and exposes it through a Claude Code skill.
|
|
4
|
+
|
|
5
|
+
## What it provides
|
|
6
|
+
|
|
7
|
+
- A `deepseek-search` CLI (Python + [`uv`](https://docs.astral.sh/uv/)), [published on PyPI](https://pypi.org/project/deepseek-search/).
|
|
8
|
+
- DeepSeek API configuration under `~/.deepseek`.
|
|
9
|
+
- A Claude Code skill at `plugins/deepseek_search/skills/deepseek_search/SKILL.md` that tells Claude Code when and how to call the CLI.
|
|
10
|
+
|
|
11
|
+
## Project layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
.claude-plugin/marketplace.json
|
|
15
|
+
.github/workflows/ # CI + publish-to-PyPI on `v*` tags
|
|
16
|
+
plugins/deepseek_search/ # Claude Code plugin manifest + skill
|
|
17
|
+
.claude-plugin/plugin.json
|
|
18
|
+
skills/deepseek_search/SKILL.md
|
|
19
|
+
src/deepseek_search.py # CLI implementation
|
|
20
|
+
tests/test_deepseek_search.py
|
|
21
|
+
pyproject.toml
|
|
22
|
+
uv.lock
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The Python package lives at the repository root; `plugins/deepseek_search/` holds only the Claude Code plugin manifest and skill instructions.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
The recommended way to use the CLI is as a global `uv` tool:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv tool install deepseek-search
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then `deepseek-search` is available on `PATH` everywhere.
|
|
36
|
+
|
|
37
|
+
### From source (development)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/8DE4732A/deepseek-search.git
|
|
41
|
+
cd deepseek-search
|
|
42
|
+
uv sync --dev # install dependencies
|
|
43
|
+
uv run pytest # run tests (no API key required)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Configure DeepSeek
|
|
47
|
+
|
|
48
|
+
All configuration lives under `~/.deepseek` and is managed through the `config` subcommand. There are **no environment variables** — settings come from the config files or one-off CLI flags.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
deepseek-search config init # write a default config.json
|
|
52
|
+
deepseek-search config set api_key YOUR_DEEPSEEK_API_KEY # stored in ~/.deepseek/credentials.json (chmod 600)
|
|
53
|
+
deepseek-search config set model deepseek-v4-pro[1m] # set any field
|
|
54
|
+
deepseek-search config get model # read a single value
|
|
55
|
+
deepseek-search config list # show full effective config (api_key masked)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Configurable keys (type-coerced automatically):
|
|
59
|
+
|
|
60
|
+
| Key | Stored in | Type |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `api_key` | `credentials.json` | string (chmod 600) |
|
|
63
|
+
| `base_url`, `model`, `web_search_tool_type`, `output_format` | `config.json` | string |
|
|
64
|
+
| `max_tokens`, `max_retries` | `config.json` | int |
|
|
65
|
+
| `timeout_seconds` | `config.json` | float |
|
|
66
|
+
| `max_uses`, `allowed_domains`, `blocked_domains` | `config.json` (`search.*`) | int / comma-list |
|
|
67
|
+
|
|
68
|
+
Advanced search flags (`--model`, `--max-tokens`, `--timeout`, `--max-uses`, `--allowed-domain`, `--blocked-domain`, …) override `config.json` for a single run without writing it back.
|
|
69
|
+
|
|
70
|
+
## CLI usage
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
deepseek-search --json --query "DeepSeek Claude Code web search documentation"
|
|
74
|
+
deepseek-search "DeepSeek API Claude Code integration" # bare positional query also works
|
|
75
|
+
deepseek-search search --markdown "DeepSeek API Claude Code integration"
|
|
76
|
+
deepseek-search --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The JSON output includes:
|
|
80
|
+
|
|
81
|
+
- `answer`
|
|
82
|
+
- `citations`
|
|
83
|
+
- `warnings`
|
|
84
|
+
- `usage`
|
|
85
|
+
- `model`
|
|
86
|
+
- `request_id`
|
|
87
|
+
- `stop_reason`
|
|
88
|
+
|
|
89
|
+
## Releasing / publishing
|
|
90
|
+
|
|
91
|
+
Releases are produced automatically by the **Publish to PyPI** GitHub Action whenever a `v*` git tag is pushed:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git tag v0.1.0
|
|
95
|
+
git push origin v0.1.0
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Prerequisites (one-time, in the GitHub repo + PyPI):
|
|
99
|
+
|
|
100
|
+
1. Register the project as a **Trusted Publisher** on PyPI:
|
|
101
|
+
- PyPI publishing environment: `pypi`
|
|
102
|
+
- GitHub repository: `8DE4732A/deepseek-search`
|
|
103
|
+
- Workflow filename: `publish.yml`
|
|
104
|
+
- Environment name: `pypi`
|
|
105
|
+
2. No PyPI API token is required — publishing uses OIDC.
|
|
106
|
+
|
|
107
|
+
The package version is derived from the git tag via `setuptools-scm`, so the workflow fails fast if the tag and the built version disagree.
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
MIT License. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deepseek_search
|
|
3
|
+
description: Use DeepSeek API-backed web search for current web information, recent docs, versions, prices, announcements, or explicit web search requests. Returns cited results through a local uv Python CLI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DeepSeek Search
|
|
7
|
+
|
|
8
|
+
Use this skill when the user asks for web search, online/current information, recent documentation, versions, pricing, announcements, news, or any answer that could be stale without checking the web.
|
|
9
|
+
|
|
10
|
+
Do not use this skill for purely local codebase questions or for private/authenticated pages unless the user has provided a public URL or accessible source.
|
|
11
|
+
|
|
12
|
+
## Prerequisites (one-time install)
|
|
13
|
+
|
|
14
|
+
The `deepseek-search` CLI is a global `uv` tool, installed once per machine:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install deepseek-search
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Installers from the [PyPI releases](https://pypi.org/project/deepseek-search/) are produced automatically when a `v*` git tag is pushed in the project repository. Once installed, `deepseek-search` is available on `PATH` everywhere (including inside this skill) — no checkout or virtualenv required.
|
|
21
|
+
|
|
22
|
+
## CLI command
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
deepseek-search --json --query "<specific search query>"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The `search` subcommand is the default, so a bare positional query also works:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
deepseek-search "<specific search query>"
|
|
32
|
+
deepseek-search search --markdown "<specific search query>"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use `--markdown` only when you want human-readable output. Prefer `--json` when you need to parse the answer and citations.
|
|
36
|
+
|
|
37
|
+
If the `deepseek-search` command is not found, ask the user to run `uv tool install deepseek-search`, then retry — do not answer from memory.
|
|
38
|
+
|
|
39
|
+
## Query guidance
|
|
40
|
+
|
|
41
|
+
- Make the query specific: include product names, version numbers, dates, and the exact topic.
|
|
42
|
+
- If results are weak or missing, reformulate and search again instead of filling gaps from memory.
|
|
43
|
+
- Preserve source URLs from the CLI output in your final answer.
|
|
44
|
+
- If the CLI reports missing credentials or config, tell the user to configure settings with `deepseek-search config set ...` (see below); do not answer from memory.
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
All configuration lives under `~/.deepseek`:
|
|
49
|
+
|
|
50
|
+
- `~/.deepseek/config.json` — non-sensitive settings (model, base_url, max_tokens, timeout_seconds, max_retries, web_search_tool_type, output_format, and `search.*` fields max_uses / allowed_domains / blocked_domains).
|
|
51
|
+
- `~/.deepseek/credentials.json` — the API key (chmod 0600).
|
|
52
|
+
|
|
53
|
+
There are **no environment variables**. Settings come from the config files or from one-off CLI flags. Manage them with the `config` subcommand:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
deepseek-search config init # write a default config.json
|
|
57
|
+
deepseek-search config set model deepseek-v4-flash # set any field
|
|
58
|
+
deepseek-search config set api_key YOUR_DEEPSEEK_API_KEY # stored in credentials.json, chmod 0600
|
|
59
|
+
deepseek-search config get model # read a single value
|
|
60
|
+
deepseek-search config list # show full effective config (api_key masked)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Keys map 1:1 to the settings above; values are type-coerced (int for max_tokens/max_uses/max_retries, float for timeout_seconds, comma-list for allowed_domains/blocked_domains). Unknown keys are rejected.
|
|
64
|
+
|
|
65
|
+
## Interpreting output
|
|
66
|
+
|
|
67
|
+
The JSON output contains:
|
|
68
|
+
|
|
69
|
+
- `answer`: model-generated answer grounded in web search.
|
|
70
|
+
- `citations`: extracted source URLs/titles/snippets when available.
|
|
71
|
+
- `warnings`: compatibility or completeness notes.
|
|
72
|
+
- `usage`, `model`, `request_id`, and `stop_reason`: debugging metadata.
|
|
73
|
+
|
|
74
|
+
Base your response on `answer` and `citations`. If `warnings` says the result is incomplete, say that plainly.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "deepseek-search"
|
|
3
|
+
description = "DeepSeek Anthropic-compatible web search CLI for Claude Code"
|
|
4
|
+
readme = "README.md"
|
|
5
|
+
requires-python = ">=3.11"
|
|
6
|
+
dynamic = ["version"]
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
keywords = ["deepseek", "web-search", "anthropic", "claude-code", "cli"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 4 - Beta",
|
|
12
|
+
"Environment :: Console",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Programming Language :: Python :: 3.13",
|
|
19
|
+
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
|
|
20
|
+
"Topic :: Software Development :: Libraries",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"anthropic>=0.92.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
deepseek-search = "deepseek_search:main"
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/8DE4732A/deepseek-search"
|
|
31
|
+
Repository = "https://github.com/8DE4732A/deepseek-search"
|
|
32
|
+
Issues = "https://github.com/8DE4732A/deepseek-search/issues"
|
|
33
|
+
|
|
34
|
+
[dependency-groups]
|
|
35
|
+
dev = [
|
|
36
|
+
"pytest>=8.0",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["setuptools>=68", "setuptools-scm>=8"]
|
|
41
|
+
build-backend = "setuptools.build_meta"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
py-modules = ["deepseek_search"]
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.package-dir]
|
|
47
|
+
"" = "src"
|
|
48
|
+
|
|
49
|
+
[tool.setuptools_scm]
|
|
50
|
+
# Derive the package version from git tags (e.g. v0.1.0 -> 0.1.0).
|
|
51
|
+
# CI sets this explicitly when building from a published tag.
|
|
52
|
+
local_scheme = "no-local-version"
|
|
53
|
+
|
|
54
|
+
[tool.pytest.ini_options]
|
|
55
|
+
pythonpath = ["src"]
|
|
56
|
+
testpaths = ["tests"]
|