ripperdoc 0.2.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.
- ripperdoc-0.2.0/LICENSE +53 -0
- ripperdoc-0.2.0/PKG-INFO +178 -0
- ripperdoc-0.2.0/README.md +144 -0
- ripperdoc-0.2.0/pyproject.toml +71 -0
- ripperdoc-0.2.0/ripperdoc/__init__.py +3 -0
- ripperdoc-0.2.0/ripperdoc/__main__.py +25 -0
- ripperdoc-0.2.0/ripperdoc/cli/__init__.py +1 -0
- ripperdoc-0.2.0/ripperdoc/cli/cli.py +319 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/__init__.py +76 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/agents_cmd.py +234 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/base.py +19 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/clear_cmd.py +18 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/compact_cmd.py +19 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/config_cmd.py +31 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/context_cmd.py +114 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/cost_cmd.py +77 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/exit_cmd.py +19 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/help_cmd.py +20 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/mcp_cmd.py +65 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/models_cmd.py +327 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/resume_cmd.py +97 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/status_cmd.py +167 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/tasks_cmd.py +240 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/todos_cmd.py +69 -0
- ripperdoc-0.2.0/ripperdoc/cli/commands/tools_cmd.py +19 -0
- ripperdoc-0.2.0/ripperdoc/cli/ui/__init__.py +1 -0
- ripperdoc-0.2.0/ripperdoc/cli/ui/context_display.py +298 -0
- ripperdoc-0.2.0/ripperdoc/cli/ui/helpers.py +22 -0
- ripperdoc-0.2.0/ripperdoc/cli/ui/rich_ui.py +1025 -0
- ripperdoc-0.2.0/ripperdoc/cli/ui/spinner.py +49 -0
- ripperdoc-0.2.0/ripperdoc/core/__init__.py +1 -0
- ripperdoc-0.2.0/ripperdoc/core/agents.py +308 -0
- ripperdoc-0.2.0/ripperdoc/core/commands.py +33 -0
- ripperdoc-0.2.0/ripperdoc/core/config.py +382 -0
- ripperdoc-0.2.0/ripperdoc/core/default_tools.py +63 -0
- ripperdoc-0.2.0/ripperdoc/core/permissions.py +227 -0
- ripperdoc-0.2.0/ripperdoc/core/query.py +684 -0
- ripperdoc-0.2.0/ripperdoc/core/system_prompt.py +418 -0
- ripperdoc-0.2.0/ripperdoc/core/tool.py +214 -0
- ripperdoc-0.2.0/ripperdoc/sdk/__init__.py +9 -0
- ripperdoc-0.2.0/ripperdoc/sdk/client.py +309 -0
- ripperdoc-0.2.0/ripperdoc/tools/__init__.py +1 -0
- ripperdoc-0.2.0/ripperdoc/tools/background_shell.py +291 -0
- ripperdoc-0.2.0/ripperdoc/tools/bash_output_tool.py +98 -0
- ripperdoc-0.2.0/ripperdoc/tools/bash_tool.py +822 -0
- ripperdoc-0.2.0/ripperdoc/tools/file_edit_tool.py +281 -0
- ripperdoc-0.2.0/ripperdoc/tools/file_read_tool.py +168 -0
- ripperdoc-0.2.0/ripperdoc/tools/file_write_tool.py +147 -0
- ripperdoc-0.2.0/ripperdoc/tools/glob_tool.py +134 -0
- ripperdoc-0.2.0/ripperdoc/tools/grep_tool.py +232 -0
- ripperdoc-0.2.0/ripperdoc/tools/kill_bash_tool.py +136 -0
- ripperdoc-0.2.0/ripperdoc/tools/ls_tool.py +298 -0
- ripperdoc-0.2.0/ripperdoc/tools/mcp_tools.py +810 -0
- ripperdoc-0.2.0/ripperdoc/tools/multi_edit_tool.py +393 -0
- ripperdoc-0.2.0/ripperdoc/tools/notebook_edit_tool.py +325 -0
- ripperdoc-0.2.0/ripperdoc/tools/task_tool.py +290 -0
- ripperdoc-0.2.0/ripperdoc/tools/todo_tool.py +362 -0
- ripperdoc-0.2.0/ripperdoc/tools/tool_search_tool.py +368 -0
- ripperdoc-0.2.0/ripperdoc/utils/__init__.py +1 -0
- ripperdoc-0.2.0/ripperdoc/utils/bash_constants.py +51 -0
- ripperdoc-0.2.0/ripperdoc/utils/bash_output_utils.py +43 -0
- ripperdoc-0.2.0/ripperdoc/utils/exit_code_handlers.py +241 -0
- ripperdoc-0.2.0/ripperdoc/utils/log.py +76 -0
- ripperdoc-0.2.0/ripperdoc/utils/mcp.py +435 -0
- ripperdoc-0.2.0/ripperdoc/utils/memory.py +239 -0
- ripperdoc-0.2.0/ripperdoc/utils/message_compaction.py +656 -0
- ripperdoc-0.2.0/ripperdoc/utils/messages.py +399 -0
- ripperdoc-0.2.0/ripperdoc/utils/output_utils.py +233 -0
- ripperdoc-0.2.0/ripperdoc/utils/path_utils.py +46 -0
- ripperdoc-0.2.0/ripperdoc/utils/permissions/__init__.py +21 -0
- ripperdoc-0.2.0/ripperdoc/utils/permissions/path_validation_utils.py +165 -0
- ripperdoc-0.2.0/ripperdoc/utils/permissions/shell_command_validation.py +74 -0
- ripperdoc-0.2.0/ripperdoc/utils/permissions/tool_permission_utils.py +279 -0
- ripperdoc-0.2.0/ripperdoc/utils/safe_get_cwd.py +24 -0
- ripperdoc-0.2.0/ripperdoc/utils/sandbox_utils.py +38 -0
- ripperdoc-0.2.0/ripperdoc/utils/session_history.py +223 -0
- ripperdoc-0.2.0/ripperdoc/utils/session_usage.py +110 -0
- ripperdoc-0.2.0/ripperdoc/utils/shell_token_utils.py +95 -0
- ripperdoc-0.2.0/ripperdoc/utils/todo.py +199 -0
- ripperdoc-0.2.0/ripperdoc.egg-info/PKG-INFO +178 -0
- ripperdoc-0.2.0/ripperdoc.egg-info/SOURCES.txt +95 -0
- ripperdoc-0.2.0/ripperdoc.egg-info/dependency_links.txt +1 -0
- ripperdoc-0.2.0/ripperdoc.egg-info/entry_points.txt +3 -0
- ripperdoc-0.2.0/ripperdoc.egg-info/requires.txt +17 -0
- ripperdoc-0.2.0/ripperdoc.egg-info/top_level.txt +1 -0
- ripperdoc-0.2.0/setup.cfg +4 -0
- ripperdoc-0.2.0/setup.py +10 -0
- ripperdoc-0.2.0/tests/test_cli_commands.py +85 -0
- ripperdoc-0.2.0/tests/test_config.py +78 -0
- ripperdoc-0.2.0/tests/test_context_limits.py +34 -0
- ripperdoc-0.2.0/tests/test_messages.py +70 -0
- ripperdoc-0.2.0/tests/test_permissions.py +150 -0
- ripperdoc-0.2.0/tests/test_sdk.py +46 -0
- ripperdoc-0.2.0/tests/test_shell_permissions.py +124 -0
- ripperdoc-0.2.0/tests/test_todo.py +84 -0
- ripperdoc-0.2.0/tests/test_tool_search.py +100 -0
- ripperdoc-0.2.0/tests/test_tools.py +555 -0
ripperdoc-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
16
|
+
|
|
17
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
18
|
+
|
|
19
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
20
|
+
|
|
21
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
22
|
+
|
|
23
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
24
|
+
|
|
25
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
26
|
+
|
|
27
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
28
|
+
|
|
29
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
30
|
+
|
|
31
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
32
|
+
|
|
33
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
34
|
+
|
|
35
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
36
|
+
|
|
37
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
38
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
39
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
41
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
42
|
+
|
|
43
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
44
|
+
|
|
45
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
46
|
+
|
|
47
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
48
|
+
|
|
49
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
50
|
+
|
|
51
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
52
|
+
|
|
53
|
+
END OF TERMS AND CONDITIONS
|
ripperdoc-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ripperdoc
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: AI-powered terminal assistant for coding tasks
|
|
5
|
+
Author: Ripperdoc Team
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: anthropic>=0.39.0
|
|
18
|
+
Requires-Dist: openai>=1.0.0
|
|
19
|
+
Requires-Dist: click>=8.1.0
|
|
20
|
+
Requires-Dist: rich>=13.0.0
|
|
21
|
+
Requires-Dist: pydantic>=2.0.0
|
|
22
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
23
|
+
Requires-Dist: aiofiles>=23.0.0
|
|
24
|
+
Requires-Dist: prompt-toolkit>=3.0.0
|
|
25
|
+
Requires-Dist: PyYAML>=6.0.0
|
|
26
|
+
Requires-Dist: mcp[cli]>=1.22.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
30
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# Ripperdoc - AI-Powered Terminal Assistant
|
|
36
|
+
|
|
37
|
+
Ripperdoc is an AI-powered terminal assistant for coding tasks, providing an interactive interface for AI-assisted development, file management, and command execution.
|
|
38
|
+
|
|
39
|
+
[中文文档](README_CN.md) | [Contributing](CONTRIBUTING.md) | [Documentation](docs/)
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- **AI-Powered Assistance** - Uses AI models to understand and respond to coding requests
|
|
43
|
+
- **Multi-Model Support** - Support for Anthropic Claude and OpenAI models
|
|
44
|
+
- **Code Editing** - Directly edit files with intelligent suggestions
|
|
45
|
+
- **Codebase Understanding** - Analyzes project structure and code relationships
|
|
46
|
+
- **Command Execution** - Run shell commands with real-time feedback
|
|
47
|
+
- **Tool System** - Extensible architecture with specialized tools
|
|
48
|
+
- **Subagents** - Delegate tasks to specialized agents with their own tool scopes
|
|
49
|
+
- **File Operations** - Read, write, edit, search, and manage files
|
|
50
|
+
- **Todo Tracking** - Plan, read, and update persistent todo lists per project
|
|
51
|
+
- **Background Commands** - Run commands in background and monitor output
|
|
52
|
+
- **Permission System** - Safe mode with permission prompts for operations
|
|
53
|
+
- **Multi-Edit Support** - Batch edit operations on files
|
|
54
|
+
- **MCP Server Support** - Integration with Model Context Protocol servers
|
|
55
|
+
- **Subagent System** - Delegate tasks to specialized agents
|
|
56
|
+
- **Session Management** - Persistent session history and usage tracking
|
|
57
|
+
- **Jupyter Notebook Support** - Edit .ipynb files directly
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
### Quick Installation
|
|
62
|
+
Install from git repository:
|
|
63
|
+
```bash
|
|
64
|
+
pip install git+https://github.com/quantmew/ripperdoc.git
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or install from source:
|
|
68
|
+
```bash
|
|
69
|
+
# Clone the repository
|
|
70
|
+
git clone <repository-url>
|
|
71
|
+
cd Ripperdoc
|
|
72
|
+
|
|
73
|
+
# Install from source
|
|
74
|
+
pip install -e .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Configuration
|
|
78
|
+
|
|
79
|
+
Set your API key as an environment variable:
|
|
80
|
+
```bash
|
|
81
|
+
export OPENAI_API_KEY="your-api-key-here"
|
|
82
|
+
# or for Anthropic Claude
|
|
83
|
+
export ANTHROPIC_API_KEY="your-api-key-here"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Usage
|
|
87
|
+
|
|
88
|
+
### Interactive Mode (Recommended)
|
|
89
|
+
```bash
|
|
90
|
+
ripperdoc
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This launches an interactive session where you can:
|
|
94
|
+
- Ask questions about your codebase
|
|
95
|
+
- Request code modifications
|
|
96
|
+
- Execute commands
|
|
97
|
+
- Navigate and explore files
|
|
98
|
+
|
|
99
|
+
### Python SDK (headless)
|
|
100
|
+
|
|
101
|
+
Use Ripperdoc without the terminal UI via the new Python SDK. See [docs/SDK_USAGE.md](docs/SDK_USAGE.md) for examples of the one-shot `query` helper and the session-based `RipperdocClient`. 中文指南见 [docs/SDK_USAGE_CN.md](docs/SDK_USAGE_CN.md)。
|
|
102
|
+
|
|
103
|
+
#### SDK Examples
|
|
104
|
+
|
|
105
|
+
- **Basic Usage**: Simple one-shot queries
|
|
106
|
+
- **Session Management**: Persistent sessions with context
|
|
107
|
+
- **Tool Integration**: Direct tool access and customization
|
|
108
|
+
- **Configuration**: Custom model providers and settings
|
|
109
|
+
|
|
110
|
+
See the [examples/](examples/) directory for complete SDK usage examples.
|
|
111
|
+
|
|
112
|
+
### Safe Mode Permissions
|
|
113
|
+
|
|
114
|
+
Safe mode is the default. Use `--unsafe` to skip permission prompts. Choose `a`/`always` to allow a tool for the current session (not persisted across sessions).
|
|
115
|
+
|
|
116
|
+
## Examples
|
|
117
|
+
|
|
118
|
+
### Code Analysis
|
|
119
|
+
```
|
|
120
|
+
> Can you explain what this function does?
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### File Operations
|
|
124
|
+
```
|
|
125
|
+
> Read the main.py file and suggest improvements
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Code Generation
|
|
129
|
+
```
|
|
130
|
+
> Create a new Python script that implements a REST API client
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Project Navigation
|
|
134
|
+
```
|
|
135
|
+
> Show me all the Python files in the project
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Development
|
|
139
|
+
|
|
140
|
+
### Setup Development Environment
|
|
141
|
+
```bash
|
|
142
|
+
# Install development dependencies
|
|
143
|
+
pip install -e ".[dev]"
|
|
144
|
+
|
|
145
|
+
# Run tests
|
|
146
|
+
pytest
|
|
147
|
+
|
|
148
|
+
# Type checking
|
|
149
|
+
mypy ripperdoc
|
|
150
|
+
|
|
151
|
+
# Code formatting
|
|
152
|
+
black ripperdoc
|
|
153
|
+
|
|
154
|
+
# Linting
|
|
155
|
+
ruff ripperdoc
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
|
161
|
+
|
|
162
|
+
### Key License Terms
|
|
163
|
+
|
|
164
|
+
- **Commercial Use**: Permitted
|
|
165
|
+
- **Distribution**: Permitted
|
|
166
|
+
- **Modification**: Permitted
|
|
167
|
+
- **Patent Grant**: Included
|
|
168
|
+
- **Private Use**: Permitted
|
|
169
|
+
- **Sublicensing**: Permitted
|
|
170
|
+
- **Trademark Use**: Not granted
|
|
171
|
+
|
|
172
|
+
For full license terms and conditions, please refer to the [LICENSE](LICENSE) file.
|
|
173
|
+
|
|
174
|
+
## Credits
|
|
175
|
+
|
|
176
|
+
Inspired by:
|
|
177
|
+
- [Claude Code](https://claude.com/claude-code) - Anthropic 官方 CLI
|
|
178
|
+
- [aider](https://github.com/paul-gauthier/aider) - AI pair programming tool
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Ripperdoc - AI-Powered Terminal Assistant
|
|
2
|
+
|
|
3
|
+
Ripperdoc is an AI-powered terminal assistant for coding tasks, providing an interactive interface for AI-assisted development, file management, and command execution.
|
|
4
|
+
|
|
5
|
+
[中文文档](README_CN.md) | [Contributing](CONTRIBUTING.md) | [Documentation](docs/)
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- **AI-Powered Assistance** - Uses AI models to understand and respond to coding requests
|
|
9
|
+
- **Multi-Model Support** - Support for Anthropic Claude and OpenAI models
|
|
10
|
+
- **Code Editing** - Directly edit files with intelligent suggestions
|
|
11
|
+
- **Codebase Understanding** - Analyzes project structure and code relationships
|
|
12
|
+
- **Command Execution** - Run shell commands with real-time feedback
|
|
13
|
+
- **Tool System** - Extensible architecture with specialized tools
|
|
14
|
+
- **Subagents** - Delegate tasks to specialized agents with their own tool scopes
|
|
15
|
+
- **File Operations** - Read, write, edit, search, and manage files
|
|
16
|
+
- **Todo Tracking** - Plan, read, and update persistent todo lists per project
|
|
17
|
+
- **Background Commands** - Run commands in background and monitor output
|
|
18
|
+
- **Permission System** - Safe mode with permission prompts for operations
|
|
19
|
+
- **Multi-Edit Support** - Batch edit operations on files
|
|
20
|
+
- **MCP Server Support** - Integration with Model Context Protocol servers
|
|
21
|
+
- **Subagent System** - Delegate tasks to specialized agents
|
|
22
|
+
- **Session Management** - Persistent session history and usage tracking
|
|
23
|
+
- **Jupyter Notebook Support** - Edit .ipynb files directly
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
### Quick Installation
|
|
28
|
+
Install from git repository:
|
|
29
|
+
```bash
|
|
30
|
+
pip install git+https://github.com/quantmew/ripperdoc.git
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or install from source:
|
|
34
|
+
```bash
|
|
35
|
+
# Clone the repository
|
|
36
|
+
git clone <repository-url>
|
|
37
|
+
cd Ripperdoc
|
|
38
|
+
|
|
39
|
+
# Install from source
|
|
40
|
+
pip install -e .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Configuration
|
|
44
|
+
|
|
45
|
+
Set your API key as an environment variable:
|
|
46
|
+
```bash
|
|
47
|
+
export OPENAI_API_KEY="your-api-key-here"
|
|
48
|
+
# or for Anthropic Claude
|
|
49
|
+
export ANTHROPIC_API_KEY="your-api-key-here"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
### Interactive Mode (Recommended)
|
|
55
|
+
```bash
|
|
56
|
+
ripperdoc
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This launches an interactive session where you can:
|
|
60
|
+
- Ask questions about your codebase
|
|
61
|
+
- Request code modifications
|
|
62
|
+
- Execute commands
|
|
63
|
+
- Navigate and explore files
|
|
64
|
+
|
|
65
|
+
### Python SDK (headless)
|
|
66
|
+
|
|
67
|
+
Use Ripperdoc without the terminal UI via the new Python SDK. See [docs/SDK_USAGE.md](docs/SDK_USAGE.md) for examples of the one-shot `query` helper and the session-based `RipperdocClient`. 中文指南见 [docs/SDK_USAGE_CN.md](docs/SDK_USAGE_CN.md)。
|
|
68
|
+
|
|
69
|
+
#### SDK Examples
|
|
70
|
+
|
|
71
|
+
- **Basic Usage**: Simple one-shot queries
|
|
72
|
+
- **Session Management**: Persistent sessions with context
|
|
73
|
+
- **Tool Integration**: Direct tool access and customization
|
|
74
|
+
- **Configuration**: Custom model providers and settings
|
|
75
|
+
|
|
76
|
+
See the [examples/](examples/) directory for complete SDK usage examples.
|
|
77
|
+
|
|
78
|
+
### Safe Mode Permissions
|
|
79
|
+
|
|
80
|
+
Safe mode is the default. Use `--unsafe` to skip permission prompts. Choose `a`/`always` to allow a tool for the current session (not persisted across sessions).
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
### Code Analysis
|
|
85
|
+
```
|
|
86
|
+
> Can you explain what this function does?
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### File Operations
|
|
90
|
+
```
|
|
91
|
+
> Read the main.py file and suggest improvements
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Code Generation
|
|
95
|
+
```
|
|
96
|
+
> Create a new Python script that implements a REST API client
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Project Navigation
|
|
100
|
+
```
|
|
101
|
+
> Show me all the Python files in the project
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
### Setup Development Environment
|
|
107
|
+
```bash
|
|
108
|
+
# Install development dependencies
|
|
109
|
+
pip install -e ".[dev]"
|
|
110
|
+
|
|
111
|
+
# Run tests
|
|
112
|
+
pytest
|
|
113
|
+
|
|
114
|
+
# Type checking
|
|
115
|
+
mypy ripperdoc
|
|
116
|
+
|
|
117
|
+
# Code formatting
|
|
118
|
+
black ripperdoc
|
|
119
|
+
|
|
120
|
+
# Linting
|
|
121
|
+
ruff ripperdoc
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
|
127
|
+
|
|
128
|
+
### Key License Terms
|
|
129
|
+
|
|
130
|
+
- **Commercial Use**: Permitted
|
|
131
|
+
- **Distribution**: Permitted
|
|
132
|
+
- **Modification**: Permitted
|
|
133
|
+
- **Patent Grant**: Included
|
|
134
|
+
- **Private Use**: Permitted
|
|
135
|
+
- **Sublicensing**: Permitted
|
|
136
|
+
- **Trademark Use**: Not granted
|
|
137
|
+
|
|
138
|
+
For full license terms and conditions, please refer to the [LICENSE](LICENSE) file.
|
|
139
|
+
|
|
140
|
+
## Credits
|
|
141
|
+
|
|
142
|
+
Inspired by:
|
|
143
|
+
- [Claude Code](https://claude.com/claude-code) - Anthropic 官方 CLI
|
|
144
|
+
- [aider](https://github.com/paul-gauthier/aider) - AI pair programming tool
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=65.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ripperdoc"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "AI-powered terminal assistant for coding tasks"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = {text = "Apache-2.0"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Ripperdoc Team"}
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: Apache Software License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
dependencies = [
|
|
26
|
+
"anthropic>=0.39.0",
|
|
27
|
+
"openai>=1.0.0",
|
|
28
|
+
"click>=8.1.0",
|
|
29
|
+
"rich>=13.0.0",
|
|
30
|
+
"pydantic>=2.0.0",
|
|
31
|
+
"python-dotenv>=1.0.0",
|
|
32
|
+
"aiofiles>=23.0.0",
|
|
33
|
+
"prompt-toolkit>=3.0.0",
|
|
34
|
+
"PyYAML>=6.0.0",
|
|
35
|
+
"mcp[cli]>=1.22.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
dev = [
|
|
40
|
+
"pytest>=7.0.0",
|
|
41
|
+
"pytest-asyncio>=0.21.0",
|
|
42
|
+
"mypy>=1.0.0",
|
|
43
|
+
"black>=23.0.0",
|
|
44
|
+
"ruff>=0.1.0",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.scripts]
|
|
48
|
+
ripperdoc = "ripperdoc.cli.cli:main"
|
|
49
|
+
rd = "ripperdoc.cli.cli:main"
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.packages.find]
|
|
52
|
+
where = ["."]
|
|
53
|
+
include = ["ripperdoc*"]
|
|
54
|
+
|
|
55
|
+
[tool.black]
|
|
56
|
+
line-length = 100
|
|
57
|
+
target-version = ["py310", "py311", "py312"]
|
|
58
|
+
|
|
59
|
+
[tool.mypy]
|
|
60
|
+
python_version = "3.10"
|
|
61
|
+
warn_return_any = true
|
|
62
|
+
warn_unused_configs = true
|
|
63
|
+
disallow_untyped_defs = true
|
|
64
|
+
|
|
65
|
+
[tool.ruff]
|
|
66
|
+
line-length = 100
|
|
67
|
+
target-version = "py310"
|
|
68
|
+
|
|
69
|
+
[tool.pytest.ini_options]
|
|
70
|
+
testpaths = ["tests"]
|
|
71
|
+
asyncio_mode = "auto"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Ripperdoc - AI-Powered Coding Agent
|
|
3
|
+
|
|
4
|
+
A Python implementation of an AI coding assistant.
|
|
5
|
+
|
|
6
|
+
Features:
|
|
7
|
+
- Execute bash commands
|
|
8
|
+
- Read and edit files
|
|
9
|
+
- Search code with glob and grep
|
|
10
|
+
- AI-powered code assistance
|
|
11
|
+
- Multi-model support
|
|
12
|
+
|
|
13
|
+
Quick Start:
|
|
14
|
+
pip install -e .
|
|
15
|
+
ripperdoc -p "your prompt here"
|
|
16
|
+
|
|
17
|
+
For more information:
|
|
18
|
+
- README.md: Project overview
|
|
19
|
+
- QUICKSTART.md: Quick start guide
|
|
20
|
+
- DEVELOPMENT.md: Development guide
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from ripperdoc import __version__
|
|
24
|
+
|
|
25
|
+
__all__ = ["__version__"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""CLI interface for Ripperdoc."""
|