janito 0.12.0__py3-none-any.whl → 0.14.0__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.
- janito/__init__.py +1 -1
- janito/cli/agent/__init__.py +7 -0
- janito/cli/agent/conversation.py +149 -0
- janito/cli/agent/initialization.py +172 -0
- janito/cli/agent/query.py +108 -0
- janito/cli/agent.py +7 -282
- janito/cli/app.py +105 -9
- janito/cli/commands/__init__.py +12 -0
- janito/cli/commands/config.py +242 -0
- janito/cli/commands/history.py +119 -0
- janito/cli/commands/profile.py +72 -0
- janito/cli/commands/validation.py +24 -0
- janito/cli/commands/workspace.py +31 -0
- janito/cli/commands.py +9 -326
- janito/config.py +37 -0
- janito/data/instructions_template.txt +9 -5
- janito/tools/__init__.py +8 -2
- janito/tools/bash/bash.py +3 -1
- janito/tools/bash/unix_persistent_bash.py +183 -181
- janito/tools/bash/win_persistent_bash.py +4 -2
- janito/tools/fetch_webpage/__init__.py +22 -33
- janito/tools/fetch_webpage/core.py +182 -155
- janito/tools/rich_console.py +46 -9
- janito/tools/search_text.py +225 -238
- janito/tools/str_replace_editor/handlers/str_replace.py +3 -1
- janito/tools/str_replace_editor/handlers/view.py +14 -8
- janito/tools/think.py +37 -0
- janito/tools/usage_tracker.py +1 -0
- janito-0.14.0.dist-info/METADATA +396 -0
- janito-0.14.0.dist-info/RECORD +53 -0
- janito/test_file.py +0 -4
- janito/tools/fetch_webpage/chunking.py +0 -76
- janito/tools/fetch_webpage/extractors.py +0 -276
- janito/tools/fetch_webpage/news.py +0 -137
- janito/tools/fetch_webpage/utils.py +0 -108
- janito-0.12.0.dist-info/METADATA +0 -203
- janito-0.12.0.dist-info/RECORD +0 -47
- {janito-0.12.0.dist-info → janito-0.14.0.dist-info}/WHEEL +0 -0
- {janito-0.12.0.dist-info → janito-0.14.0.dist-info}/entry_points.txt +0 -0
- {janito-0.12.0.dist-info → janito-0.14.0.dist-info}/licenses/LICENSE +0 -0
janito-0.12.0.dist-info/METADATA
DELETED
@@ -1,203 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: janito
|
3
|
-
Version: 0.12.0
|
4
|
-
Summary: Janito CLI tool
|
5
|
-
Project-URL: Homepage, https://github.com/joaompinto/janito
|
6
|
-
Author-email: João Pinto <lamego.pinto@gmail.com>
|
7
|
-
License-File: LICENSE
|
8
|
-
Requires-Python: >=3.8
|
9
|
-
Requires-Dist: anthropic>=0.5.0
|
10
|
-
Requires-Dist: beautifulsoup4>=4.13.0
|
11
|
-
Requires-Dist: claudine>=0.1.0
|
12
|
-
Requires-Dist: jinja2>=3.0.0
|
13
|
-
Requires-Dist: lxml-html-clean>=0.4.1
|
14
|
-
Requires-Dist: newspaper3k>=0.2.8
|
15
|
-
Requires-Dist: requests>=2.32.0
|
16
|
-
Requires-Dist: rich>=13.0.0
|
17
|
-
Requires-Dist: trafilatura>=1.6.0
|
18
|
-
Requires-Dist: typer>=0.9.0
|
19
|
-
Description-Content-Type: text/markdown
|
20
|
-
|
21
|
-
# 🤖 Janito
|
22
|
-
|
23
|
-
Janito is a powerful AI-assisted command-line interface (CLI) tool built with Python, leveraging Anthropic's Claude for intelligent code and file management.
|
24
|
-
|
25
|
-
[](https://github.com/joaompinto/janito)
|
26
|
-
|
27
|
-
## ✨ Features
|
28
|
-
|
29
|
-
- 🧠 Intelligent AI assistant powered by Claude
|
30
|
-
- 📁 File management capabilities with real-time output
|
31
|
-
- 🔍 Smart code search and editing
|
32
|
-
- 💻 Interactive terminal interface with rich formatting
|
33
|
-
- 📊 Detailed token usage tracking and cost reporting with cache savings analysis
|
34
|
-
- 🛑 Token and tool usage reporting even when interrupted with Ctrl+C
|
35
|
-
- 🌐 Web page fetching with content extraction capabilities
|
36
|
-
- 🔄 Parameter profiles for optimizing Claude's behavior for different tasks
|
37
|
-
- 📋 Line delta tracking to monitor net changes in files
|
38
|
-
|
39
|
-
## 🛠️ System Requirements
|
40
|
-
|
41
|
-
- **Python 3.8+** - Janito requires Python 3.8 or higher
|
42
|
-
- **Operating Systems**:
|
43
|
-
- Linux/macOS: Native support
|
44
|
-
- Windows: Requires Git Bash for proper operation of CLI tools
|
45
|
-
- **Anthropic API Key** - Required for Claude AI integration
|
46
|
-
|
47
|
-
## 🛠️ Installation
|
48
|
-
|
49
|
-
```bash
|
50
|
-
# Install directly from PyPI
|
51
|
-
pip install janito
|
52
|
-
```
|
53
|
-
|
54
|
-
### Setting up your API Key
|
55
|
-
|
56
|
-
Janito requires an Anthropic API key to function. You can:
|
57
|
-
1. Set the API key: `janito --set-api-key your_api_key`
|
58
|
-
|
59
|
-
For development or installation from source, please see [README_DEV.md](README_DEV.md).
|
60
|
-
|
61
|
-
## 🚀 Usage Tutorial
|
62
|
-
|
63
|
-
After installation, you can start using Janito right away. Let's walk through a simple tutorial:
|
64
|
-
|
65
|
-
### Getting Started
|
66
|
-
|
67
|
-
First, let's check that everything is working:
|
68
|
-
|
69
|
-
```bash
|
70
|
-
# Get help and see available commands
|
71
|
-
janito --help
|
72
|
-
```
|
73
|
-
|
74
|
-
### Tutorial: Creating a Simple Project
|
75
|
-
|
76
|
-
Let's create a simple HTML project with Janito's help:
|
77
|
-
|
78
|
-
After installing Janito, using your prefered editor and/or terminal, go to a new empty folder.
|
79
|
-
|
80
|
-
Use the janito command to create a new project.
|
81
|
-
|
82
|
-
```bash
|
83
|
-
# Step 1: Create a new project structure
|
84
|
-
janito "Create a simple HTML page with a calculator and 3 columns with text for the 3 main activities of the Kazakh culture"
|
85
|
-
```
|
86
|
-
Browse the resulting html page.
|
87
|
-
|
88
|
-
### Tutorial: Adding Features
|
89
|
-
|
90
|
-
Now, let's enhance our example
|
91
|
-
|
92
|
-
```bash
|
93
|
-
# Step 2: Add multiplication and division features
|
94
|
-
janito "Add some svg icons and remove the calculator"
|
95
|
-
|
96
|
-
```
|
97
|
-
|
98
|
-
Refresh the page
|
99
|
-
|
100
|
-
### Exploring More Features
|
101
|
-
|
102
|
-
Janito offers many more capabilities:
|
103
|
-
|
104
|
-
```bash
|
105
|
-
# Show detailed token usage and cost information
|
106
|
-
janito --show-tokens "Explain what is in the project"
|
107
|
-
|
108
|
-
# Use a specific parameter profile for creative tasks
|
109
|
-
janito --profile creative "Write a fun description for our project"
|
110
|
-
|
111
|
-
# Continue previous conversation
|
112
|
-
janito --continue "Plese add one more line"
|
113
|
-
|
114
|
-
# Show current configuration and available profiles
|
115
|
-
janito --show-config
|
116
|
-
|
117
|
-
# You can press Ctrl+C at any time to interrupt a query
|
118
|
-
# Janito will still display token and tool usage information
|
119
|
-
```
|
120
|
-
|
121
|
-
## 🔧 Available Tools
|
122
|
-
|
123
|
-
Janito comes with several built-in tools:
|
124
|
-
- 📄 `str_replace_editor` - View, create, and edit files
|
125
|
-
- 🔎 `find_files` - Find files matching patterns
|
126
|
-
- 🗑️ `delete_file` - Delete files
|
127
|
-
- 🔍 `search_text` - Search for text patterns in files
|
128
|
-
- 🌐 `fetch_webpage` - Fetch and extract content from web pages
|
129
|
-
- 📋 `move_file` - Move files from one location to another
|
130
|
-
- 💻 `bash` - Execute bash commands with real-time output display
|
131
|
-
|
132
|
-
## 📊 Usage Tracking
|
133
|
-
|
134
|
-
Janito includes a comprehensive token usage tracking system that helps you monitor API costs:
|
135
|
-
|
136
|
-
- **Basic tracking**: By default, Janito displays a summary of token usage and cost after each query
|
137
|
-
- **Detailed reporting**: Use the `--show-tokens` or `-t` flag to see detailed breakdowns including:
|
138
|
-
- Input and output token counts
|
139
|
-
- Per-tool token usage statistics
|
140
|
-
- Precise cost calculations
|
141
|
-
- Cache performance metrics with savings analysis
|
142
|
-
- Line delta tracking for file modifications
|
143
|
-
|
144
|
-
```bash
|
145
|
-
# Show detailed token usage and cost information
|
146
|
-
janito --show-tokens "Write a Python function to sort a list"
|
147
|
-
|
148
|
-
# Basic usage (shows simplified token usage summary)
|
149
|
-
janito "Explain Docker containers"
|
150
|
-
```
|
151
|
-
|
152
|
-
The usage tracker automatically calculates cache savings, showing you how much you're saving by reusing previous responses.
|
153
|
-
|
154
|
-
## 📋 Parameter Profiles
|
155
|
-
|
156
|
-
Janito offers predefined parameter profiles to optimize Claude's behavior for different tasks:
|
157
|
-
|
158
|
-
- **precise**: Factual answers, documentation, structured data (temperature: 0.2)
|
159
|
-
- **balanced**: Professional writing, summarization, everyday tasks (temperature: 0.5)
|
160
|
-
- **conversational**: Natural dialogue, educational content (temperature: 0.7)
|
161
|
-
- **creative**: Storytelling, brainstorming, marketing copy (temperature: 0.9)
|
162
|
-
- **technical**: Code generation, debugging, technical problem-solving (temperature: 0.3)
|
163
|
-
|
164
|
-
```bash
|
165
|
-
# Use a specific profile
|
166
|
-
janito --profile creative "Write a poem about coding"
|
167
|
-
|
168
|
-
# View available profiles
|
169
|
-
janito --show-config
|
170
|
-
```
|
171
|
-
|
172
|
-
## ⚙️ Dependencies
|
173
|
-
|
174
|
-
Janito automatically installs the following dependencies:
|
175
|
-
- typer (>=0.9.0) - For CLI interface
|
176
|
-
- rich (>=13.0.0) - For rich text formatting
|
177
|
-
- claudine - For Claude AI integration
|
178
|
-
- Additional packages for file handling and web content extraction
|
179
|
-
|
180
|
-
## 🔑 API Key Configuration
|
181
|
-
|
182
|
-
You can configure your Anthropic API key in several ways:
|
183
|
-
|
184
|
-
```bash
|
185
|
-
# Option 1: Set as environment variable
|
186
|
-
export ANTHROPIC_API_KEY=your_api_key
|
187
|
-
|
188
|
-
# Option 2: Configure globally within Janito
|
189
|
-
janito --set-api-key your_api_key
|
190
|
-
|
191
|
-
# Option 3: Let Janito prompt you on first use
|
192
|
-
janito "Hello, I'm new to Janito!"
|
193
|
-
```
|
194
|
-
|
195
|
-
Your API key is securely stored and used for all future sessions.
|
196
|
-
|
197
|
-
## 💻 Development
|
198
|
-
|
199
|
-
For development instructions, please refer to [README_DEV.md](README_DEV.md).
|
200
|
-
|
201
|
-
## 📜 License
|
202
|
-
|
203
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
janito-0.12.0.dist-info/RECORD
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
janito/__init__.py,sha256=UhMcaPInS2sBvYxOLldeLu7sKy-ZZxndtrf6NPqQBgI,53
|
2
|
-
janito/__main__.py,sha256=Oy-Nc1tZkpyvTKuq1R8oHSuJTkvptN6H93kIHBu7DKY,107
|
3
|
-
janito/callbacks.py,sha256=E1FPXYHZUgiEGMabYuf999PSf_Su4ByHOWlc1-hMqWE,915
|
4
|
-
janito/config.py,sha256=haIErp8tVL6e_5h4fsgLqFib2aCAZZ3sIXa8wStn_yo,12424
|
5
|
-
janito/test_file.py,sha256=c6GWGdTYG3z-Y5XBao9Tmhmq3G-v0L37OfwLgBo8zIU,126
|
6
|
-
janito/token_report.py,sha256=Mks7o2yTxPChgQyBJNoQ5eMmrhSgEM4LKCKi2tHJbVo,9580
|
7
|
-
janito/cli/__init__.py,sha256=dVi9l3E86YyukjxQ-XSUnMZkghnNasXex-X5XAOBiwk,85
|
8
|
-
janito/cli/agent.py,sha256=AYJhSqPbz1Ywz_RBzHxfXIK6x-aZrqA8-C2QzmxZ3J8,10533
|
9
|
-
janito/cli/app.py,sha256=RghsHSmvnECGWzoAeQOJdxHTZM_Xcw6Y4jgbJ5I6-5M,4131
|
10
|
-
janito/cli/commands.py,sha256=c1EHJ_VZR_3aA3zRvCLaBn9yfdj5emQpTI0Z_bXcIyc,12664
|
11
|
-
janito/cli/output.py,sha256=mo3hUokhrD4SWexUjCbLGGQeCDUf0369DA_i9BW7HjU,933
|
12
|
-
janito/cli/utils.py,sha256=gO4NtCNwtEzYDsQesrFlqB5FtYuw87yGwo4iG3nINgw,661
|
13
|
-
janito/data/instructions_template.txt,sha256=oXmjVEajwLuTjcyXyD123CGSjNG1QLbfzbw9iEq-w5w,1411
|
14
|
-
janito/tools/__init__.py,sha256=hio75FRkxLSQB13We-SCCM7Qa9lMqWCfWhEonHlTr8M,1405
|
15
|
-
janito/tools/decorators.py,sha256=Tp48n5y4LKsjyV3HeOA9wk2dV413RrEG-23kRyQVlKs,2522
|
16
|
-
janito/tools/delete_file.py,sha256=UrZ5q59SIxWfuJcqgol6yPBqL-RhO9lFCF4MqAc6o00,2252
|
17
|
-
janito/tools/find_files.py,sha256=c_N9ETcRPprQeuZYanwFnl-9E05ZqUYhNVoCRS5uqQg,8300
|
18
|
-
janito/tools/move_file.py,sha256=FCs1ghalfHlXmcbAA_IlLcUll9hTOU1MMFGrTWopXvM,2741
|
19
|
-
janito/tools/prompt_user.py,sha256=OnTiWVBCbL_2MYu7oThlKr8X_pnYdG-dzxXSOgJF41c,1942
|
20
|
-
janito/tools/replace_file.py,sha256=i4GoLtS14eKSU5lYI18mJ96S0_ekeHMwlQfazg-fxrM,2296
|
21
|
-
janito/tools/rich_console.py,sha256=VyLStA7fCgMGp9KZ0TYHAC3FOOAWKKHx1XTWWWF2ISI,4560
|
22
|
-
janito/tools/search_text.py,sha256=hZLgKlF_cC5JRQ2XsussndSZMmptwr8d0tTKCyCXFwg,9755
|
23
|
-
janito/tools/usage_tracker.py,sha256=IE7GVBDYsX2EDLjsVaVqTeAnT2SAYfcOJvBaH__wHdU,4613
|
24
|
-
janito/tools/bash/bash.py,sha256=gOYhp2CexuEjSSpHGhVQLr-Ooc67Etl7Br1TbRtY6vc,3577
|
25
|
-
janito/tools/bash/unix_persistent_bash.py,sha256=tFFhbG9rk1KcONmG0j6SZHrqYxCXELhzobRSTEHPFm0,6868
|
26
|
-
janito/tools/bash/win_persistent_bash.py,sha256=mMgAdRi7jlznq7ssNmgiSMEqzEI-rIV0kgYpndcum6U,12758
|
27
|
-
janito/tools/fetch_webpage/__init__.py,sha256=0RG0ev-yrfo8gPzt-36WMpVdY2qtMhk2Z-mVpq-7m1o,1076
|
28
|
-
janito/tools/fetch_webpage/chunking.py,sha256=mMtrZeirZ_GnKOOzeG8BijLVpSUI0-TA5Ioqi2HKb1A,2971
|
29
|
-
janito/tools/fetch_webpage/core.py,sha256=3XDvYnC_UbQUNumwWw32hfJhjJUEaPzzoF2yhxhwxos,7764
|
30
|
-
janito/tools/fetch_webpage/extractors.py,sha256=-jrLDRWfWyF2SNOATdRWrqETqnnDLbe2JUWtuyHKFOU,12043
|
31
|
-
janito/tools/fetch_webpage/news.py,sha256=Hp0uNTnRzTa-4hyegQbHSmLeSbkiSpx4cP2oP_hKLEQ,5378
|
32
|
-
janito/tools/fetch_webpage/utils.py,sha256=mkfwefD7U9HOktIwo1eP63v7dpVY-q06COUjaqnTT5M,3412
|
33
|
-
janito/tools/str_replace_editor/__init__.py,sha256=kYmscmQgft3Jzt3oCNz7k2FiRbJvku6OFDDC3Q_zoAA,144
|
34
|
-
janito/tools/str_replace_editor/editor.py,sha256=BckYfiMRUYDfDrbu871qMt2AfZexth_02QhwYYOd53g,2489
|
35
|
-
janito/tools/str_replace_editor/utils.py,sha256=akiPqCHjky_RwL9OitHJJ7uQ-3fNaA8wt_K_YO1EP6I,954
|
36
|
-
janito/tools/str_replace_editor/handlers/__init__.py,sha256=RP6JCeDRIL4R-lTpGowIoOAi64gg6VxZvJGp8Q2UOVU,373
|
37
|
-
janito/tools/str_replace_editor/handlers/create.py,sha256=s8RQE04kDAL7OLZA8WxJkDqTmJlGmCNiit4tIHnmNMo,2470
|
38
|
-
janito/tools/str_replace_editor/handlers/insert.py,sha256=eKHodm2ozKUlRMxWMLAsu9ca6unUo1jfXWwHSld-pSU,4061
|
39
|
-
janito/tools/str_replace_editor/handlers/str_replace.py,sha256=quHQ1vOqvXCPaC14W5iub01kKB4XNMqwh1odnXnhhxY,4459
|
40
|
-
janito/tools/str_replace_editor/handlers/undo.py,sha256=3OIdAWkpXC2iDe94_sfx_WxEFh3a1cRzoP0NtPXq1Ks,2491
|
41
|
-
janito/tools/str_replace_editor/handlers/view.py,sha256=ZWcx7r5VwxWG3ImQxK2lzONL9xlqctM-hy2kMF-huT0,6616
|
42
|
-
janito/data/instructions_template.txt,sha256=oXmjVEajwLuTjcyXyD123CGSjNG1QLbfzbw9iEq-w5w,1411
|
43
|
-
janito-0.12.0.dist-info/METADATA,sha256=oR3nvTukvj3uPVcZ2LbAA4lx46W08elLhWphDWXpAAs,6458
|
44
|
-
janito-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
45
|
-
janito-0.12.0.dist-info/entry_points.txt,sha256=JMbF_1jg-xQddidpAYkzjOKdw70fy_ymJfcmerY2wIY,47
|
46
|
-
janito-0.12.0.dist-info/licenses/LICENSE,sha256=6-H8LXExbBIAuT4cyiE-Qy8Bad1K4pagQRVTWr6wkhk,1096
|
47
|
-
janito-0.12.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|