janito 2.22.0__py3-none-any.whl → 2.24.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.
Files changed (67) hide show
  1. janito/README.md +0 -0
  2. janito/agent/setup_agent.py +14 -0
  3. janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +59 -11
  4. janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +53 -7
  5. janito/agent/templates/profiles/system_prompt_template_market_analyst.txt.j2 +108 -8
  6. janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2 +53 -1
  7. janito/cli/chat_mode/session.py +8 -1
  8. janito/cli/chat_mode/shell/commands/__init__.py +2 -0
  9. janito/cli/chat_mode/shell/commands/security/__init__.py +1 -0
  10. janito/cli/chat_mode/shell/commands/security/allowed_sites.py +94 -0
  11. janito/cli/chat_mode/shell/commands/security_command.py +51 -0
  12. janito/cli/chat_mode/shell/commands.bak.zip +0 -0
  13. janito/cli/chat_mode/shell/session.bak.zip +0 -0
  14. janito/cli/cli_commands/list_plugins.py +45 -0
  15. janito/cli/cli_commands/show_system_prompt.py +13 -40
  16. janito/cli/core/getters.py +4 -0
  17. janito/cli/core/runner.py +7 -2
  18. janito/cli/core/setters.py +10 -1
  19. janito/cli/main_cli.py +25 -3
  20. janito/cli/single_shot_mode/handler.py +3 -1
  21. janito/config_manager.py +10 -0
  22. janito/docs/GETTING_STARTED.md +0 -0
  23. janito/drivers/dashscope.bak.zip +0 -0
  24. janito/drivers/openai/README.md +0 -0
  25. janito/drivers/openai_responses.bak.zip +0 -0
  26. janito/llm/README.md +0 -0
  27. janito/mkdocs.yml +0 -0
  28. janito/plugins/__init__.py +17 -0
  29. janito/plugins/base.py +93 -0
  30. janito/plugins/discovery.py +160 -0
  31. janito/plugins/manager.py +185 -0
  32. janito/providers/dashscope.bak.zip +0 -0
  33. janito/providers/ibm/README.md +0 -0
  34. janito/shell.bak.zip +0 -0
  35. janito/tools/DOCSTRING_STANDARD.txt +0 -0
  36. janito/tools/README.md +0 -0
  37. janito/tools/adapters/local/__init__.py +2 -0
  38. janito/tools/adapters/local/adapter.py +55 -0
  39. janito/tools/adapters/local/ask_user.py +2 -0
  40. janito/tools/adapters/local/fetch_url.py +89 -4
  41. janito/tools/adapters/local/find_files.py +2 -0
  42. janito/tools/adapters/local/get_file_outline/core.py +2 -0
  43. janito/tools/adapters/local/get_file_outline/search_outline.py +2 -0
  44. janito/tools/adapters/local/open_html_in_browser.py +2 -0
  45. janito/tools/adapters/local/open_url.py +2 -0
  46. janito/tools/adapters/local/python_code_run.py +15 -10
  47. janito/tools/adapters/local/python_command_run.py +14 -9
  48. janito/tools/adapters/local/python_file_run.py +15 -10
  49. janito/tools/adapters/local/read_chart.py +252 -0
  50. janito/tools/adapters/local/read_files.py +2 -0
  51. janito/tools/adapters/local/replace_text_in_file.py +1 -1
  52. janito/tools/adapters/local/run_bash_command.py +18 -12
  53. janito/tools/adapters/local/run_powershell_command.py +15 -9
  54. janito/tools/adapters/local/search_text/core.py +2 -0
  55. janito/tools/adapters/local/validate_file_syntax/core.py +6 -0
  56. janito/tools/adapters/local/validate_file_syntax/jinja2_validator.py +47 -0
  57. janito/tools/adapters/local/view_file.py +2 -0
  58. janito/tools/loop_protection.py +115 -0
  59. janito/tools/loop_protection_decorator.py +110 -0
  60. janito/tools/outline_file.bak.zip +0 -0
  61. janito/tools/url_whitelist.py +121 -0
  62. {janito-2.22.0.dist-info → janito-2.24.0.dist-info}/METADATA +411 -411
  63. {janito-2.22.0.dist-info → janito-2.24.0.dist-info}/RECORD +52 -39
  64. {janito-2.22.0.dist-info → janito-2.24.0.dist-info}/entry_points.txt +0 -0
  65. {janito-2.22.0.dist-info → janito-2.24.0.dist-info}/licenses/LICENSE +0 -0
  66. {janito-2.22.0.dist-info → janito-2.24.0.dist-info}/top_level.txt +0 -0
  67. {janito-2.22.0.dist-info → janito-2.24.0.dist-info}/WHEEL +0 -0
@@ -1,411 +1,411 @@
1
- Metadata-Version: 2.4
2
- Name: janito
3
- Version: 2.22.0
4
- Summary: A new Python package called janito.
5
- Author-email: João Pinto <janito@ikignosis.org>
6
- Project-URL: Homepage, https://github.com/ikignosis/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
- Requires-Dist: questionary>=2.0.1
21
- Requires-Dist: openai>=1.68.0
22
- Provides-Extra: dev
23
- Requires-Dist: pytest; extra == "dev"
24
- Requires-Dist: pre-commit; extra == "dev"
25
- Requires-Dist: ruff==0.11.9; extra == "dev"
26
- Requires-Dist: detect-secrets==1.4.0; extra == "dev"
27
- Requires-Dist: codespell==2.4.1; extra == "dev"
28
- Requires-Dist: black; extra == "dev"
29
- Requires-Dist: questionary>=2.0.1; extra == "dev"
30
- Requires-Dist: setuptools_scm>=8.0; extra == "dev"
31
- Dynamic: license-file
32
-
33
- # Janito, control you context
34
-
35
- [![PyPI version](https://badge.fury.io/py/janito.svg)](https://badge.fury.io/py/janito)
36
-
37
- 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.
38
-
39
- ## Features
40
-
41
- - 🔑 Manage API keys and provider configurations
42
- - 🤖 Interact with multiple LLM providers (OpenAI, Google Gemini, DeepSeek, and more)
43
- - 🛠️ List and use a variety of registered tools
44
- - 📝 Submit prompts and receive responses directly from the CLI
45
- - 📋 List available models for each provider
46
- - 🧩 Extensible architecture for adding new providers and tools
47
- - 🎛️ Rich terminal output and event logging
48
-
49
- ### Advanced and Architectural Features
50
-
51
- - ⚡ **Event-driven architecture**: Modular, decoupled system using a custom EventBus for extensibility and integration.
52
- - 🧑‍💻 **Tool registry & dynamic tool execution**: Register new tools easily, execute them by name or call from automation pipelines.
53
- - 🤖 **LLM Agent automation**: Supports agent-like workflows with the ability to chain tools or make decisions during LLM conversations.
54
- - 🏗️ **Extensible provider management**: Add, configure, or switch between LLM providers and their models on the fly.
55
- - 🧰 **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.
56
- - 📝 **Comprehensive event & history reporting**: Detailed logs of prompts, events, tool usage, and responses for traceability and audit.
57
- - 🖥️ **Enhanced terminal UI**: Colorful, informative real-time outputs and logs to improve productivity and insight during LLM usage.
58
-
59
- ## Installation
60
-
61
- Janito is a Python package. Since this is a development version, you can install it directly from GitHub:
62
-
63
- ```bash
64
- pip install git+git@github.com:ikignosis/janito.git
65
- ```
66
-
67
- ### First launch and quick setup
68
-
69
- Janito integrates with external LLM providers (list below), and most of them require a subscription to get an API_KEY.
70
-
71
- > [!NOTE]
72
- > Today, on June the 26th 2025, Google has a free tier subscription for its Gemini-2.5-flash and Gemini-2.5-pro models. Despite the limitation of the models and of the rate limit of the free tier, they can be used for testing janito. The API_KEY for Gemini is available [here](https://aistudio.google.com/app/apikey).
73
-
74
- > [!NOTE]
75
- > [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.
76
-
77
- For a quick usage you can:
78
-
79
- 1. once you get the API_KEY from your favourite LLM provider, setup the API_KEY in Janito
80
-
81
- ```bash
82
- janito --set-api-key API_KEY -p PROVIDER
83
- ```
84
-
85
- 2. then run janito from command line with the specific LLM provider of your choice
86
-
87
- ```bash
88
- janito -p PROVIDER "Hello, who are you? How can you help me in my tasks?"
89
- ```
90
-
91
- 3. or you can run janito in interactive mode without the trailing argument
92
-
93
- ```bash
94
- janito -p PROVIDER
95
- ```
96
-
97
- 4. if you want to setup a specific provider for any further interactions you can use:
98
-
99
- ```bash
100
- janito -set provider=PROVIDER
101
- ```
102
-
103
- > [!WARNING]
104
- > Currently the supported providers are: `openai`, `google`, `anthropic`, `azure_openai`. You can get more details with `janito --list-providers`.
105
-
106
- 5. for more advanced setup, continue reading.
107
-
108
-
109
- ## Usage
110
-
111
- After installation, use the `janito` command in your terminal with the syntax: `janito [options] [prompt]`
112
-
113
- Janito supports both general-purpose and specialized assistance through the use of **profiles**. Profiles allow you to select a specific system prompt template and behavior for the agent, enabling workflows tailored to different roles or tasks (e.g., developer, writer, data analyst), or to use Janito as a generic AI assistant.
114
-
115
- ### Profiles: General-Purpose and Specialized Assistance
116
-
117
- - By default, Janito acts as a general-purpose assistant.
118
- - You can select a specialized profile using the `--profile` option:
119
- ```bash
120
- janito --profile developer "Refactor this code for better readability."
121
- janito --profile writer "Draft a blog post about AI in healthcare."
122
- ```
123
- - Profiles change the system prompt and agent behavior to suit the selected role or workflow.
124
- - To see available profiles or customize them, refer to the documentation or the `agent/templates/profiles/` directory.
125
-
126
- > **Tip:** Use `--profile` for targeted workflows, or omit it for a general-purpose assistant.
127
-
128
- 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.
129
-
130
- ### Basic Commands
131
-
132
- - **Set API Key for a Provider (requires -p PROVIDER)**
133
- ```bash
134
- janito --set-api-key API_KEY -p PROVIDER
135
- ```
136
- > **Note:** The `-p PROVIDER` argument is required when setting an API key. For example:
137
- > ```bash
138
- > janito --set-api-key sk-xxxxxxx -p openai
139
- > ```
140
-
141
- - **Set the Provider (durable)**
142
- ```bash
143
- janito --set provider=provider_name
144
- ```
145
-
146
- - **List Supported Providers**
147
- ```bash
148
- janito --list-providers
149
- ```
150
-
151
- - **List Registered Tools**
152
- ```bash
153
- janito --list-tools
154
- ```
155
-
156
- - **List Models for a Provider**
157
- ```bash
158
- janito -p PROVIDER --list-models
159
- ```
160
-
161
- - **Submit a Prompt**
162
- ```bash
163
- janito "What is the capital of France?"
164
- ```
165
-
166
- - **Start Interactive Chat Shell**
167
- ```bash
168
- janito
169
- ```
170
-
171
- ### Advanced Options
172
-
173
- - **Enable Execution Tools (Code/Shell Execution)**
174
-
175
- By default, **all tool privileges (read, write, execute)** are disabled for safety. This means Janito starts with no permissions to run tools that read, write, or execute code/shell commands unless you explicitly enable them.
176
-
177
- - To enable **read** tools (e.g., file reading, searching): add `-r` or `--read`
178
- - To enable **write** tools (e.g., file editing): add `-w` or `--write`
179
- - To enable **execution** tools (code/shell execution): add `-x` or `--exec`
180
-
181
- You can combine these flags as needed. For example, to enable both read and write tools:
182
-
183
- ```bash
184
- janito -r -w "Read and update this file: ..."
185
- ```
186
-
187
- To enable all permissions (read, write, execute):
188
-
189
- ```bash
190
- janito -r -w -x "Run this code: print('Hello, world!')"
191
- ```
192
-
193
- > **Warning:** Enabling execution tools allows running arbitrary code or shell commands. Only use `--exec` if you trust your prompt and environment.
194
-
195
- - **Set a System Prompt**
196
- ```bash
197
- janito -s path/to/system_prompt.txt "Your prompt here"
198
- ```
199
-
200
- - **Select Model and Provider Temporarily**
201
- ```bash
202
- janito -p openai -m gpt-3.5-turbo "Your prompt here"
203
- janito -p google -m gemini-2.5-flash "Your prompt here"
204
- ```
205
-
206
-
207
-
208
- - **Enable Event Logging**
209
- ```bash
210
- janito -e "Your prompt here"
211
- ```
212
-
213
- ## 🌟 CLI Options Reference
214
-
215
- ### Core CLI Options
216
- | Option | Description |
217
- |------------------------|-----------------------------------------------------------------------------|
218
- | `--version` | Show program version |
219
- | `--list-tools` | List all registered tools |
220
- | `--list-providers` | List all supported LLM providers |
221
- | `-l`, `--list-models` | List models for current/selected provider |
222
- | `--set-api-key` | Set API key for a provider. **Requires** `-p PROVIDER` to specify the provider. |
223
- | `--set provider=name` | Set the current LLM provider (e.g., `janito --set provider=openai`) |
224
- | `--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`) |
225
- | `-s`, `--system` | Set a system prompt (e.g., `janito -s path/to/system_prompt.txt "Your prompt here"`) |
226
-
227
- | `-p`, `--provider` | Select LLM provider (overrides config) (e.g., `janito -p openai "Your prompt here"`) |
228
- | `-m`, `--model` | Select model for the provider (e.g., `janito -m gpt-3.5-turbo "Your prompt here"`) |
229
- | `-v`, `--verbose` | Print extra information before answering |
230
- | `-R`, `--raw` | Print raw JSON response from API |
231
- | `-e`, `--event-log` | Log events to console as they occur |
232
- | `prompt` | Prompt to submit for the non interactive mode (e.g. `janito "What is the capital of France?"`) |
233
-
234
- ### 🧩 Extended Chat Mode Commands
235
- Once inside the interactive chat mode, you can use these slash commands:
236
-
237
- #### 📲 Basic Interaction
238
- | Command | Description |
239
- |-------------------|----------------------------------------------|
240
- | `/exit` or `exit` | Exit chat mode |
241
- | `/help` | Show available commands |
242
- | `/multi` | Activate multiline input mode |
243
- | `/clear` | Clear the terminal screen |
244
- | `/history` | Show input history |
245
- | `/view` | Print current conversation history |
246
- | `/track` | Show tool usage history |
247
-
248
- #### 💬 Conversation Management
249
- | Command | Description |
250
- |---------------------|----------------------------------------------|
251
- | `/restart` | Start a new conversation (reset context) |
252
- | `/prompt` | Show the current system prompt |
253
- | `/role <description>` | Change the system role |
254
- | `/lang [code]` | Change interface language (e.g., `/lang en`) |
255
-
256
- #### 🛠️ Tool & Provider Interaction
257
- | Command | Description |
258
- |----------------------|----------------------------------------------|
259
- | `/tools` | List available tools |
260
- | `/-status` | Show status of server |
261
- | `/-logs` | Show last lines of logs |
262
- | `/write [on\|off]` | Enable or disable write tool permissions |
263
- | `/read [on\|off]` | Enable or disable read tool permissions |
264
- | `/execute [on\|off]` | Enable or disable execute tool permissions |
265
-
266
-
267
- #### 📊 Output Control
268
- | Command | Description |
269
- |---------------------|----------------------------------------------|
270
- | `/verbose` | Show current verbose mode status |
271
- | `/verbose [on\|off]` | Set verbose mode |
272
-
273
- ## Extending Janito
274
-
275
- 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.
276
-
277
- ## Supported Providers
278
-
279
- - OpenAI
280
- - OpenAI over Azure
281
- - Google Gemini
282
- - DeepSeek
283
- - Anthropic
284
-
285
- See [docs/supported-providers-models.md](docs/supported-providers-models.md) for more details.
286
-
287
- ## Contributing
288
-
289
- Contributions are welcome! Please see the `CONTRIBUTING.md` (if available) or open an issue to get started.
290
-
291
- ---
292
-
293
- ## Developer Documentation
294
-
295
- For developer-specific setup, versioning, and contribution guidelines, see [README-dev.md](./README-dev.md).
296
-
297
- ## License
298
-
299
- This project is licensed under the terms of the MIT license.
300
-
301
- For more information, see the documentation in the `docs/` directory or run `janito --help`.
302
-
303
- ---
304
-
305
- # Support
306
-
307
-
308
- ## 📖 Detailed Documentation
309
-
310
- Full and up-to-date documentation is available at: https://ikignosis.github.io/janito/
311
-
312
- ---
313
-
314
-
315
- ## FAQ: Setting API Keys
316
-
317
- - [Multiple API_KEY setup](#faq-multiple-api-key)
318
- - [Use a specific model](#faq-use-specific-model)
319
- - [Fetch the available LLM providers](#faq-fetch-providers)
320
- - [Fetch the available models](#faq-fetch-models)
321
-
322
-
323
- <a id="faq-multiple-api-key"></a>
324
- ### Multiple API_KEY setup
325
-
326
- To set an API key for a provider, you **must** specify both the API key and the provider name:
327
-
328
- ```bash
329
- janito --set-api-key YOUR_API_KEY -p PROVIDER_NAME
330
- ```
331
-
332
- You can have an API_KEY for each LLM provider
333
-
334
- ```bash
335
- janito --set-api-key API_KEY_1 -p PROVIDER_1
336
- janito --set-api-key API_KEY_2 -p PROVIDER_2
337
- ```
338
-
339
- Then you can easily use one provider or the other without changing the API_KEY
340
-
341
- ```bash
342
- janito -p PROVIDER_1 "What provider do you use?"
343
- janito -p PROVIDER_2 "What provider do you use?"
344
- ```
345
-
346
- If you omit the `-p PROVIDER_NAME` argument, Janito will show an error and not set the key.
347
-
348
- <a id="faq-use-specific-model"></a>
349
- ### Use a specific model
350
-
351
- To use a specific model, you can use the `-m` option in the following way:
352
-
353
- ```bash
354
- janito -m gpt-4.1-nano -p openai "What model do you use?"
355
- ```
356
-
357
- Or you can use the durable `--set` option:
358
-
359
- ```bash
360
- janito --set provider=openai
361
- janito --set model=gpt-4.1-nano
362
- janito "What model do you use?"
363
- ```
364
-
365
- <a id="faq-fetch-providers"></a>
366
- ### Fetch the available LLM providers
367
-
368
- You can list all the LLM providers available using:
369
-
370
- ```bash
371
- janito --list-providers
372
- ```
373
-
374
- <a id="faq-fetch-models"></a>
375
- ### Fetch the available models
376
-
377
- Each LLM provider has its own models, the best way to check what are the available models is using the following commands:
378
-
379
- ```bash
380
- janito -p openai --list-models
381
- janito -p google --list-models
382
- janito -p azure_openai --list-models
383
- janito -p anthropic --list-models
384
- janito -p deepseek --list-models
385
- ```
386
-
387
-
388
- ## Ask Me Anything
389
-
390
- <div align="center">
391
- <a href="git@github.com:ikignosis/janito.git" title="Ask Me Anything">
392
- <img width="250" src="docs/imgs/ama.png" alt="Ask Me Anything">
393
- </a>
394
- </div
395
-
396
- When the FAQ are not enough, you can contact the contributors of the project by direct questions
397
-
398
- <p align="center">
399
- <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>
400
- </p>
401
-
402
- #### Guidelines
403
-
404
- - :mag: Ensure your question hasn't already been answered.
405
- - :memo: Use a succinct title and description.
406
- - :bug: Bugs & feature requests should be opened on the relevant issue tracker.
407
- - :signal_strength: Support questions are better asked on Stack Overflow.
408
- - :blush: Be nice, civil and polite.
409
- - :heart_eyes: If you include at least one emoji in your question, the feedback will probably come faster.
410
- - [Read more AMAs](https://github.com/sindresorhus/amas)
411
- - [What's an AMA?](https://en.wikipedia.org/wiki/R/IAmA)
1
+ Metadata-Version: 2.4
2
+ Name: janito
3
+ Version: 2.24.0
4
+ Summary: A new Python package called janito.
5
+ Author-email: João Pinto <janito@ikignosis.org>
6
+ Project-URL: Homepage, https://github.com/ikignosis/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
+ Requires-Dist: questionary>=2.0.1
21
+ Requires-Dist: openai>=1.68.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Requires-Dist: pre-commit; extra == "dev"
25
+ Requires-Dist: ruff==0.11.9; extra == "dev"
26
+ Requires-Dist: detect-secrets==1.4.0; extra == "dev"
27
+ Requires-Dist: codespell==2.4.1; extra == "dev"
28
+ Requires-Dist: black; extra == "dev"
29
+ Requires-Dist: questionary>=2.0.1; extra == "dev"
30
+ Requires-Dist: setuptools_scm>=8.0; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # Janito, control you context
34
+
35
+ [![PyPI version](https://badge.fury.io/py/janito.svg)](https://badge.fury.io/py/janito)
36
+
37
+ 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.
38
+
39
+ ## Features
40
+
41
+ - 🔑 Manage API keys and provider configurations
42
+ - 🤖 Interact with multiple LLM providers (OpenAI, Google Gemini, DeepSeek, and more)
43
+ - 🛠️ List and use a variety of registered tools
44
+ - 📝 Submit prompts and receive responses directly from the CLI
45
+ - 📋 List available models for each provider
46
+ - 🧩 Extensible architecture for adding new providers and tools
47
+ - 🎛️ Rich terminal output and event logging
48
+
49
+ ### Advanced and Architectural Features
50
+
51
+ - ⚡ **Event-driven architecture**: Modular, decoupled system using a custom EventBus for extensibility and integration.
52
+ - 🧑‍💻 **Tool registry & dynamic tool execution**: Register new tools easily, execute them by name or call from automation pipelines.
53
+ - 🤖 **LLM Agent automation**: Supports agent-like workflows with the ability to chain tools or make decisions during LLM conversations.
54
+ - 🏗️ **Extensible provider management**: Add, configure, or switch between LLM providers and their models on the fly.
55
+ - 🧰 **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.
56
+ - 📝 **Comprehensive event & history reporting**: Detailed logs of prompts, events, tool usage, and responses for traceability and audit.
57
+ - 🖥️ **Enhanced terminal UI**: Colorful, informative real-time outputs and logs to improve productivity and insight during LLM usage.
58
+
59
+ ## Installation
60
+
61
+ Janito is a Python package. Since this is a development version, you can install it directly from GitHub:
62
+
63
+ ```bash
64
+ pip install git+git@github.com:ikignosis/janito.git
65
+ ```
66
+
67
+ ### First launch and quick setup
68
+
69
+ Janito integrates with external LLM providers (list below), and most of them require a subscription to get an API_KEY.
70
+
71
+ > [!NOTE]
72
+ > Today, on June the 26th 2025, Google has a free tier subscription for its Gemini-2.5-flash and Gemini-2.5-pro models. Despite the limitation of the models and of the rate limit of the free tier, they can be used for testing janito. The API_KEY for Gemini is available [here](https://aistudio.google.com/app/apikey).
73
+
74
+ > [!NOTE]
75
+ > [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.
76
+
77
+ For a quick usage you can:
78
+
79
+ 1. once you get the API_KEY from your favourite LLM provider, setup the API_KEY in Janito
80
+
81
+ ```bash
82
+ janito --set-api-key API_KEY -p PROVIDER
83
+ ```
84
+
85
+ 2. then run janito from command line with the specific LLM provider of your choice
86
+
87
+ ```bash
88
+ janito -p PROVIDER "Hello, who are you? How can you help me in my tasks?"
89
+ ```
90
+
91
+ 3. or you can run janito in interactive mode without the trailing argument
92
+
93
+ ```bash
94
+ janito -p PROVIDER
95
+ ```
96
+
97
+ 4. if you want to setup a specific provider for any further interactions you can use:
98
+
99
+ ```bash
100
+ janito -set provider=PROVIDER
101
+ ```
102
+
103
+ > [!WARNING]
104
+ > Currently the supported providers are: `openai`, `google`, `anthropic`, `azure_openai`. You can get more details with `janito --list-providers`.
105
+
106
+ 5. for more advanced setup, continue reading.
107
+
108
+
109
+ ## Usage
110
+
111
+ After installation, use the `janito` command in your terminal with the syntax: `janito [options] [prompt]`
112
+
113
+ Janito supports both general-purpose and specialized assistance through the use of **profiles**. Profiles allow you to select a specific system prompt template and behavior for the agent, enabling workflows tailored to different roles or tasks (e.g., developer, writer, data analyst), or to use Janito as a generic AI assistant.
114
+
115
+ ### Profiles: General-Purpose and Specialized Assistance
116
+
117
+ - By default, Janito acts as a general-purpose assistant.
118
+ - You can select a specialized profile using the `--profile` option:
119
+ ```bash
120
+ janito --profile developer "Refactor this code for better readability."
121
+ janito --profile writer "Draft a blog post about AI in healthcare."
122
+ ```
123
+ - Profiles change the system prompt and agent behavior to suit the selected role or workflow.
124
+ - To see available profiles or customize them, refer to the documentation or the `agent/templates/profiles/` directory.
125
+
126
+ > **Tip:** Use `--profile` for targeted workflows, or omit it for a general-purpose assistant.
127
+
128
+ 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.
129
+
130
+ ### Basic Commands
131
+
132
+ - **Set API Key for a Provider (requires -p PROVIDER)**
133
+ ```bash
134
+ janito --set-api-key API_KEY -p PROVIDER
135
+ ```
136
+ > **Note:** The `-p PROVIDER` argument is required when setting an API key. For example:
137
+ > ```bash
138
+ > janito --set-api-key sk-xxxxxxx -p openai
139
+ > ```
140
+
141
+ - **Set the Provider (durable)**
142
+ ```bash
143
+ janito --set provider=provider_name
144
+ ```
145
+
146
+ - **List Supported Providers**
147
+ ```bash
148
+ janito --list-providers
149
+ ```
150
+
151
+ - **List Registered Tools**
152
+ ```bash
153
+ janito --list-tools
154
+ ```
155
+
156
+ - **List Models for a Provider**
157
+ ```bash
158
+ janito -p PROVIDER --list-models
159
+ ```
160
+
161
+ - **Submit a Prompt**
162
+ ```bash
163
+ janito "What is the capital of France?"
164
+ ```
165
+
166
+ - **Start Interactive Chat Shell**
167
+ ```bash
168
+ janito
169
+ ```
170
+
171
+ ### Advanced Options
172
+
173
+ - **Enable Execution Tools (Code/Shell Execution)**
174
+
175
+ By default, **all tool privileges (read, write, execute)** are disabled for safety. This means Janito starts with no permissions to run tools that read, write, or execute code/shell commands unless you explicitly enable them.
176
+
177
+ - To enable **read** tools (e.g., file reading, searching): add `-r` or `--read`
178
+ - To enable **write** tools (e.g., file editing): add `-w` or `--write`
179
+ - To enable **execution** tools (code/shell execution): add `-x` or `--exec`
180
+
181
+ You can combine these flags as needed. For example, to enable both read and write tools:
182
+
183
+ ```bash
184
+ janito -r -w "Read and update this file: ..."
185
+ ```
186
+
187
+ To enable all permissions (read, write, execute):
188
+
189
+ ```bash
190
+ janito -r -w -x "Run this code: print('Hello, world!')"
191
+ ```
192
+
193
+ > **Warning:** Enabling execution tools allows running arbitrary code or shell commands. Only use `--exec` if you trust your prompt and environment.
194
+
195
+ - **Set a System Prompt**
196
+ ```bash
197
+ janito -s path/to/system_prompt.txt "Your prompt here"
198
+ ```
199
+
200
+ - **Select Model and Provider Temporarily**
201
+ ```bash
202
+ janito -p openai -m gpt-3.5-turbo "Your prompt here"
203
+ janito -p google -m gemini-2.5-flash "Your prompt here"
204
+ ```
205
+
206
+
207
+
208
+ - **Enable Event Logging**
209
+ ```bash
210
+ janito -e "Your prompt here"
211
+ ```
212
+
213
+ ## 🌟 CLI Options Reference
214
+
215
+ ### Core CLI Options
216
+ | Option | Description |
217
+ |------------------------|-----------------------------------------------------------------------------|
218
+ | `--version` | Show program version |
219
+ | `--list-tools` | List all registered tools |
220
+ | `--list-providers` | List all supported LLM providers |
221
+ | `-l`, `--list-models` | List models for current/selected provider |
222
+ | `--set-api-key` | Set API key for a provider. **Requires** `-p PROVIDER` to specify the provider. |
223
+ | `--set provider=name` | Set the current LLM provider (e.g., `janito --set provider=openai`) |
224
+ | `--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`) |
225
+ | `-s`, `--system` | Set a system prompt (e.g., `janito -s path/to/system_prompt.txt "Your prompt here"`) |
226
+
227
+ | `-p`, `--provider` | Select LLM provider (overrides config) (e.g., `janito -p openai "Your prompt here"`) |
228
+ | `-m`, `--model` | Select model for the provider (e.g., `janito -m gpt-3.5-turbo "Your prompt here"`) |
229
+ | `-v`, `--verbose` | Print extra information before answering |
230
+ | `-R`, `--raw` | Print raw JSON response from API |
231
+ | `-e`, `--event-log` | Log events to console as they occur |
232
+ | `prompt` | Prompt to submit for the non interactive mode (e.g. `janito "What is the capital of France?"`) |
233
+
234
+ ### 🧩 Extended Chat Mode Commands
235
+ Once inside the interactive chat mode, you can use these slash commands:
236
+
237
+ #### 📲 Basic Interaction
238
+ | Command | Description |
239
+ |-------------------|----------------------------------------------|
240
+ | `/exit` or `exit` | Exit chat mode |
241
+ | `/help` | Show available commands |
242
+ | `/multi` | Activate multiline input mode |
243
+ | `/clear` | Clear the terminal screen |
244
+ | `/history` | Show input history |
245
+ | `/view` | Print current conversation history |
246
+ | `/track` | Show tool usage history |
247
+
248
+ #### 💬 Conversation Management
249
+ | Command | Description |
250
+ |---------------------|----------------------------------------------|
251
+ | `/restart` | Start a new conversation (reset context) |
252
+ | `/prompt` | Show the current system prompt |
253
+ | `/role <description>` | Change the system role |
254
+ | `/lang [code]` | Change interface language (e.g., `/lang en`) |
255
+
256
+ #### 🛠️ Tool & Provider Interaction
257
+ | Command | Description |
258
+ |----------------------|----------------------------------------------|
259
+ | `/tools` | List available tools |
260
+ | `/-status` | Show status of server |
261
+ | `/-logs` | Show last lines of logs |
262
+ | `/write [on\|off]` | Enable or disable write tool permissions |
263
+ | `/read [on\|off]` | Enable or disable read tool permissions |
264
+ | `/execute [on\|off]` | Enable or disable execute tool permissions |
265
+
266
+
267
+ #### 📊 Output Control
268
+ | Command | Description |
269
+ |---------------------|----------------------------------------------|
270
+ | `/verbose` | Show current verbose mode status |
271
+ | `/verbose [on\|off]` | Set verbose mode |
272
+
273
+ ## Extending Janito
274
+
275
+ 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.
276
+
277
+ ## Supported Providers
278
+
279
+ - OpenAI
280
+ - OpenAI over Azure
281
+ - Google Gemini
282
+ - DeepSeek
283
+ - Anthropic
284
+
285
+ See [docs/supported-providers-models.md](docs/supported-providers-models.md) for more details.
286
+
287
+ ## Contributing
288
+
289
+ Contributions are welcome! Please see the `CONTRIBUTING.md` (if available) or open an issue to get started.
290
+
291
+ ---
292
+
293
+ ## Developer Documentation
294
+
295
+ For developer-specific setup, versioning, and contribution guidelines, see [README-dev.md](./README-dev.md).
296
+
297
+ ## License
298
+
299
+ This project is licensed under the terms of the MIT license.
300
+
301
+ For more information, see the documentation in the `docs/` directory or run `janito --help`.
302
+
303
+ ---
304
+
305
+ # Support
306
+
307
+
308
+ ## 📖 Detailed Documentation
309
+
310
+ Full and up-to-date documentation is available at: https://ikignosis.github.io/janito/
311
+
312
+ ---
313
+
314
+
315
+ ## FAQ: Setting API Keys
316
+
317
+ - [Multiple API_KEY setup](#faq-multiple-api-key)
318
+ - [Use a specific model](#faq-use-specific-model)
319
+ - [Fetch the available LLM providers](#faq-fetch-providers)
320
+ - [Fetch the available models](#faq-fetch-models)
321
+
322
+
323
+ <a id="faq-multiple-api-key"></a>
324
+ ### Multiple API_KEY setup
325
+
326
+ To set an API key for a provider, you **must** specify both the API key and the provider name:
327
+
328
+ ```bash
329
+ janito --set-api-key YOUR_API_KEY -p PROVIDER_NAME
330
+ ```
331
+
332
+ You can have an API_KEY for each LLM provider
333
+
334
+ ```bash
335
+ janito --set-api-key API_KEY_1 -p PROVIDER_1
336
+ janito --set-api-key API_KEY_2 -p PROVIDER_2
337
+ ```
338
+
339
+ Then you can easily use one provider or the other without changing the API_KEY
340
+
341
+ ```bash
342
+ janito -p PROVIDER_1 "What provider do you use?"
343
+ janito -p PROVIDER_2 "What provider do you use?"
344
+ ```
345
+
346
+ If you omit the `-p PROVIDER_NAME` argument, Janito will show an error and not set the key.
347
+
348
+ <a id="faq-use-specific-model"></a>
349
+ ### Use a specific model
350
+
351
+ To use a specific model, you can use the `-m` option in the following way:
352
+
353
+ ```bash
354
+ janito -m gpt-4.1-nano -p openai "What model do you use?"
355
+ ```
356
+
357
+ Or you can use the durable `--set` option:
358
+
359
+ ```bash
360
+ janito --set provider=openai
361
+ janito --set model=gpt-4.1-nano
362
+ janito "What model do you use?"
363
+ ```
364
+
365
+ <a id="faq-fetch-providers"></a>
366
+ ### Fetch the available LLM providers
367
+
368
+ You can list all the LLM providers available using:
369
+
370
+ ```bash
371
+ janito --list-providers
372
+ ```
373
+
374
+ <a id="faq-fetch-models"></a>
375
+ ### Fetch the available models
376
+
377
+ Each LLM provider has its own models, the best way to check what are the available models is using the following commands:
378
+
379
+ ```bash
380
+ janito -p openai --list-models
381
+ janito -p google --list-models
382
+ janito -p azure_openai --list-models
383
+ janito -p anthropic --list-models
384
+ janito -p deepseek --list-models
385
+ ```
386
+
387
+
388
+ ## Ask Me Anything
389
+
390
+ <div align="center">
391
+ <a href="git@github.com:ikignosis/janito.git" title="Ask Me Anything">
392
+ <img width="250" src="docs/imgs/ama.png" alt="Ask Me Anything">
393
+ </a>
394
+ </div
395
+
396
+ When the FAQ are not enough, you can contact the contributors of the project by direct questions
397
+
398
+ <p align="center">
399
+ <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>
400
+ </p>
401
+
402
+ #### Guidelines
403
+
404
+ - :mag: Ensure your question hasn't already been answered.
405
+ - :memo: Use a succinct title and description.
406
+ - :bug: Bugs & feature requests should be opened on the relevant issue tracker.
407
+ - :signal_strength: Support questions are better asked on Stack Overflow.
408
+ - :blush: Be nice, civil and polite.
409
+ - :heart_eyes: If you include at least one emoji in your question, the feedback will probably come faster.
410
+ - [Read more AMAs](https://github.com/sindresorhus/amas)
411
+ - [What's an AMA?](https://en.wikipedia.org/wiki/R/IAmA)