janito 2.2.0__py3-none-any.whl → 2.3.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 +6 -6
- janito/agent/setup_agent.py +14 -5
- janito/agent/templates/profiles/system_prompt_template_main.txt.j2 +3 -1
- janito/cli/chat_mode/bindings.py +6 -0
- janito/cli/chat_mode/session.py +16 -0
- janito/cli/chat_mode/shell/autocomplete.py +21 -21
- janito/cli/chat_mode/shell/commands/__init__.py +3 -0
- janito/cli/chat_mode/shell/commands/clear.py +12 -12
- janito/cli/chat_mode/shell/commands/exec.py +27 -0
- janito/cli/chat_mode/shell/commands/multi.py +51 -51
- janito/cli/chat_mode/shell/commands/tools.py +17 -6
- janito/cli/chat_mode/shell/input_history.py +62 -62
- janito/cli/chat_mode/shell/session/manager.py +1 -0
- janito/cli/chat_mode/toolbar.py +1 -0
- janito/cli/cli_commands/list_models.py +35 -35
- janito/cli/cli_commands/list_providers.py +9 -9
- janito/cli/cli_commands/list_tools.py +53 -53
- janito/cli/cli_commands/model_selection.py +50 -50
- janito/cli/cli_commands/model_utils.py +13 -2
- janito/cli/cli_commands/set_api_key.py +19 -19
- janito/cli/cli_commands/show_config.py +51 -51
- janito/cli/cli_commands/show_system_prompt.py +62 -62
- janito/cli/config.py +2 -1
- janito/cli/core/__init__.py +4 -4
- janito/cli/core/event_logger.py +59 -59
- janito/cli/core/getters.py +3 -1
- janito/cli/core/runner.py +165 -148
- janito/cli/core/setters.py +5 -1
- janito/cli/core/unsetters.py +54 -54
- janito/cli/main_cli.py +12 -1
- janito/cli/prompt_core.py +5 -2
- janito/cli/rich_terminal_reporter.py +22 -3
- janito/cli/single_shot_mode/__init__.py +6 -6
- janito/cli/single_shot_mode/handler.py +11 -1
- janito/cli/verbose_output.py +1 -1
- janito/config.py +5 -5
- janito/config_manager.py +2 -0
- janito/driver_events.py +14 -0
- janito/drivers/anthropic/driver.py +113 -113
- janito/drivers/azure_openai/driver.py +38 -3
- janito/drivers/driver_registry.py +0 -2
- janito/drivers/openai/driver.py +196 -36
- janito/formatting_token.py +54 -54
- janito/i18n/__init__.py +35 -35
- janito/i18n/messages.py +23 -23
- janito/i18n/pt.py +47 -47
- janito/llm/__init__.py +5 -5
- janito/llm/agent.py +443 -443
- janito/llm/auth.py +1 -0
- janito/llm/driver.py +7 -1
- janito/llm/driver_config.py +1 -0
- janito/llm/driver_config_builder.py +34 -34
- janito/llm/driver_input.py +12 -12
- janito/llm/message_parts.py +60 -60
- janito/llm/model.py +38 -38
- janito/llm/provider.py +196 -196
- janito/provider_config.py +7 -3
- janito/provider_registry.py +176 -158
- janito/providers/__init__.py +1 -0
- janito/providers/anthropic/model_info.py +22 -22
- janito/providers/anthropic/provider.py +2 -2
- janito/providers/azure_openai/model_info.py +7 -6
- janito/providers/azure_openai/provider.py +30 -2
- janito/providers/deepseek/__init__.py +1 -1
- janito/providers/deepseek/model_info.py +16 -16
- janito/providers/deepseek/provider.py +91 -91
- janito/providers/google/model_info.py +21 -29
- janito/providers/google/provider.py +49 -38
- janito/providers/mistralai/provider.py +2 -2
- janito/providers/provider_static_info.py +2 -3
- janito/tools/adapters/__init__.py +1 -1
- janito/tools/adapters/local/adapter.py +33 -11
- janito/tools/adapters/local/ask_user.py +102 -102
- janito/tools/adapters/local/copy_file.py +84 -84
- janito/tools/adapters/local/create_directory.py +69 -69
- janito/tools/adapters/local/create_file.py +82 -82
- janito/tools/adapters/local/delete_text_in_file.py +4 -7
- janito/tools/adapters/local/fetch_url.py +97 -97
- janito/tools/adapters/local/find_files.py +138 -138
- janito/tools/adapters/local/get_file_outline/__init__.py +1 -1
- janito/tools/adapters/local/get_file_outline/core.py +117 -117
- janito/tools/adapters/local/get_file_outline/java_outline.py +40 -40
- janito/tools/adapters/local/get_file_outline/markdown_outline.py +14 -14
- janito/tools/adapters/local/get_file_outline/python_outline.py +303 -303
- janito/tools/adapters/local/get_file_outline/python_outline_v2.py +156 -156
- janito/tools/adapters/local/get_file_outline/search_outline.py +33 -33
- janito/tools/adapters/local/move_file.py +3 -13
- janito/tools/adapters/local/python_code_run.py +166 -166
- janito/tools/adapters/local/python_command_run.py +164 -164
- janito/tools/adapters/local/python_file_run.py +163 -163
- janito/tools/adapters/local/remove_directory.py +6 -17
- janito/tools/adapters/local/remove_file.py +4 -10
- janito/tools/adapters/local/replace_text_in_file.py +6 -9
- janito/tools/adapters/local/run_bash_command.py +176 -176
- janito/tools/adapters/local/run_powershell_command.py +219 -219
- janito/tools/adapters/local/search_text/__init__.py +1 -1
- janito/tools/adapters/local/search_text/core.py +201 -201
- janito/tools/adapters/local/search_text/match_lines.py +1 -1
- janito/tools/adapters/local/search_text/pattern_utils.py +73 -73
- janito/tools/adapters/local/search_text/traverse_directory.py +145 -145
- janito/tools/adapters/local/validate_file_syntax/__init__.py +1 -1
- janito/tools/adapters/local/validate_file_syntax/core.py +106 -106
- janito/tools/adapters/local/validate_file_syntax/css_validator.py +35 -35
- janito/tools/adapters/local/validate_file_syntax/html_validator.py +93 -93
- janito/tools/adapters/local/validate_file_syntax/js_validator.py +27 -27
- janito/tools/adapters/local/validate_file_syntax/json_validator.py +6 -6
- janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +109 -109
- janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +32 -32
- janito/tools/adapters/local/validate_file_syntax/python_validator.py +5 -5
- janito/tools/adapters/local/validate_file_syntax/xml_validator.py +11 -11
- janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +6 -6
- janito/tools/adapters/local/view_file.py +167 -167
- janito/tools/inspect_registry.py +17 -17
- janito/tools/tool_base.py +105 -105
- janito/tools/tool_events.py +58 -58
- janito/tools/tool_run_exception.py +12 -12
- janito/tools/tool_use_tracker.py +81 -81
- janito/tools/tool_utils.py +45 -45
- janito/tools/tools_adapter.py +78 -6
- janito/tools/tools_schema.py +104 -104
- janito/version.py +4 -4
- {janito-2.2.0.dist-info → janito-2.3.0.dist-info}/METADATA +388 -251
- janito-2.3.0.dist-info/RECORD +181 -0
- janito/drivers/google_genai/driver.py +0 -54
- janito/drivers/google_genai/schema_generator.py +0 -67
- janito-2.2.0.dist-info/RECORD +0 -182
- {janito-2.2.0.dist-info → janito-2.3.0.dist-info}/WHEEL +0 -0
- {janito-2.2.0.dist-info → janito-2.3.0.dist-info}/entry_points.txt +0 -0
- {janito-2.2.0.dist-info → janito-2.3.0.dist-info}/licenses/LICENSE +0 -0
- {janito-2.2.0.dist-info → janito-2.3.0.dist-info}/top_level.txt +0 -0
@@ -1,251 +1,388 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: janito
|
3
|
-
Version: 2.
|
4
|
-
Summary: A new Python package called janito.
|
5
|
-
Author-email: João Pinto <lamego.pinto@gmail.com>
|
6
|
-
Project-URL: Homepage, https://github.com/janito-dev/janito
|
7
|
-
Requires-Python: >=3.7
|
8
|
-
Description-Content-Type: text/markdown
|
9
|
-
License-File: LICENSE
|
10
|
-
Requires-Dist: attrs==25.3.0
|
11
|
-
Requires-Dist: rich==14.0.0
|
12
|
-
Requires-Dist: pathspec==0.12.1
|
13
|
-
Requires-Dist: setuptools>=61.0
|
14
|
-
Requires-Dist: pyyaml>=6.0
|
15
|
-
Requires-Dist: jinja2>=3.0.0
|
16
|
-
Requires-Dist: prompt_toolkit>=3.0.51
|
17
|
-
Requires-Dist: lxml>=5.4.0
|
18
|
-
Requires-Dist: requests>=2.32.4
|
19
|
-
Requires-Dist: bs4>=0.0.2
|
20
|
-
Provides-Extra: dev
|
21
|
-
Requires-Dist: pytest; extra == "dev"
|
22
|
-
Requires-Dist: pre-commit; extra == "dev"
|
23
|
-
Requires-Dist: ruff==0.11.9; extra == "dev"
|
24
|
-
Requires-Dist: detect-secrets==1.4.0; extra == "dev"
|
25
|
-
Requires-Dist: codespell==2.4.1; extra == "dev"
|
26
|
-
Requires-Dist: black; extra == "dev"
|
27
|
-
Dynamic: license-file
|
28
|
-
|
29
|
-
# Janito
|
30
|
-
|
31
|
-
Janito is a command-line interface (CLI) tool for managing and interacting with Large Language Model (LLM) providers. It enables you to configure API keys, select providers and models, and submit prompts to various LLMs from your terminal. Janito is designed for extensibility, supporting multiple providers and a wide range of tools for automation and productivity.
|
32
|
-
|
33
|
-
## Features
|
34
|
-
|
35
|
-
- 🔑 Manage API keys and provider configurations
|
36
|
-
- 🤖 Interact with multiple LLM providers (OpenAI, Google, Mistral, , and more)
|
37
|
-
- 🛠️ List and use a variety of registered tools
|
38
|
-
- 📝 Submit prompts and receive responses directly from the CLI
|
39
|
-
- 📋 List available models for each provider
|
40
|
-
- 🧩 Extensible architecture for adding new providers and tools
|
41
|
-
- 🎛️ Rich terminal output and event logging
|
42
|
-
|
43
|
-
### Advanced and Architectural Features
|
44
|
-
|
45
|
-
- ⚡ **Event-driven architecture**: Modular, decoupled system using a custom EventBus for extensibility and integration.
|
46
|
-
- 🧑💻 **Tool registry & dynamic tool execution**: Register new tools easily, execute them by name or call from automation pipelines.
|
47
|
-
- 🤖 **LLM Agent automation**: Supports agent-like workflows with the ability to chain tools or make decisions during LLM conversations.
|
48
|
-
- 🏗️ **Extensible provider management**: Add, configure, or switch between LLM providers and their models on the fly.
|
49
|
-
- 🧰 **Rich tool ecosystem**: Includes file operations, local/remote script and command execution, text processing, and internet access (fetching URLs), all reusable by LLM or user.
|
50
|
-
- 📝 **Comprehensive event & history reporting**: Detailed logs of prompts, events, tool usage, and responses for traceability and audit.
|
51
|
-
- 🖥️ **Enhanced terminal UI**: Colorful, informative real-time outputs and logs to improve productivity and insight during LLM usage.
|
52
|
-
|
53
|
-
## Installation
|
54
|
-
|
55
|
-
Janito is a Python package. Since this is a development version, install it directly from GitHub:
|
56
|
-
|
57
|
-
```bash
|
58
|
-
pip install git+https://github.com/janito-dev/janito.git
|
59
|
-
```
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
```bash
|
113
|
-
janito -
|
114
|
-
```
|
115
|
-
|
116
|
-
|
117
|
-
>
|
118
|
-
|
119
|
-
|
120
|
-
- **
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
```
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
|
203
|
-
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
208
|
-
|
209
|
-
|
|
210
|
-
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: janito
|
3
|
+
Version: 2.3.0
|
4
|
+
Summary: A new Python package called janito.
|
5
|
+
Author-email: João Pinto <lamego.pinto@gmail.com>
|
6
|
+
Project-URL: Homepage, https://github.com/janito-dev/janito
|
7
|
+
Requires-Python: >=3.7
|
8
|
+
Description-Content-Type: text/markdown
|
9
|
+
License-File: LICENSE
|
10
|
+
Requires-Dist: attrs==25.3.0
|
11
|
+
Requires-Dist: rich==14.0.0
|
12
|
+
Requires-Dist: pathspec==0.12.1
|
13
|
+
Requires-Dist: setuptools>=61.0
|
14
|
+
Requires-Dist: pyyaml>=6.0
|
15
|
+
Requires-Dist: jinja2>=3.0.0
|
16
|
+
Requires-Dist: prompt_toolkit>=3.0.51
|
17
|
+
Requires-Dist: lxml>=5.4.0
|
18
|
+
Requires-Dist: requests>=2.32.4
|
19
|
+
Requires-Dist: bs4>=0.0.2
|
20
|
+
Provides-Extra: dev
|
21
|
+
Requires-Dist: pytest; extra == "dev"
|
22
|
+
Requires-Dist: pre-commit; extra == "dev"
|
23
|
+
Requires-Dist: ruff==0.11.9; extra == "dev"
|
24
|
+
Requires-Dist: detect-secrets==1.4.0; extra == "dev"
|
25
|
+
Requires-Dist: codespell==2.4.1; extra == "dev"
|
26
|
+
Requires-Dist: black; extra == "dev"
|
27
|
+
Dynamic: license-file
|
28
|
+
|
29
|
+
# Janito
|
30
|
+
|
31
|
+
Janito is a command-line interface (CLI) tool for managing and interacting with Large Language Model (LLM) providers. It enables you to configure API keys, select providers and models, and submit prompts to various LLMs from your terminal. Janito is designed for extensibility, supporting multiple providers and a wide range of tools for automation and productivity.
|
32
|
+
|
33
|
+
## Features
|
34
|
+
|
35
|
+
- 🔑 Manage API keys and provider configurations
|
36
|
+
- 🤖 Interact with multiple LLM providers (OpenAI, Google Gemini, Mistral, DeepSeek, and more)
|
37
|
+
- 🛠️ List and use a variety of registered tools
|
38
|
+
- 📝 Submit prompts and receive responses directly from the CLI
|
39
|
+
- 📋 List available models for each provider
|
40
|
+
- 🧩 Extensible architecture for adding new providers and tools
|
41
|
+
- 🎛️ Rich terminal output and event logging
|
42
|
+
|
43
|
+
### Advanced and Architectural Features
|
44
|
+
|
45
|
+
- ⚡ **Event-driven architecture**: Modular, decoupled system using a custom EventBus for extensibility and integration.
|
46
|
+
- 🧑💻 **Tool registry & dynamic tool execution**: Register new tools easily, execute them by name or call from automation pipelines.
|
47
|
+
- 🤖 **LLM Agent automation**: Supports agent-like workflows with the ability to chain tools or make decisions during LLM conversations.
|
48
|
+
- 🏗️ **Extensible provider management**: Add, configure, or switch between LLM providers and their models on the fly.
|
49
|
+
- 🧰 **Rich tool ecosystem**: Includes file operations, local/remote script and command execution, text processing, and internet access (fetching URLs), all reusable by LLM or user.
|
50
|
+
- 📝 **Comprehensive event & history reporting**: Detailed logs of prompts, events, tool usage, and responses for traceability and audit.
|
51
|
+
- 🖥️ **Enhanced terminal UI**: Colorful, informative real-time outputs and logs to improve productivity and insight during LLM usage.
|
52
|
+
|
53
|
+
## Installation
|
54
|
+
|
55
|
+
Janito is a Python package. Since this is a development version, you can install it directly from GitHub:
|
56
|
+
|
57
|
+
```bash
|
58
|
+
pip install git+https://github.com/janito-dev/janito.git
|
59
|
+
```
|
60
|
+
|
61
|
+
### First launch and quick setup
|
62
|
+
|
63
|
+
Janito integrates with external LLM providers (list below), and most of them require a subscription to get an API_KEY.
|
64
|
+
|
65
|
+
> [!NOTE]
|
66
|
+
> Today, on June the 26th 2025, Google has a free tier subscription for its Gemini-2.5-flash model. Despite the limitation of the model and of the rate limit of the free tier, it can be used for testing janito. The API_KEY for Gemini is available [here](https://aistudio.google.com/app/apikey).
|
67
|
+
|
68
|
+
> [!NOTE]
|
69
|
+
> [Here](https://github.com/cheahjs/free-llm-api-resources/blob/main/README.md) a list of various services that provide free access or credits towards API-based LLM usage. Note that not all of them are supported by Janito, yet.
|
70
|
+
|
71
|
+
For a quick usage you can:
|
72
|
+
|
73
|
+
1. once you get the API_KEY from your favourite LLM provider, setup the API_KEY in Janito
|
74
|
+
|
75
|
+
```bash
|
76
|
+
janito --set-api-key API_KEY -p PROVIDER
|
77
|
+
```
|
78
|
+
|
79
|
+
2. then run janito from command line with the specific LLM provider of your choice
|
80
|
+
|
81
|
+
```bash
|
82
|
+
janito -p PROVIDER "Hello, who are you? How can you help me in my tasks?"
|
83
|
+
```
|
84
|
+
|
85
|
+
3. or you can run janito in interactive mode without the trailing argument
|
86
|
+
|
87
|
+
```bash
|
88
|
+
janito -p PROVIDER
|
89
|
+
```
|
90
|
+
|
91
|
+
4. if you want to setup a specific provider for any further interactions you can use:
|
92
|
+
|
93
|
+
```bash
|
94
|
+
janito -set provider=PROVIDER
|
95
|
+
```
|
96
|
+
|
97
|
+
> [!WARNING]
|
98
|
+
> Currently the supported providers are: `openai`, `google`, `azure_openai`. You can get more details with `janito --list-providers`.
|
99
|
+
|
100
|
+
5. for more advanced setup, continue reading.
|
101
|
+
|
102
|
+
|
103
|
+
## Usage
|
104
|
+
|
105
|
+
After installation, use the `janito` command in your terminal.
|
106
|
+
|
107
|
+
Janito has configuration options, like `--set api-key API_KEY` and `--set provider=PROVIDER`, that create durable configurations and single shoot options, like `-p PROVIDER` and `-m MODEL`, that are active for the single run of the command or session.
|
108
|
+
|
109
|
+
### Basic Commands
|
110
|
+
|
111
|
+
- **Set API Key for a Provider (requires -p PROVIDER)**
|
112
|
+
```bash
|
113
|
+
janito --set-api-key API_KEY -p PROVIDER
|
114
|
+
```
|
115
|
+
> **Note:** The `-p PROVIDER` argument is required when setting an API key. For example:
|
116
|
+
> ```bash
|
117
|
+
> janito --set-api-key sk-xxxxxxx -p openai
|
118
|
+
> ```
|
119
|
+
|
120
|
+
- **Set the Provider (durable)**
|
121
|
+
```bash
|
122
|
+
janito --set provider=provider_name
|
123
|
+
```
|
124
|
+
|
125
|
+
- **List Supported Providers**
|
126
|
+
```bash
|
127
|
+
janito --list-providers
|
128
|
+
```
|
129
|
+
|
130
|
+
- **List Registered Tools**
|
131
|
+
```bash
|
132
|
+
janito --list-tools
|
133
|
+
```
|
134
|
+
|
135
|
+
- **List Models for a Provider**
|
136
|
+
```bash
|
137
|
+
janito -p PROVIDER --list-models
|
138
|
+
```
|
139
|
+
|
140
|
+
- **Submit a Prompt**
|
141
|
+
```bash
|
142
|
+
janito "What is the capital of France?"
|
143
|
+
```
|
144
|
+
|
145
|
+
- **Start Interactive Chat Shell**
|
146
|
+
```bash
|
147
|
+
janito
|
148
|
+
```
|
149
|
+
|
150
|
+
### Advanced Options
|
151
|
+
|
152
|
+
- **Enable Inline Web File Viewer for Clickable Links**
|
153
|
+
|
154
|
+
By default, Janito can open referenced files in a browser-based viewer when you click on file links in supported terminals. To enable this feature for your session, use the `-w` or `--web` flag:
|
155
|
+
|
156
|
+
```bash
|
157
|
+
janito -w
|
158
|
+
```
|
159
|
+
|
160
|
+
This starts the lightweight web file viewer (termweb) in the background, allowing you to inspect files referenced in responses directly in your browser. Combine with interactive mode or prompts as needed.
|
161
|
+
|
162
|
+
> **Tip:** Use with the interactive shell for the best experience with clickable file links.
|
163
|
+
|
164
|
+
|
165
|
+
- **Enable Execution Tools (Code/Shell Execution)**
|
166
|
+
|
167
|
+
By default, tools that can execute code or shell commands are **disabled** for safety. To enable these tools (such as code execution, shell commands, etc.), use the `--exec` or `-x` flag:
|
168
|
+
|
169
|
+
```bash
|
170
|
+
janito -x "Run this code: print('Hello, world!')"
|
171
|
+
```
|
172
|
+
> **Warning:** Enabling execution tools allows running arbitrary code or shell commands. Only use `--exec` if you trust your prompt and environment.
|
173
|
+
|
174
|
+
- **Set a System Prompt**
|
175
|
+
```bash
|
176
|
+
janito -s path/to/system_prompt.txt "Your prompt here"
|
177
|
+
```
|
178
|
+
|
179
|
+
- **Select Model and Provider Temporarily**
|
180
|
+
```bash
|
181
|
+
janito -p openai -m gpt-3.5-turbo "Your prompt here"
|
182
|
+
janito -p google -m gemini-2.5-flash "Your prompt here"
|
183
|
+
```
|
184
|
+
|
185
|
+
- **Set Provider-Specific Config (for the selected provider)**
|
186
|
+
```bash
|
187
|
+
# syntax: janito --set PROVIDER.KEY=VALUE
|
188
|
+
# example: set the default model for openai provider
|
189
|
+
janito --set openai.model=gpt-4o
|
190
|
+
|
191
|
+
```
|
192
|
+
> **Note:** Use `--set PROVIDER.key=value` for provider-specific settings (e.g., `openai.max_tokens`, `openai.base_url`).
|
193
|
+
|
194
|
+
- **Enable Event Logging**
|
195
|
+
```bash
|
196
|
+
janito -e "Your prompt here"
|
197
|
+
```
|
198
|
+
|
199
|
+
## 🌟 CLI Options Reference
|
200
|
+
|
201
|
+
### Core CLI Options
|
202
|
+
| Option | Description |
|
203
|
+
|------------------------|-----------------------------------------------------------------------------|
|
204
|
+
| `-w`, `--web` | Enable the builtin lightweight web file viewer for clickable file links (termweb). |
|
205
|
+
| `--version` | Show program version |
|
206
|
+
| `--list-tools` | List all registered tools |
|
207
|
+
| `--list-providers` | List all supported LLM providers |
|
208
|
+
| `-l`, `--list-models` | List models for current/selected provider |
|
209
|
+
| `--set-api-key` | Set API key for a provider. **Requires** `-p PROVIDER` to specify the provider. |
|
210
|
+
| `--set provider=name` | Set the current LLM provider (e.g., `janito --set provider=openai`) |
|
211
|
+
| `--set PROVIDER.model=MODEL` or `--set model=MODEL` | Set the default model for the current/selected provider, or globally. (e.g., `janito --set openai.model=gpt-3.5-turbo`) |
|
212
|
+
| `-s`, `--system` | Set a system prompt (e.g., `janito -s path/to/system_prompt.txt "Your prompt here"`) |
|
213
|
+
| `-r`, `--role` | Set the role for the agent (overrides config) (e.g., `janito -r "assistant" "Your prompt here"`) |
|
214
|
+
| `-p`, `--provider` | Select LLM provider (overrides config) (e.g., `janito -p openai "Your prompt here"`) |
|
215
|
+
| `-m`, `--model` | Select model for the provider (e.g., `janito -m gpt-3.5-turbo "Your prompt here"`) |
|
216
|
+
| `-v`, `--verbose` | Print extra information before answering |
|
217
|
+
| `-R`, `--raw` | Print raw JSON response from API |
|
218
|
+
| `-e`, `--event-log` | Log events to console as they occur |
|
219
|
+
| `"user_prompt"` | Prompt to submit for the non interactive mode (e.g. `janito "What is the capital of France?"`) |
|
220
|
+
|
221
|
+
### 🧩 Extended Chat Mode Commands
|
222
|
+
Once inside the interactive chat mode, you can use these slash commands:
|
223
|
+
|
224
|
+
#### 📲 Basic Interaction
|
225
|
+
| Command | Description |
|
226
|
+
|-------------------|----------------------------------------------|
|
227
|
+
| `/exit` or `exit` | Exit chat mode |
|
228
|
+
| `/help` | Show available commands |
|
229
|
+
| `/multi` | Activate multiline input mode |
|
230
|
+
| `/clear` | Clear the terminal screen |
|
231
|
+
| `/history` | Show input history |
|
232
|
+
| `/view` | Print current conversation history |
|
233
|
+
| `/track` | Show tool usage history |
|
234
|
+
|
235
|
+
#### 💬 Conversation Management
|
236
|
+
| Command | Description |
|
237
|
+
|---------------------|----------------------------------------------|
|
238
|
+
| `/restart` | Start a new conversation (reset context) |
|
239
|
+
| `/prompt` | Show the current system prompt |
|
240
|
+
| `/role <description>` | Change the system role |
|
241
|
+
| `/lang [code]` | Change interface language (e.g., `/lang en`) |
|
242
|
+
|
243
|
+
#### 🛠️ Tool & Provider Interaction
|
244
|
+
| Command | Description |
|
245
|
+
|----------------------|----------------------------------------------|
|
246
|
+
| `/tools` | List available tools |
|
247
|
+
| `/termweb-status` | Show status of termweb server |
|
248
|
+
| `/termweb-logs` | Show last lines of termweb logs |
|
249
|
+
| `/livelogs` | Show live updates from server log file |
|
250
|
+
| `/edit <filename>` | Open file in browser-based editor |
|
251
|
+
|
252
|
+
#### 📊 Output Control
|
253
|
+
| Command | Description |
|
254
|
+
|---------------------|----------------------------------------------|
|
255
|
+
| `/verbose` | Show current verbose mode status |
|
256
|
+
| `/verbose [on|off]` | Set verbose mode |
|
257
|
+
|
258
|
+
## Extending Janito
|
259
|
+
|
260
|
+
Janito is built to be extensible. You can add new LLM providers or tools by implementing new modules in the `janito/providers` or `janito/tools` directories, respectively. See the source code and developer documentation for more details.
|
261
|
+
|
262
|
+
## Supported Providers
|
263
|
+
|
264
|
+
- OpenAI
|
265
|
+
- OpenAI over Azure
|
266
|
+
- Google Gemini
|
267
|
+
- DeepSeek
|
268
|
+
|
269
|
+
See [docs/supported-providers-models.md](docs/supported-providers-models.md) for more details.
|
270
|
+
|
271
|
+
## Contributing
|
272
|
+
|
273
|
+
Contributions are welcome! Please see the `CONTRIBUTING.md` (if available) or open an issue to get started.
|
274
|
+
|
275
|
+
## License
|
276
|
+
|
277
|
+
This project is licensed under the terms of the MIT license.
|
278
|
+
|
279
|
+
For more information, see the documentation in the `docs/` directory or run `janito --help`.
|
280
|
+
|
281
|
+
---
|
282
|
+
|
283
|
+
# Support
|
284
|
+
|
285
|
+
|
286
|
+
## 📖 Detailed Documentation
|
287
|
+
|
288
|
+
Full and up-to-date documentation is available at: https://janito-dev.github.io/janito/
|
289
|
+
|
290
|
+
---
|
291
|
+
|
292
|
+
|
293
|
+
## FAQ: Setting API Keys
|
294
|
+
|
295
|
+
- [Multiple API_KEY setup](#faq-multiple-api-key)
|
296
|
+
- [Use a specific model](#faq-use-specific-model)
|
297
|
+
- [Fetch the availale LLM providers](#faq-fetch-providers)
|
298
|
+
- [Fetch the availale models](#faq-fetch-models)
|
299
|
+
|
300
|
+
|
301
|
+
<a id="faq-multiple-api-key"></a>
|
302
|
+
### Multiple API_KEY setup
|
303
|
+
|
304
|
+
To set an API key for a provider, you **must** specify both the API key and the provider name:
|
305
|
+
|
306
|
+
```bash
|
307
|
+
janito --set-api-key YOUR_API_KEY -p PROVIDER_NAME
|
308
|
+
```
|
309
|
+
|
310
|
+
You can have an API_KEY for each LLM provider
|
311
|
+
|
312
|
+
```bash
|
313
|
+
janito --set-api-key API_KEY_1 -p PROVIDER_1
|
314
|
+
janito --set-api-key API_KEY_2 -p PROVIDER_2
|
315
|
+
```
|
316
|
+
|
317
|
+
Then you can easily use one provider or the other without changing the API_KEY
|
318
|
+
|
319
|
+
```bash
|
320
|
+
janito -p PROVIDER_1 "What provider do you use?"
|
321
|
+
janito -p PROVIDER_2 "What provider do you use?"
|
322
|
+
```
|
323
|
+
|
324
|
+
If you omit the `-p PROVIDER_NAME` argument, Janito will show an error and not set the key.
|
325
|
+
|
326
|
+
<a id="faq-use-specific-model"></a>
|
327
|
+
### Use a specific model
|
328
|
+
|
329
|
+
To use a specific model, you can use the `-m` option in the follwing way:
|
330
|
+
|
331
|
+
```bash
|
332
|
+
janito -m gpt-4.1-nano -p openai "What model do you use?"
|
333
|
+
```
|
334
|
+
|
335
|
+
Or you can use the durable `--set` option:
|
336
|
+
|
337
|
+
```bash
|
338
|
+
janito --set provider=openai
|
339
|
+
janito --set model=gpt-4.1-nano
|
340
|
+
janito "What model do you use?"
|
341
|
+
```
|
342
|
+
|
343
|
+
<a id="faq-fetch-providers"></a>
|
344
|
+
### Fetch the availale LLM providers
|
345
|
+
|
346
|
+
You can list all the LLM providers available using:
|
347
|
+
|
348
|
+
```bash
|
349
|
+
janito --list-providers
|
350
|
+
```
|
351
|
+
|
352
|
+
<a id="faq-fetch-models"></a>
|
353
|
+
### Fetch the availale models
|
354
|
+
|
355
|
+
Each LLM provider has its own models, the best way to check what are the available models is usign the following commands:
|
356
|
+
|
357
|
+
```bash
|
358
|
+
janito -p openai --list-models
|
359
|
+
janito -p google --list-models
|
360
|
+
janito -p azure_openai --list-models
|
361
|
+
janito -p deepseek --list-models
|
362
|
+
```
|
363
|
+
|
364
|
+
|
365
|
+
## Ask Me Anything
|
366
|
+
|
367
|
+
<div align="center">
|
368
|
+
<a href="https://github.com/janito-dev/janito" title="Ask Me Anything">
|
369
|
+
<img width="250" src="docs/imgs/ama.png" alt="Ask Me Anything">
|
370
|
+
</a>
|
371
|
+
</div
|
372
|
+
|
373
|
+
When the FAQ are not enough, you can contact the contributors of the project by direct questions
|
374
|
+
|
375
|
+
<p align="center">
|
376
|
+
<kbd><a href="../../issues/new?labels=question">Ask a question</a></kbd> <kbd><a href="../../issues?q=is%3Aissue+is%3Aclosed+label%3Aquestion">Read questions</a></kbd>
|
377
|
+
</p>
|
378
|
+
|
379
|
+
#### Guidelines
|
380
|
+
|
381
|
+
- :mag: Ensure your question hasn't already been answered.
|
382
|
+
- :memo: Use a succinct title and description.
|
383
|
+
- :bug: Bugs & feature requests should be opened on the relevant issue tracker.
|
384
|
+
- :signal_strength: Support questions are better asked on Stack Overflow.
|
385
|
+
- :blush: Be nice, civil and polite.
|
386
|
+
- :heart_eyes: If you include at least one emoji in your question, the feedback will probably come faster.
|
387
|
+
- [Read more AMAs](https://github.com/sindresorhus/amas)
|
388
|
+
- [What's an AMA?](https://en.wikipedia.org/wiki/R/IAmA)
|