janito 0.4.0__py3-none-any.whl → 0.5.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 +48 -1
- janito/__main__.py +29 -334
- janito/agents/__init__.py +22 -0
- janito/agents/agent.py +21 -0
- janito/{claude.py → agents/claudeai.py} +10 -5
- janito/agents/openai.py +53 -0
- janito/agents/test.py +34 -0
- janito/analysis/__init__.py +33 -0
- janito/analysis/display.py +149 -0
- janito/analysis/options.py +112 -0
- janito/analysis/prompts.py +75 -0
- janito/change/__init__.py +19 -0
- janito/change/applier.py +269 -0
- janito/{contentchange.py → change/content.py} +5 -27
- janito/change/indentation.py +33 -0
- janito/change/position.py +169 -0
- janito/changehistory.py +46 -0
- janito/changeviewer/__init__.py +12 -0
- janito/changeviewer/diff.py +28 -0
- janito/changeviewer/panels.py +268 -0
- janito/changeviewer/styling.py +59 -0
- janito/changeviewer/themes.py +57 -0
- janito/cli/__init__.py +2 -0
- janito/cli/commands.py +53 -0
- janito/cli/functions.py +286 -0
- janito/cli/registry.py +26 -0
- janito/common.py +9 -9
- janito/console/__init__.py +3 -0
- janito/console/commands.py +112 -0
- janito/console/core.py +62 -0
- janito/console/display.py +157 -0
- janito/fileparser.py +292 -83
- janito/prompts.py +21 -6
- janito/qa.py +7 -5
- janito/review.py +13 -0
- janito/scan.py +44 -5
- janito/tests/test_fileparser.py +26 -0
- janito-0.5.0.dist-info/METADATA +146 -0
- janito-0.5.0.dist-info/RECORD +45 -0
- janito/analysis.py +0 -281
- janito/changeapplier.py +0 -436
- janito/changeviewer.py +0 -350
- janito/console.py +0 -330
- janito-0.4.0.dist-info/METADATA +0 -164
- janito-0.4.0.dist-info/RECORD +0 -21
- /janito/{contextparser.py → _contextparser.py} +0 -0
- {janito-0.4.0.dist-info → janito-0.5.0.dist-info}/WHEEL +0 -0
- {janito-0.4.0.dist-info → janito-0.5.0.dist-info}/entry_points.txt +0 -0
- {janito-0.4.0.dist-info → janito-0.5.0.dist-info}/licenses/LICENSE +0 -0
janito-0.4.0.dist-info/METADATA
DELETED
@@ -1,164 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.3
|
2
|
-
Name: janito
|
3
|
-
Version: 0.4.0
|
4
|
-
Summary: A CLI tool for software development tasks powered by AI
|
5
|
-
Project-URL: Homepage, https://github.com/joaompinto/janito
|
6
|
-
Project-URL: Repository, https://github.com/joaompinto/janito.git
|
7
|
-
Author-email: João Pinto <lamego.pinto@gmail.com>
|
8
|
-
License: MIT
|
9
|
-
Classifier: Development Status :: 4 - Beta
|
10
|
-
Classifier: Environment :: Console
|
11
|
-
Classifier: Intended Audience :: Developers
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
16
|
-
Classifier: Topic :: Software Development
|
17
|
-
Requires-Python: >=3.8
|
18
|
-
Requires-Dist: anthropic
|
19
|
-
Requires-Dist: pathspec
|
20
|
-
Requires-Dist: rich
|
21
|
-
Requires-Dist: tomli
|
22
|
-
Requires-Dist: typer
|
23
|
-
Description-Content-Type: text/markdown
|
24
|
-
|
25
|
-
# 🤖 Janito CLI
|
26
|
-
|
27
|
-
A CLI tool for software development tasks powered by AI.
|
28
|
-
|
29
|
-
Meet Janito, your friendly AI-powered software development buddy! Janito helps you with coding tasks like refactoring, documentation updates, and code optimization while being clear and concise in its responses.
|
30
|
-
|
31
|
-
## 📥 Installation
|
32
|
-
|
33
|
-
```bash
|
34
|
-
# Install from PyPI
|
35
|
-
pip install janito
|
36
|
-
|
37
|
-
# Install from source
|
38
|
-
git clone https://github.com/joaompinto/janito.git
|
39
|
-
cd janito
|
40
|
-
pip install -e .
|
41
|
-
```
|
42
|
-
|
43
|
-
## ⚡ Requirements
|
44
|
-
|
45
|
-
- Python 3.8+
|
46
|
-
- Anthropic API key
|
47
|
-
- Required packages (automatically installed):
|
48
|
-
- typer
|
49
|
-
- pathspec
|
50
|
-
- rich
|
51
|
-
|
52
|
-
## ⚙️ Configuration
|
53
|
-
|
54
|
-
### 🔑 API Key Setup
|
55
|
-
Janito requires an Anthropic API key to function. Set it as an environment variable:
|
56
|
-
|
57
|
-
```bash
|
58
|
-
export ANTHROPIC_API_KEY='your-api-key-here'
|
59
|
-
```
|
60
|
-
|
61
|
-
You can also add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) for persistence.
|
62
|
-
|
63
|
-
### ⚙️ Test Command Setup
|
64
|
-
You can configure a test command to run before applying changes:
|
65
|
-
|
66
|
-
```bash
|
67
|
-
export JANITO_TEST_CMD='your-test-command'
|
68
|
-
```
|
69
|
-
|
70
|
-
This command will be executed in the preview directory before applying changes to verify they don't break anything.
|
71
|
-
|
72
|
-
## 📖 Usage
|
73
|
-
|
74
|
-
Janito can be used in two modes: Command Line or Interactive Console.
|
75
|
-
|
76
|
-
### 💻 Command Line Mode
|
77
|
-
|
78
|
-
```bash
|
79
|
-
janito REQUEST [OPTIONS]
|
80
|
-
```
|
81
|
-
|
82
|
-
#### Arguments
|
83
|
-
- `REQUEST`: The modification request to process (optional)
|
84
|
-
|
85
|
-
#### Options
|
86
|
-
##### General Options
|
87
|
-
- `--version`: Show version and exit
|
88
|
-
- `-w, --workdir PATH`: Working directory (defaults to current directory)
|
89
|
-
- `-i, --include PATH`: Additional paths to include in analysis (can be used multiple times)
|
90
|
-
|
91
|
-
##### Operation Modes
|
92
|
-
- `--ask TEXT`: Ask a question about the codebase instead of making changes
|
93
|
-
- `--scan`: Preview files that would be analyzed without making changes
|
94
|
-
- `--play PATH`: Replay a saved prompt file
|
95
|
-
|
96
|
-
##### Output Control
|
97
|
-
- `--raw`: Print raw response instead of markdown format
|
98
|
-
- `-v, --verbose`: Show verbose output
|
99
|
-
- `--debug`: Show debug information
|
100
|
-
|
101
|
-
##### Testing
|
102
|
-
- `-t, --test COMMAND`: Test command to run before applying changes (overrides JANITO_TEST_CMD)
|
103
|
-
|
104
|
-
### 🖥️ Interactive Console Mode
|
105
|
-
|
106
|
-
Start the interactive console by running `janito` without arguments:
|
107
|
-
|
108
|
-
```bash
|
109
|
-
janito
|
110
|
-
```
|
111
|
-
|
112
|
-
In console mode, you can:
|
113
|
-
- Enter requests directly
|
114
|
-
- Navigate history with up/down arrows
|
115
|
-
- Use special commands starting with /
|
116
|
-
|
117
|
-
### 📝 Examples
|
118
|
-
|
119
|
-
```bash
|
120
|
-
# Command Line Mode Examples
|
121
|
-
janito "create docstrings for all functions"
|
122
|
-
janito "add error handling" -w ./myproject
|
123
|
-
janito "update tests" -i ./tests -i ./lib
|
124
|
-
janito --ask "explain the authentication flow"
|
125
|
-
janito --scan # Preview files to be analyzed
|
126
|
-
|
127
|
-
# Test Command Examples
|
128
|
-
janito "update code" --test "pytest" # Run pytest before applying changes
|
129
|
-
janito "refactor module" -t "make test" # Run make test before applying
|
130
|
-
export JANITO_TEST_CMD="python -m unittest" # Set default test command
|
131
|
-
janito "optimize function" # Will use JANITO_TEST_CMD
|
132
|
-
|
133
|
-
# Console Mode
|
134
|
-
janito # Starts interactive session
|
135
|
-
```
|
136
|
-
|
137
|
-
## ✨ Features
|
138
|
-
|
139
|
-
- 🤖 AI-powered code analysis and modifications
|
140
|
-
- 💻 Interactive console mode for continuous interaction
|
141
|
-
- 📁 Support for multiple file types
|
142
|
-
- ✅ Syntax validation for Python files
|
143
|
-
- 👀 Interactive change preview and confirmation
|
144
|
-
- 📜 History tracking of all changes
|
145
|
-
- 🐛 Debug and verbose output modes
|
146
|
-
- ❓ Question-answering about codebase
|
147
|
-
- 🔍 File scanning preview
|
148
|
-
- 🧪 Test command execution before applying changes
|
149
|
-
|
150
|
-
## 📚 History and Debugging
|
151
|
-
|
152
|
-
Changes are automatically saved in `.janito/history/` with timestamps:
|
153
|
-
- `*_analysis.txt`: Initial analysis
|
154
|
-
- `*_selected.txt`: Selected implementation
|
155
|
-
- `*_changes.txt`: Actual changes
|
156
|
-
|
157
|
-
Enable debug mode for detailed logging:
|
158
|
-
```bash
|
159
|
-
janito "request" --debug
|
160
|
-
```
|
161
|
-
|
162
|
-
## 📄 License
|
163
|
-
|
164
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
janito-0.4.0.dist-info/RECORD
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
janito/__init__.py,sha256=CLeVFqpY9Ki3R3MgLAiTjNsJjsj1BD3_9CzP2kgCj-k,52
|
2
|
-
janito/__main__.py,sha256=DqbMlHNWCX-XwiZz1qEYP3qAADKtfmlDhhbTgpXB5_M,14158
|
3
|
-
janito/analysis.py,sha256=dAzMARAcDZ1LN6KC2-Xb0bIB0p5VsaT2lhurtPLLIKk,9368
|
4
|
-
janito/changeapplier.py,sha256=fDP87Hh3uY8qoSv3-SSnafLCRJHLPQZ5U8GIMkdVZ9Y,17697
|
5
|
-
janito/changeviewer.py,sha256=51J0pvGe1rfYpiYo0mhZMonsYJmyAN44mg1TfKRxdM4,12716
|
6
|
-
janito/claude.py,sha256=N7ZX6WCrLKcj9na3o2MMPqH8tlobHYtIG1HnhgMVUKw,2272
|
7
|
-
janito/common.py,sha256=1blM7rY55-mLPXD4L3xwS-RaJ2tBZx8xHhaLYQku3Rk,801
|
8
|
-
janito/config.py,sha256=ocg0lyab9ysgczKaqJTAtv0ZRa2VDMwclTJBgps7Vxw,1171
|
9
|
-
janito/console.py,sha256=E2mLPoBw7Gh1K1hPuCoRDBEFE-klIERt5KFgE3fHqUg,11100
|
10
|
-
janito/contentchange.py,sha256=2HkNhqA_ZIXDHfiv3xRcwfoxMzFUNMuFfbMtf-4jhRM,3282
|
11
|
-
janito/contextparser.py,sha256=iDX6nlqUQr-lj7lkEI4B6jHLci_Kxl-XWOaEiAQtVxA,4531
|
12
|
-
janito/fileparser.py,sha256=8nngFmR9s6NVv2YuMcNKO4udNh-ZcKN4_Jo11vKzLhI,6586
|
13
|
-
janito/prompts.py,sha256=aUDDx16L2ygPJZwrWn4FmrXt1KGNfLeYRcDSPD9BzIA,1879
|
14
|
-
janito/qa.py,sha256=qrAXbsGPCRSW378V88w8e19uU3hfbDnx6lsiRYhq324,1927
|
15
|
-
janito/scan.py,sha256=c_IKSuWx1_525RlIgPtP-tFoH7lManVGGNFMxVg1hMk,6014
|
16
|
-
janito/version.py,sha256=ylfPwGtdY8dEOFJ-DB9gKUQLggqRCvoLxhpnwjzCM94,739
|
17
|
-
janito-0.4.0.dist-info/METADATA,sha256=uUCven38ndkbyLrrLw3B42P7AGyijqTGICKRzLJkDDE,4705
|
18
|
-
janito-0.4.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
19
|
-
janito-0.4.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
|
20
|
-
janito-0.4.0.dist-info/licenses/LICENSE,sha256=xLIUXRPjtsgQml2zD1Pn4LpgiyZ49raw6jZDlO_gZdo,1062
|
21
|
-
janito-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|