deepy-cli 0.1.1__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.
Files changed (68) hide show
  1. deepy_cli-0.1.1/PKG-INFO +205 -0
  2. deepy_cli-0.1.1/README.md +177 -0
  3. deepy_cli-0.1.1/pyproject.toml +68 -0
  4. deepy_cli-0.1.1/src/deepy/__init__.py +9 -0
  5. deepy_cli-0.1.1/src/deepy/__main__.py +7 -0
  6. deepy_cli-0.1.1/src/deepy/cli.py +413 -0
  7. deepy_cli-0.1.1/src/deepy/config/__init__.py +21 -0
  8. deepy_cli-0.1.1/src/deepy/config/settings.py +237 -0
  9. deepy_cli-0.1.1/src/deepy/data/__init__.py +1 -0
  10. deepy_cli-0.1.1/src/deepy/data/tools/AskUserQuestion.md +10 -0
  11. deepy_cli-0.1.1/src/deepy/data/tools/WebFetch.md +9 -0
  12. deepy_cli-0.1.1/src/deepy/data/tools/WebSearch.md +9 -0
  13. deepy_cli-0.1.1/src/deepy/data/tools/__init__.py +1 -0
  14. deepy_cli-0.1.1/src/deepy/data/tools/bash.md +7 -0
  15. deepy_cli-0.1.1/src/deepy/data/tools/edit.md +13 -0
  16. deepy_cli-0.1.1/src/deepy/data/tools/modify.md +17 -0
  17. deepy_cli-0.1.1/src/deepy/data/tools/read.md +8 -0
  18. deepy_cli-0.1.1/src/deepy/data/tools/write.md +12 -0
  19. deepy_cli-0.1.1/src/deepy/errors.py +63 -0
  20. deepy_cli-0.1.1/src/deepy/llm/__init__.py +13 -0
  21. deepy_cli-0.1.1/src/deepy/llm/agent.py +31 -0
  22. deepy_cli-0.1.1/src/deepy/llm/context.py +109 -0
  23. deepy_cli-0.1.1/src/deepy/llm/events.py +187 -0
  24. deepy_cli-0.1.1/src/deepy/llm/model_capabilities.py +7 -0
  25. deepy_cli-0.1.1/src/deepy/llm/provider.py +81 -0
  26. deepy_cli-0.1.1/src/deepy/llm/replay.py +120 -0
  27. deepy_cli-0.1.1/src/deepy/llm/runner.py +412 -0
  28. deepy_cli-0.1.1/src/deepy/llm/thinking.py +30 -0
  29. deepy_cli-0.1.1/src/deepy/prompts/__init__.py +6 -0
  30. deepy_cli-0.1.1/src/deepy/prompts/compact.py +100 -0
  31. deepy_cli-0.1.1/src/deepy/prompts/rules.py +24 -0
  32. deepy_cli-0.1.1/src/deepy/prompts/runtime_context.py +98 -0
  33. deepy_cli-0.1.1/src/deepy/prompts/system.py +72 -0
  34. deepy_cli-0.1.1/src/deepy/prompts/tool_docs.py +21 -0
  35. deepy_cli-0.1.1/src/deepy/sessions/__init__.py +17 -0
  36. deepy_cli-0.1.1/src/deepy/sessions/jsonl.py +306 -0
  37. deepy_cli-0.1.1/src/deepy/sessions/manager.py +202 -0
  38. deepy_cli-0.1.1/src/deepy/skills.py +202 -0
  39. deepy_cli-0.1.1/src/deepy/status.py +65 -0
  40. deepy_cli-0.1.1/src/deepy/tools/__init__.py +6 -0
  41. deepy_cli-0.1.1/src/deepy/tools/agents.py +343 -0
  42. deepy_cli-0.1.1/src/deepy/tools/builtin.py +2113 -0
  43. deepy_cli-0.1.1/src/deepy/tools/file_state.py +85 -0
  44. deepy_cli-0.1.1/src/deepy/tools/result.py +54 -0
  45. deepy_cli-0.1.1/src/deepy/tools/shell_utils.py +83 -0
  46. deepy_cli-0.1.1/src/deepy/ui/__init__.py +5 -0
  47. deepy_cli-0.1.1/src/deepy/ui/app.py +118 -0
  48. deepy_cli-0.1.1/src/deepy/ui/ask_user_question.py +182 -0
  49. deepy_cli-0.1.1/src/deepy/ui/exit_summary.py +142 -0
  50. deepy_cli-0.1.1/src/deepy/ui/loading_text.py +87 -0
  51. deepy_cli-0.1.1/src/deepy/ui/markdown.py +152 -0
  52. deepy_cli-0.1.1/src/deepy/ui/message_view.py +546 -0
  53. deepy_cli-0.1.1/src/deepy/ui/prompt_buffer.py +176 -0
  54. deepy_cli-0.1.1/src/deepy/ui/prompt_input.py +286 -0
  55. deepy_cli-0.1.1/src/deepy/ui/session_list.py +140 -0
  56. deepy_cli-0.1.1/src/deepy/ui/session_picker.py +179 -0
  57. deepy_cli-0.1.1/src/deepy/ui/slash_commands.py +67 -0
  58. deepy_cli-0.1.1/src/deepy/ui/styles.py +21 -0
  59. deepy_cli-0.1.1/src/deepy/ui/terminal.py +959 -0
  60. deepy_cli-0.1.1/src/deepy/ui/thinking_state.py +29 -0
  61. deepy_cli-0.1.1/src/deepy/ui/welcome.py +195 -0
  62. deepy_cli-0.1.1/src/deepy/update_check.py +195 -0
  63. deepy_cli-0.1.1/src/deepy/usage.py +192 -0
  64. deepy_cli-0.1.1/src/deepy/utils/__init__.py +15 -0
  65. deepy_cli-0.1.1/src/deepy/utils/debug_logger.py +62 -0
  66. deepy_cli-0.1.1/src/deepy/utils/error_logger.py +107 -0
  67. deepy_cli-0.1.1/src/deepy/utils/json.py +29 -0
  68. deepy_cli-0.1.1/src/deepy/utils/notify.py +66 -0
@@ -0,0 +1,205 @@
1
+ Metadata-Version: 2.3
2
+ Name: deepy-cli
3
+ Version: 0.1.1
4
+ Summary: Deepy - Vibe coding for DeepSeek models in your terminal
5
+ Keywords: deepseek,coding-agent,terminal,cli,agents
6
+ Author: kirineko
7
+ Author-email: kirineko <kirineko@qq.com>
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Topic :: Software Development
14
+ Classifier: Topic :: Terminals
15
+ Requires-Dist: openai-agents>=0.17.0
16
+ Requires-Dist: openai>=2.26,<3
17
+ Requires-Dist: orjson>=3.10,<4
18
+ Requires-Dist: pydantic>=2.12,<3
19
+ Requires-Dist: prompt-toolkit>=3.0,<4
20
+ Requires-Dist: rich>=13.9,<15
21
+ Requires-Dist: tiktoken>=0.9,<1
22
+ Requires-Dist: tomli-w>=1
23
+ Requires-Python: >=3.12
24
+ Project-URL: Homepage, https://kirineko.github.io/deepy/
25
+ Project-URL: Repository, https://github.com/kirineko/deepy
26
+ Project-URL: Issues, https://github.com/kirineko/deepy/issues
27
+ Description-Content-Type: text/markdown
28
+
29
+ <p align="center">
30
+ <img src="https://raw.githubusercontent.com/kirineko/deepy/main/asset/deepy-logo.png" alt="Deepy logo" width="160">
31
+ </p>
32
+
33
+ <h1 align="center">Deepy</h1>
34
+
35
+ <p align="center">
36
+ A cute terminal coding agent for DeepSeek models.
37
+ <br>
38
+ Read, edit, run tools, search the web, and keep project context in one terminal session.
39
+ </p>
40
+
41
+ <p align="center">
42
+ <a href="https://kirineko.github.io/deepy/">Website</a>
43
+ ·
44
+ <a href="README.zh-CN.md">中文文档</a>
45
+ ·
46
+ <a href="#quick-start">Quick Start</a>
47
+ </p>
48
+
49
+ ![Deepy welcome screen](https://raw.githubusercontent.com/kirineko/deepy/main/asset/welcome.jpg)
50
+
51
+ ## What Is Deepy?
52
+
53
+ Deepy is a Python terminal coding agent built for DeepSeek's OpenAI-compatible
54
+ models. It keeps the workflow inside your terminal: ask questions, inspect a
55
+ project, edit files, run commands, search or fetch web content, and resume the
56
+ same project session later.
57
+
58
+ Deepy is designed around DeepSeek V4 thinking mode, long context, cache-friendly
59
+ prompting, and a Rich terminal interface that makes tool calls, diffs, usage, and
60
+ context state visible while the agent works.
61
+
62
+ ## Highlights
63
+
64
+ - DeepSeek-first model setup with `deepseek-v4-pro`, thinking enabled, and
65
+ `reasoning_effort=max` by default.
66
+ - OpenAI Agents SDK integration through `OpenAIChatCompletionsModel`.
67
+ - Project-aware coding tools for reading files, modifying files, running shell
68
+ commands, and showing readable diffs.
69
+ - Web research tools for search and direct URL fetching when a task needs fresh
70
+ information.
71
+ - Session history, `/resume`, `/new`, automatic context tracking, and compacting
72
+ for long project work.
73
+ - TOML-only private configuration at `~/.deepy/config.toml`.
74
+ - Terminal UI with Markdown rendering, DeepSeek thinking display, per-turn usage,
75
+ context window status, and version update checks.
76
+
77
+ ## See It Work
78
+
79
+ ### Start In A Project
80
+
81
+ Deepy shows the current model, thinking settings, working directory, and the core
82
+ commands directly on startup.
83
+
84
+ ![Deepy startup screen](https://raw.githubusercontent.com/kirineko/deepy/main/asset/welcome.jpg)
85
+
86
+ ### Build And Verify Code
87
+
88
+ Ask Deepy to implement a change, write tests, run the project test command, and
89
+ summarize the result.
90
+
91
+ ![Deepy coding workflow with diff](https://raw.githubusercontent.com/kirineko/deepy/main/asset/coding-1.jpg)
92
+
93
+ Deepy can also turn command output into a readable project summary, including
94
+ files created, code snippets, and test coverage.
95
+
96
+ ![Deepy project summary](https://raw.githubusercontent.com/kirineko/deepy/main/asset/coding-2.jpg)
97
+
98
+ ### Research With Sources
99
+
100
+ Deepy includes WebSearch and WebFetch tools, so a terminal session can gather
101
+ current information and fetch exact pages when a URL is provided.
102
+
103
+ ![Deepy web research workflow](https://raw.githubusercontent.com/kirineko/deepy/main/asset/websearch.jpg)
104
+
105
+ ## Quick Start
106
+
107
+ Install from PyPI after the first release:
108
+
109
+ ```bash
110
+ uv tool install deepy-cli
111
+ ```
112
+
113
+ The installed command is still `deepy`.
114
+
115
+ Install the latest code from GitHub:
116
+
117
+ ```bash
118
+ uv tool install git+https://github.com/kirineko/deepy.git
119
+ ```
120
+
121
+ Configure your DeepSeek API key:
122
+
123
+ ```bash
124
+ deepy config setup
125
+ ```
126
+
127
+ Start Deepy in a project:
128
+
129
+ ```bash
130
+ cd your-project
131
+ deepy
132
+ ```
133
+
134
+ ## Configuration
135
+
136
+ Deepy only uses TOML configuration. JSON config files are intentionally rejected.
137
+
138
+ ```toml
139
+ # ~/.deepy/config.toml
140
+ api_key = "sk-..."
141
+ model = "deepseek-v4-pro"
142
+ base_url = "https://api.deepseek.com"
143
+ context_window_tokens = 1048576
144
+ compact_threshold = 0.8
145
+ ```
146
+
147
+ You can also initialize config non-interactively:
148
+
149
+ ```bash
150
+ deepy config init --api-key sk-... --model deepseek-v4-pro
151
+ ```
152
+
153
+ ## Common Commands
154
+
155
+ ```bash
156
+ deepy --version
157
+ deepy config setup
158
+ deepy doctor
159
+ deepy doctor --live --json
160
+ deepy status
161
+ deepy skills list
162
+ deepy sessions list
163
+ deepy sessions show <session-id>
164
+ deepy run "summarize this project"
165
+ ```
166
+
167
+ Inside the interactive terminal:
168
+
169
+ ```text
170
+ /skills List available skills
171
+ /new Start a fresh conversation
172
+ /resume Pick a previous session
173
+ / Open the command menu
174
+ Esc Interrupt the current model turn
175
+ Ctrl+D Press twice to quit
176
+ ```
177
+
178
+ ## Project Rules And Skills
179
+
180
+ Deepy automatically loads project instructions from:
181
+
182
+ - `AGENTS.md`
183
+ - `.deepy/skills/*/SKILL.md`
184
+
185
+ This lets each repository define local conventions, commands, review rules, and
186
+ domain-specific skills without changing global config.
187
+
188
+ ## Development
189
+
190
+ ```bash
191
+ uv sync --group dev
192
+ uv run pytest
193
+ uv run ruff check
194
+ uv run pyright
195
+ uv build
196
+ ```
197
+
198
+ The Python package is built from `src/deepy`. GitHub Pages files and screenshot
199
+ assets live outside the package directory and are not included in the wheel.
200
+
201
+ ## Release Status
202
+
203
+ Deepy is preparing its first public `0.1.1` release. The current release path is
204
+ GitHub + PyPI. Standalone binaries and npm wrappers can be added later, but the
205
+ primary distribution is the Python CLI.
@@ -0,0 +1,177 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/kirineko/deepy/main/asset/deepy-logo.png" alt="Deepy logo" width="160">
3
+ </p>
4
+
5
+ <h1 align="center">Deepy</h1>
6
+
7
+ <p align="center">
8
+ A cute terminal coding agent for DeepSeek models.
9
+ <br>
10
+ Read, edit, run tools, search the web, and keep project context in one terminal session.
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="https://kirineko.github.io/deepy/">Website</a>
15
+ ·
16
+ <a href="README.zh-CN.md">中文文档</a>
17
+ ·
18
+ <a href="#quick-start">Quick Start</a>
19
+ </p>
20
+
21
+ ![Deepy welcome screen](https://raw.githubusercontent.com/kirineko/deepy/main/asset/welcome.jpg)
22
+
23
+ ## What Is Deepy?
24
+
25
+ Deepy is a Python terminal coding agent built for DeepSeek's OpenAI-compatible
26
+ models. It keeps the workflow inside your terminal: ask questions, inspect a
27
+ project, edit files, run commands, search or fetch web content, and resume the
28
+ same project session later.
29
+
30
+ Deepy is designed around DeepSeek V4 thinking mode, long context, cache-friendly
31
+ prompting, and a Rich terminal interface that makes tool calls, diffs, usage, and
32
+ context state visible while the agent works.
33
+
34
+ ## Highlights
35
+
36
+ - DeepSeek-first model setup with `deepseek-v4-pro`, thinking enabled, and
37
+ `reasoning_effort=max` by default.
38
+ - OpenAI Agents SDK integration through `OpenAIChatCompletionsModel`.
39
+ - Project-aware coding tools for reading files, modifying files, running shell
40
+ commands, and showing readable diffs.
41
+ - Web research tools for search and direct URL fetching when a task needs fresh
42
+ information.
43
+ - Session history, `/resume`, `/new`, automatic context tracking, and compacting
44
+ for long project work.
45
+ - TOML-only private configuration at `~/.deepy/config.toml`.
46
+ - Terminal UI with Markdown rendering, DeepSeek thinking display, per-turn usage,
47
+ context window status, and version update checks.
48
+
49
+ ## See It Work
50
+
51
+ ### Start In A Project
52
+
53
+ Deepy shows the current model, thinking settings, working directory, and the core
54
+ commands directly on startup.
55
+
56
+ ![Deepy startup screen](https://raw.githubusercontent.com/kirineko/deepy/main/asset/welcome.jpg)
57
+
58
+ ### Build And Verify Code
59
+
60
+ Ask Deepy to implement a change, write tests, run the project test command, and
61
+ summarize the result.
62
+
63
+ ![Deepy coding workflow with diff](https://raw.githubusercontent.com/kirineko/deepy/main/asset/coding-1.jpg)
64
+
65
+ Deepy can also turn command output into a readable project summary, including
66
+ files created, code snippets, and test coverage.
67
+
68
+ ![Deepy project summary](https://raw.githubusercontent.com/kirineko/deepy/main/asset/coding-2.jpg)
69
+
70
+ ### Research With Sources
71
+
72
+ Deepy includes WebSearch and WebFetch tools, so a terminal session can gather
73
+ current information and fetch exact pages when a URL is provided.
74
+
75
+ ![Deepy web research workflow](https://raw.githubusercontent.com/kirineko/deepy/main/asset/websearch.jpg)
76
+
77
+ ## Quick Start
78
+
79
+ Install from PyPI after the first release:
80
+
81
+ ```bash
82
+ uv tool install deepy-cli
83
+ ```
84
+
85
+ The installed command is still `deepy`.
86
+
87
+ Install the latest code from GitHub:
88
+
89
+ ```bash
90
+ uv tool install git+https://github.com/kirineko/deepy.git
91
+ ```
92
+
93
+ Configure your DeepSeek API key:
94
+
95
+ ```bash
96
+ deepy config setup
97
+ ```
98
+
99
+ Start Deepy in a project:
100
+
101
+ ```bash
102
+ cd your-project
103
+ deepy
104
+ ```
105
+
106
+ ## Configuration
107
+
108
+ Deepy only uses TOML configuration. JSON config files are intentionally rejected.
109
+
110
+ ```toml
111
+ # ~/.deepy/config.toml
112
+ api_key = "sk-..."
113
+ model = "deepseek-v4-pro"
114
+ base_url = "https://api.deepseek.com"
115
+ context_window_tokens = 1048576
116
+ compact_threshold = 0.8
117
+ ```
118
+
119
+ You can also initialize config non-interactively:
120
+
121
+ ```bash
122
+ deepy config init --api-key sk-... --model deepseek-v4-pro
123
+ ```
124
+
125
+ ## Common Commands
126
+
127
+ ```bash
128
+ deepy --version
129
+ deepy config setup
130
+ deepy doctor
131
+ deepy doctor --live --json
132
+ deepy status
133
+ deepy skills list
134
+ deepy sessions list
135
+ deepy sessions show <session-id>
136
+ deepy run "summarize this project"
137
+ ```
138
+
139
+ Inside the interactive terminal:
140
+
141
+ ```text
142
+ /skills List available skills
143
+ /new Start a fresh conversation
144
+ /resume Pick a previous session
145
+ / Open the command menu
146
+ Esc Interrupt the current model turn
147
+ Ctrl+D Press twice to quit
148
+ ```
149
+
150
+ ## Project Rules And Skills
151
+
152
+ Deepy automatically loads project instructions from:
153
+
154
+ - `AGENTS.md`
155
+ - `.deepy/skills/*/SKILL.md`
156
+
157
+ This lets each repository define local conventions, commands, review rules, and
158
+ domain-specific skills without changing global config.
159
+
160
+ ## Development
161
+
162
+ ```bash
163
+ uv sync --group dev
164
+ uv run pytest
165
+ uv run ruff check
166
+ uv run pyright
167
+ uv build
168
+ ```
169
+
170
+ The Python package is built from `src/deepy`. GitHub Pages files and screenshot
171
+ assets live outside the package directory and are not included in the wheel.
172
+
173
+ ## Release Status
174
+
175
+ Deepy is preparing its first public `0.1.1` release. The current release path is
176
+ GitHub + PyPI. Standalone binaries and npm wrappers can be added later, but the
177
+ primary distribution is the Python CLI.
@@ -0,0 +1,68 @@
1
+ [project]
2
+ name = "deepy-cli"
3
+ version = "0.1.1"
4
+ description = "Deepy - Vibe coding for DeepSeek models in your terminal"
5
+ readme = "README.md"
6
+ authors = [
7
+ { name = "kirineko", email = "kirineko@qq.com" }
8
+ ]
9
+ requires-python = ">=3.12"
10
+ keywords = ["deepseek", "coding-agent", "terminal", "cli", "agents"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Environment :: Console",
14
+ "Intended Audience :: Developers",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Topic :: Software Development",
18
+ "Topic :: Terminals",
19
+ ]
20
+ dependencies = [
21
+ "openai-agents>=0.17.0",
22
+ "openai>=2.26,<3",
23
+ "orjson>=3.10,<4",
24
+ "pydantic>=2.12,<3",
25
+ "prompt-toolkit>=3.0,<4",
26
+ "rich>=13.9,<15",
27
+ "tiktoken>=0.9,<1",
28
+ "tomli-w>=1",
29
+ ]
30
+
31
+ [project.scripts]
32
+ deepy = "deepy.cli:main"
33
+
34
+ [project.urls]
35
+ Homepage = "https://kirineko.github.io/deepy/"
36
+ Repository = "https://github.com/kirineko/deepy"
37
+ Issues = "https://github.com/kirineko/deepy/issues"
38
+
39
+ [dependency-groups]
40
+ dev = [
41
+ "pyright>=1.1.407",
42
+ "pytest>=8.0",
43
+ "pytest-asyncio>=0.24",
44
+ "ruff>=0.14",
45
+ ]
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = ["tests"]
49
+
50
+ [tool.ruff]
51
+ line-length = 100
52
+ target-version = "py312"
53
+ src = ["src", "tests"]
54
+ exclude = ["dist", "reference", "spec"]
55
+
56
+ [tool.pyright]
57
+ pythonVersion = "3.12"
58
+ typeCheckingMode = "off"
59
+ include = ["src", "tests"]
60
+ exclude = ["dist", "reference", "spec"]
61
+ reportMissingTypeStubs = false
62
+
63
+ [tool.uv.build-backend]
64
+ module-name = "deepy"
65
+
66
+ [build-system]
67
+ requires = ["uv_build>=0.11.10,<0.12.0"]
68
+ build-backend = "uv_build"
@@ -0,0 +1,9 @@
1
+ from __future__ import annotations
2
+
3
+ __version__ = "0.1.1"
4
+
5
+
6
+ def main() -> None:
7
+ from .cli import main as cli_main
8
+
9
+ cli_main()
@@ -0,0 +1,7 @@
1
+ from __future__ import annotations
2
+
3
+ from .cli import main
4
+
5
+
6
+ if __name__ == "__main__":
7
+ main()