jarvis-ai-assistant 0.1.12__py3-none-any.whl → 0.1.13__py3-none-any.whl

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.

Potentially problematic release.


This version of jarvis-ai-assistant might be problematic. Click here for more details.

jarvis/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Jarvis AI Assistant"""
2
2
 
3
- __version__ = "0.1.12"
3
+ __version__ = "0.1.13"
Binary file
Binary file
jarvis/main.py CHANGED
@@ -82,7 +82,25 @@ def main():
82
82
  try:
83
83
  kimi_api_key = os.getenv("KIMI_API_KEY")
84
84
  if not kimi_api_key:
85
- PrettyOutput.print("Kimi API key 未设置", OutputType.ERROR)
85
+ PrettyOutput.section("环境配置缺失", OutputType.ERROR)
86
+ PrettyOutput.print("\n需要设置 KIMI_API_KEY 才能使用 Jarvis。请按以下步骤操作:", OutputType.INFO, timestamp=False)
87
+ PrettyOutput.print("\n1. 获取 Kimi API Key:", OutputType.INFO, timestamp=False)
88
+ PrettyOutput.print(" • 访问 Kimi AI 平台: https://kimi.moonshot.cn", OutputType.INFO, timestamp=False)
89
+ PrettyOutput.print(" • 登录您的账号", OutputType.INFO, timestamp=False)
90
+ PrettyOutput.print(" • 打开浏览器开发者工具 (F12 或右键 -> 检查)", OutputType.INFO, timestamp=False)
91
+ PrettyOutput.print(" • 切换到 Network 标签页", OutputType.INFO, timestamp=False)
92
+ PrettyOutput.print(" • 发送任意消息", OutputType.INFO, timestamp=False)
93
+ PrettyOutput.print(" • 在请求中找到 Authorization 头部", OutputType.INFO, timestamp=False)
94
+ PrettyOutput.print(" • 复制 token 值(去掉 'Bearer ' 前缀)", OutputType.INFO, timestamp=False)
95
+
96
+ PrettyOutput.print("\n2. 设置环境变量:", OutputType.INFO, timestamp=False)
97
+ PrettyOutput.print(" 方法 1: 创建或编辑 ~/.jarvis_env 文件:", OutputType.INFO, timestamp=False)
98
+ PrettyOutput.print(" echo 'KIMI_API_KEY=your_key_here' > ~/.jarvis_env", OutputType.CODE, timestamp=False)
99
+
100
+ PrettyOutput.print("\n 方法 2: 直接设置环境变量:", OutputType.INFO, timestamp=False)
101
+ PrettyOutput.print(" export KIMI_API_KEY=your_key_here", OutputType.CODE, timestamp=False)
102
+
103
+ PrettyOutput.print("\n设置完成后重新运行 Jarvis。", OutputType.INFO, timestamp=False)
86
104
  return 1
87
105
 
88
106
  model = KimiModel(kimi_api_key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: Jarvis: An AI assistant that uses tools to interact with the system
5
5
  Home-page: https://github.com/skyfireitdiy/Jarvis
6
6
  Author: skyfire
@@ -72,6 +72,42 @@ Dynamic: requires-python
72
72
  - Multi-line input support
73
73
  - Colored output with progress indicators
74
74
 
75
+
76
+ ## ⚙️ Environment Setup
77
+
78
+ Before using Jarvis, you need to set up your environment:
79
+
80
+ 1. **API Key Configuration**
81
+
82
+ Create a `.jarvis_env` file in your home directory (`~/.jarvis_env`):
83
+
84
+ ```bash
85
+ KIMI_API_KEY=your_kimi_api_key_here
86
+ ```
87
+
88
+ To get your Kimi API key:
89
+ 1. Visit [Kimi AI Platform](https://kimi.moonshot.cn) in your browser
90
+ 2. Login to your account
91
+ 3. Open browser Developer Tools (F12 or right-click -> Inspect)
92
+ 4. Go to Network tab
93
+ 5. Make any request (e.g., send a message)
94
+ 6. Find a request to the Kimi API
95
+ 7. Look for the `Authorization` header in the request headers
96
+ 8. Copy the token value (remove the "Bearer " prefix)
97
+ 9. Use this token as your `KIMI_API_KEY` in the `.jarvis_env` file
98
+
99
+ 2. **Task Configuration (Optional)**
100
+
101
+ Create a `.jarvis` file in your working directory to define predefined tasks:
102
+
103
+ ```yaml
104
+ # .jarvis
105
+ analyze_code: Analyze the code structure and quality in the current directory
106
+ fix_bugs: Help me find and fix potential bugs in the code
107
+ optimize: Suggest optimizations for the code
108
+ document: Generate documentation for the code
109
+ ```
110
+
75
111
  ## 🚀 Installation
76
112
 
77
113
  ```bash
@@ -80,19 +116,44 @@ pip install jarvis-ai-assistant
80
116
 
81
117
  ## 💡 Usage
82
118
 
119
+ 1. **Basic Usage**
83
120
  ```bash
84
- # Quick Start
121
+ # Start Jarvis
85
122
  jarvis
86
123
 
87
- # Process files
124
+ # Process specific files
88
125
  jarvis -f file1.txt file2.py
126
+ ```
89
127
 
90
- # Using predefined tasks
91
- # Create .jarvis file in your working directory:
92
- analyze_code: Analyze the code in the current directory
93
- fix_bugs: Help me find and fix bugs in the code
128
+ 2. **Using Predefined Tasks**
129
+
130
+ If you have a `.jarvis` file in your working directory:
131
+ ```bash
132
+ # Jarvis will show available tasks on startup
133
+ # Select a task number or start a new conversation
94
134
  ```
95
135
 
136
+ 3. **Interactive Features**
137
+ - Multi-line input support (press Enter twice to submit)
138
+ - File understanding and analysis
139
+ - Context-aware conversations
140
+ - Tool integration for system operations
141
+
142
+ 4. **Environment Variables**
143
+ - `KIMI_API_KEY`: Your Kimi AI API key (required)
144
+ - Location: `~/.jarvis_env`
145
+ - Format: `KEY=value` (one per line)
146
+
147
+ 5. **Task Configuration**
148
+ - File: `.jarvis` in working directory
149
+ - Format: `task_name: task_description`
150
+ - Purpose: Define commonly used tasks for quick access
151
+ - Example tasks:
152
+ - Code analysis
153
+ - Bug finding
154
+ - Documentation generation
155
+ - Performance optimization
156
+
96
157
  ## 🧰 Tools
97
158
 
98
159
  | Tool | Description | Example |
@@ -1,10 +1,10 @@
1
- jarvis/__init__.py,sha256=famvLolv2Q7BJtAyM81Gi64oXQv1nh1rjb1kJ_f5hKc,50
1
+ jarvis/__init__.py,sha256=jrXHMn5gCi9cu3LcMmzS0ZilSm1247EmQAqdktXtCtI,50
2
2
  jarvis/agent.py,sha256=xo5YdY8UbgE3AJaitT1dXoNoVm769LrWyFzEXxVCG7A,8672
3
- jarvis/main.py,sha256=_1hE0MZ1OsIJpmlipUwtqFszh9rm7VmQcnnWr80o3p4,4176
3
+ jarvis/main.py,sha256=NnnMbAJxR_nfw74TI4paMSwm_1dHDA26WHwovJ2Dji0,5890
4
4
  jarvis/utils.py,sha256=3hLtv-HcBL8Ngw69cowhARuIFrjcQ6yRP3Y1o9CvtsI,5992
5
- jarvis/__pycache__/__init__.cpython-313.pyc,sha256=GspJR-EdT1vU33bJjBm_IcUrNBtFKVEhKoHJnyIYY5s,209
5
+ jarvis/__pycache__/__init__.cpython-313.pyc,sha256=ZPCBPXhfoJqLeQYXxIy9irsVB1FsLB6ZWJ3AWOJnLgM,209
6
6
  jarvis/__pycache__/agent.cpython-313.pyc,sha256=DP0zgyKjGuwc62rH_vpoy_hXmGMI3zoHPlXZYu0qqp4,9956
7
- jarvis/__pycache__/main.cpython-313.pyc,sha256=o80rvS95KbpeL4MSEoMC0rt0Y91-asDHbHPJU8M8kxo,5933
7
+ jarvis/__pycache__/main.cpython-313.pyc,sha256=BQNr4ZeU7-Bsa1NbfND9ZjH0In4dcF_63NExSEY5NSM,8142
8
8
  jarvis/__pycache__/models.cpython-313.pyc,sha256=uWuRIjGrY4YDB3dGW5PGDLWaS03et8g11O725TjY_eU,5960
9
9
  jarvis/__pycache__/tools.cpython-313.pyc,sha256=lAD4LrnnWzNZQmHXGfZ_2l7oskOpr2_2OC-gdFhxQY8,33933
10
10
  jarvis/__pycache__/utils.cpython-313.pyc,sha256=k4jyAlx4tlW0MKLMLzV7OOH9zsKrK0H955kY6M2SuFU,8772
@@ -32,8 +32,8 @@ jarvis/tools/__pycache__/user_confirmation.cpython-313.pyc,sha256=wK3Ev10lHSUSRv
32
32
  jarvis/tools/__pycache__/user_input.cpython-313.pyc,sha256=JjTFOhObKsKF4Pn8KBRuKfV1_Ssj083fjU7Mfc_5z7c,2531
33
33
  jarvis/tools/__pycache__/user_interaction.cpython-313.pyc,sha256=RuVZ-pmiPBDywY3efgXSfohMAciC1avMGPmBK5qlnew,3305
34
34
  jarvis/tools/__pycache__/webpage.cpython-313.pyc,sha256=BjzSfnNzsKCrLETCcWjt32lNDLzwnjqcVGg4JfWd9OM,3008
35
- jarvis_ai_assistant-0.1.12.dist-info/METADATA,sha256=BDwc5sbj9q6qHxq5KDMKdZCod0_PrMX-6H9YHWd0Pkg,3507
36
- jarvis_ai_assistant-0.1.12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
37
- jarvis_ai_assistant-0.1.12.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
38
- jarvis_ai_assistant-0.1.12.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
39
- jarvis_ai_assistant-0.1.12.dist-info/RECORD,,
35
+ jarvis_ai_assistant-0.1.13.dist-info/METADATA,sha256=eHll-S4aOAuIsUDqR4dcLL11uBIfipD6ySAC9N8oqlI,5233
36
+ jarvis_ai_assistant-0.1.13.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
37
+ jarvis_ai_assistant-0.1.13.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
38
+ jarvis_ai_assistant-0.1.13.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
39
+ jarvis_ai_assistant-0.1.13.dist-info/RECORD,,