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