codemaster-cli 1.0.1__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.
- codemaster_cli-1.0.1.dist-info/METADATA +645 -0
- codemaster_cli-1.0.1.dist-info/RECORD +174 -0
- codemaster_cli-1.0.1.dist-info/WHEEL +4 -0
- codemaster_cli-1.0.1.dist-info/entry_points.txt +3 -0
- vibe/__init__.py +6 -0
- vibe/acp/__init__.py +0 -0
- vibe/acp/acp_agent_loop.py +746 -0
- vibe/acp/entrypoint.py +81 -0
- vibe/acp/tools/__init__.py +0 -0
- vibe/acp/tools/base.py +100 -0
- vibe/acp/tools/builtins/bash.py +134 -0
- vibe/acp/tools/builtins/read_file.py +54 -0
- vibe/acp/tools/builtins/search_replace.py +129 -0
- vibe/acp/tools/builtins/todo.py +65 -0
- vibe/acp/tools/builtins/write_file.py +98 -0
- vibe/acp/tools/session_update.py +118 -0
- vibe/acp/utils.py +213 -0
- vibe/cli/__init__.py +0 -0
- vibe/cli/autocompletion/__init__.py +0 -0
- vibe/cli/autocompletion/base.py +22 -0
- vibe/cli/autocompletion/path_completion.py +177 -0
- vibe/cli/autocompletion/slash_command.py +99 -0
- vibe/cli/cli.py +229 -0
- vibe/cli/clipboard.py +69 -0
- vibe/cli/commands.py +116 -0
- vibe/cli/entrypoint.py +173 -0
- vibe/cli/history_manager.py +91 -0
- vibe/cli/plan_offer/adapters/http_whoami_gateway.py +67 -0
- vibe/cli/plan_offer/decide_plan_offer.py +87 -0
- vibe/cli/plan_offer/ports/whoami_gateway.py +23 -0
- vibe/cli/terminal_setup.py +323 -0
- vibe/cli/textual_ui/__init__.py +0 -0
- vibe/cli/textual_ui/ansi_markdown.py +58 -0
- vibe/cli/textual_ui/app.py +1546 -0
- vibe/cli/textual_ui/app.tcss +1020 -0
- vibe/cli/textual_ui/external_editor.py +32 -0
- vibe/cli/textual_ui/handlers/__init__.py +5 -0
- vibe/cli/textual_ui/handlers/event_handler.py +147 -0
- vibe/cli/textual_ui/widgets/__init__.py +0 -0
- vibe/cli/textual_ui/widgets/approval_app.py +192 -0
- vibe/cli/textual_ui/widgets/banner/banner.py +85 -0
- vibe/cli/textual_ui/widgets/banner/petit_chat.py +176 -0
- vibe/cli/textual_ui/widgets/braille_renderer.py +58 -0
- vibe/cli/textual_ui/widgets/chat_input/__init__.py +7 -0
- vibe/cli/textual_ui/widgets/chat_input/body.py +214 -0
- vibe/cli/textual_ui/widgets/chat_input/completion_manager.py +58 -0
- vibe/cli/textual_ui/widgets/chat_input/completion_popup.py +43 -0
- vibe/cli/textual_ui/widgets/chat_input/container.py +195 -0
- vibe/cli/textual_ui/widgets/chat_input/text_area.py +365 -0
- vibe/cli/textual_ui/widgets/compact.py +41 -0
- vibe/cli/textual_ui/widgets/config_app.py +171 -0
- vibe/cli/textual_ui/widgets/context_progress.py +30 -0
- vibe/cli/textual_ui/widgets/load_more.py +43 -0
- vibe/cli/textual_ui/widgets/loading.py +201 -0
- vibe/cli/textual_ui/widgets/messages.py +277 -0
- vibe/cli/textual_ui/widgets/no_markup_static.py +11 -0
- vibe/cli/textual_ui/widgets/path_display.py +28 -0
- vibe/cli/textual_ui/widgets/proxy_setup_app.py +127 -0
- vibe/cli/textual_ui/widgets/question_app.py +496 -0
- vibe/cli/textual_ui/widgets/spinner.py +194 -0
- vibe/cli/textual_ui/widgets/status_message.py +76 -0
- vibe/cli/textual_ui/widgets/teleport_message.py +31 -0
- vibe/cli/textual_ui/widgets/tool_widgets.py +371 -0
- vibe/cli/textual_ui/widgets/tools.py +201 -0
- vibe/cli/textual_ui/windowing/__init__.py +29 -0
- vibe/cli/textual_ui/windowing/history.py +105 -0
- vibe/cli/textual_ui/windowing/history_windowing.py +71 -0
- vibe/cli/textual_ui/windowing/state.py +105 -0
- vibe/cli/update_notifier/__init__.py +47 -0
- vibe/cli/update_notifier/adapters/filesystem_update_cache_repository.py +59 -0
- vibe/cli/update_notifier/adapters/github_update_gateway.py +101 -0
- vibe/cli/update_notifier/adapters/pypi_update_gateway.py +107 -0
- vibe/cli/update_notifier/ports/update_cache_repository.py +16 -0
- vibe/cli/update_notifier/ports/update_gateway.py +53 -0
- vibe/cli/update_notifier/update.py +139 -0
- vibe/cli/update_notifier/whats_new.py +49 -0
- vibe/core/__init__.py +5 -0
- vibe/core/agent_loop.py +1075 -0
- vibe/core/agents/__init__.py +31 -0
- vibe/core/agents/manager.py +166 -0
- vibe/core/agents/models.py +143 -0
- vibe/core/auth/__init__.py +6 -0
- vibe/core/auth/crypto.py +137 -0
- vibe/core/auth/github.py +178 -0
- vibe/core/autocompletion/__init__.py +0 -0
- vibe/core/autocompletion/completers.py +257 -0
- vibe/core/autocompletion/file_indexer/__init__.py +10 -0
- vibe/core/autocompletion/file_indexer/ignore_rules.py +156 -0
- vibe/core/autocompletion/file_indexer/indexer.py +179 -0
- vibe/core/autocompletion/file_indexer/store.py +169 -0
- vibe/core/autocompletion/file_indexer/watcher.py +71 -0
- vibe/core/autocompletion/fuzzy.py +189 -0
- vibe/core/autocompletion/path_prompt.py +108 -0
- vibe/core/autocompletion/path_prompt_adapter.py +149 -0
- vibe/core/config.py +983 -0
- vibe/core/config_PATCH_INSTRUCTIONS.md +77 -0
- vibe/core/llm/__init__.py +0 -0
- vibe/core/llm/backend/anthropic.py +630 -0
- vibe/core/llm/backend/base.py +38 -0
- vibe/core/llm/backend/factory.py +7 -0
- vibe/core/llm/backend/generic.py +425 -0
- vibe/core/llm/backend/mistral.py +381 -0
- vibe/core/llm/backend/vertex.py +115 -0
- vibe/core/llm/exceptions.py +195 -0
- vibe/core/llm/format.py +184 -0
- vibe/core/llm/message_utils.py +24 -0
- vibe/core/llm/types.py +120 -0
- vibe/core/middleware.py +209 -0
- vibe/core/output_formatters.py +85 -0
- vibe/core/paths/__init__.py +0 -0
- vibe/core/paths/config_paths.py +68 -0
- vibe/core/paths/global_paths.py +40 -0
- vibe/core/programmatic.py +56 -0
- vibe/core/prompts/__init__.py +33 -0
- vibe/core/prompts/cli.md +111 -0
- vibe/core/prompts/compact.md +48 -0
- vibe/core/prompts/dangerous_directory.md +5 -0
- vibe/core/prompts/explore.md +50 -0
- vibe/core/prompts/gitmaster.md +38 -0
- vibe/core/prompts/project_context.md +8 -0
- vibe/core/prompts/tests.md +1 -0
- vibe/core/proxy_setup.py +65 -0
- vibe/core/session/session_loader.py +222 -0
- vibe/core/session/session_logger.py +318 -0
- vibe/core/session/session_migration.py +41 -0
- vibe/core/skills/__init__.py +7 -0
- vibe/core/skills/manager.py +132 -0
- vibe/core/skills/models.py +92 -0
- vibe/core/skills/parser.py +39 -0
- vibe/core/system_prompt.py +466 -0
- vibe/core/telemetry/__init__.py +0 -0
- vibe/core/telemetry/send.py +185 -0
- vibe/core/teleport/errors.py +9 -0
- vibe/core/teleport/git.py +196 -0
- vibe/core/teleport/nuage.py +180 -0
- vibe/core/teleport/teleport.py +208 -0
- vibe/core/teleport/types.py +54 -0
- vibe/core/tools/base.py +338 -0
- vibe/core/tools/builtins/ask_user_question.py +134 -0
- vibe/core/tools/builtins/bash.py +454 -0
- vibe/core/tools/builtins/git_clone.py +861 -0
- vibe/core/tools/builtins/grep.py +310 -0
- vibe/core/tools/builtins/prompts/__init__.py +0 -0
- vibe/core/tools/builtins/prompts/ask_user_question.md +84 -0
- vibe/core/tools/builtins/prompts/bash.md +73 -0
- vibe/core/tools/builtins/prompts/git_clone.md +43 -0
- vibe/core/tools/builtins/prompts/gitmaster.md +38 -0
- vibe/core/tools/builtins/prompts/grep.md +4 -0
- vibe/core/tools/builtins/prompts/read_file.md +13 -0
- vibe/core/tools/builtins/prompts/search_replace.md +43 -0
- vibe/core/tools/builtins/prompts/task.md +24 -0
- vibe/core/tools/builtins/prompts/todo.md +199 -0
- vibe/core/tools/builtins/prompts/write_file.md +42 -0
- vibe/core/tools/builtins/read_file.py +222 -0
- vibe/core/tools/builtins/search_replace.py +456 -0
- vibe/core/tools/builtins/task.py +154 -0
- vibe/core/tools/builtins/todo.py +134 -0
- vibe/core/tools/builtins/write_file.py +160 -0
- vibe/core/tools/manager.py +341 -0
- vibe/core/tools/mcp.py +397 -0
- vibe/core/tools/ui.py +68 -0
- vibe/core/trusted_folders.py +86 -0
- vibe/core/types.py +401 -0
- vibe/core/utils.py +396 -0
- vibe/setup/onboarding/__init__.py +39 -0
- vibe/setup/onboarding/base.py +14 -0
- vibe/setup/onboarding/onboarding.tcss +134 -0
- vibe/setup/onboarding/screens/__init__.py +5 -0
- vibe/setup/onboarding/screens/api_key.py +200 -0
- vibe/setup/onboarding/screens/provider_selection.py +184 -0
- vibe/setup/onboarding/screens/welcome.py +136 -0
- vibe/setup/trusted_folders/trust_folder_dialog.py +180 -0
- vibe/setup/trusted_folders/trust_folder_dialog.tcss +83 -0
- vibe/whats_new.md +5 -0
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codemaster-cli
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: CLI coding assistant with local LLM support via Ollama
|
|
5
|
+
Project-URL: Homepage, https://github.com/marshal0004/CodeMaster
|
|
6
|
+
Project-URL: Repository, https://github.com/marshal0004/CodeMaster
|
|
7
|
+
Project-URL: Issues, https://github.com/marshal0004/CodeMaster/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/marshal0004/CodeMaster#readme
|
|
9
|
+
Author: codeMaster Contributors
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
Keywords: ai,cli,coding-assistant,developer-tools,llm,local-llm,ollama
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: agent-client-protocol==0.8.0
|
|
24
|
+
Requires-Dist: anyio>=4.12.0
|
|
25
|
+
Requires-Dist: cryptography<=46.0.3,>=44.0.0
|
|
26
|
+
Requires-Dist: gitpython>=3.1.46
|
|
27
|
+
Requires-Dist: giturlparse>=0.14.0
|
|
28
|
+
Requires-Dist: google-auth>=2.0.0
|
|
29
|
+
Requires-Dist: httpx>=0.28.1
|
|
30
|
+
Requires-Dist: keyring>=25.6.0
|
|
31
|
+
Requires-Dist: mcp>=1.14.0
|
|
32
|
+
Requires-Dist: mistralai==1.9.11
|
|
33
|
+
Requires-Dist: packaging>=24.1
|
|
34
|
+
Requires-Dist: pexpect>=4.9.0
|
|
35
|
+
Requires-Dist: pydantic-settings>=2.12.0
|
|
36
|
+
Requires-Dist: pydantic>=2.12.4
|
|
37
|
+
Requires-Dist: pyperclip>=1.11.0
|
|
38
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
39
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
40
|
+
Requires-Dist: requests>=2.20.0
|
|
41
|
+
Requires-Dist: rich>=14.0.0
|
|
42
|
+
Requires-Dist: textual-speedups>=0.2.1
|
|
43
|
+
Requires-Dist: textual>=1.0.0
|
|
44
|
+
Requires-Dist: tomli-w>=1.2.0
|
|
45
|
+
Requires-Dist: tree-sitter-bash>=0.25.1
|
|
46
|
+
Requires-Dist: tree-sitter>=0.25.2
|
|
47
|
+
Requires-Dist: watchfiles>=1.1.1
|
|
48
|
+
Requires-Dist: zstandard>=0.25.0
|
|
49
|
+
Description-Content-Type: text/markdown
|
|
50
|
+
|
|
51
|
+
# codeMaster
|
|
52
|
+
|
|
53
|
+
[](https://www.python.org/downloads/release/python-3120/)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
**Open-source CLI coding assistant with local LLM support.**
|
|
59
|
+
|
|
60
|
+
codeMaster is a command-line coding assistant that works with both cloud-based and local LLM models (via Ollama). It provides a conversational interface to your codebase, allowing you to use natural language to explore, modify, and interact with your projects through a powerful set of tools.
|
|
61
|
+
|
|
62
|
+
> [!NOTE]
|
|
63
|
+
> codeMaster works on Windows, but we officially support and target UNIX environments.
|
|
64
|
+
|
|
65
|
+
### Installation
|
|
66
|
+
|
|
67
|
+
**Using pip**
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install -e .
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Using uv**
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
uv pip install -e .
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Quick Setup
|
|
80
|
+
|
|
81
|
+
After installation, codeMaster will be available via the `codemaster` command.
|
|
82
|
+
|
|
83
|
+
## Table of Contents
|
|
84
|
+
|
|
85
|
+
- [Features](#features)
|
|
86
|
+
- [Built-in Agents](#built-in-agents)
|
|
87
|
+
- [Subagents and Task Delegation](#subagents-and-task-delegation)
|
|
88
|
+
- [Interactive User Questions](#interactive-user-questions)
|
|
89
|
+
- [Terminal Requirements](#terminal-requirements)
|
|
90
|
+
- [Quick Start](#quick-start)
|
|
91
|
+
- [Usage](#usage)
|
|
92
|
+
- [Interactive Mode](#interactive-mode)
|
|
93
|
+
- [Trust Folder System](#trust-folder-system)
|
|
94
|
+
- [Programmatic Mode](#programmatic-mode)
|
|
95
|
+
- [Slash Commands](#slash-commands)
|
|
96
|
+
- [Built-in Slash Commands](#built-in-slash-commands)
|
|
97
|
+
- [Custom Slash Commands via Skills](#custom-slash-commands-via-skills)
|
|
98
|
+
- [Skills System](#skills-system)
|
|
99
|
+
- [Creating Skills](#creating-skills)
|
|
100
|
+
- [Skill Discovery](#skill-discovery)
|
|
101
|
+
- [Managing Skills](#managing-skills)
|
|
102
|
+
- [Configuration](#configuration)
|
|
103
|
+
- [Configuration File Location](#configuration-file-location)
|
|
104
|
+
- [API Key Configuration](#api-key-configuration)
|
|
105
|
+
- [Custom System Prompts](#custom-system-prompts)
|
|
106
|
+
- [Custom Agent Configurations](#custom-agent-configurations)
|
|
107
|
+
- [Tool Management](#tool-management)
|
|
108
|
+
- [MCP Server Configuration](#mcp-server-configuration)
|
|
109
|
+
- [Session Management](#session-management)
|
|
110
|
+
- [Update Settings](#update-settings)
|
|
111
|
+
- [Custom codeMaster Home Directory](#custom-codemaster-home-directory)
|
|
112
|
+
- [Editors/IDEs](#editorsides)
|
|
113
|
+
- [Resources](#resources)
|
|
114
|
+
- [Data collection & usage](#data-collection--usage)
|
|
115
|
+
- [License](#license)
|
|
116
|
+
|
|
117
|
+
## Features
|
|
118
|
+
|
|
119
|
+
- **Interactive Chat**: A conversational AI agent that understands your requests and breaks down complex tasks.
|
|
120
|
+
- **Local & Cloud LLM Support**: Works with Ollama (local models) and cloud APIs (Mistral, OpenAI, etc.)
|
|
121
|
+
- **Powerful Toolset**: A suite of tools for file manipulation, code searching, version control, and command execution, right from the chat prompt.
|
|
122
|
+
- Read, write, and patch files (`read_file`, `write_file`, `search_replace`).
|
|
123
|
+
- Execute shell commands in a stateful terminal (`bash`).
|
|
124
|
+
- Recursively search code with `grep` (with `ripgrep` support).
|
|
125
|
+
- Manage a `todo` list to track the agent's work.
|
|
126
|
+
- Ask interactive questions to gather user input (`ask_user_question`).
|
|
127
|
+
- Delegate tasks to subagents for parallel work (`task`).
|
|
128
|
+
- **Project-Aware Context**: codeMaster automatically scans your project's file structure and Git status to provide relevant context to the agent, improving its understanding of your codebase.
|
|
129
|
+
- **Advanced CLI Experience**: Built with modern libraries for a smooth and efficient workflow.
|
|
130
|
+
- Autocompletion for slash commands (`/`) and file paths (`@`).
|
|
131
|
+
- Persistent command history.
|
|
132
|
+
- Beautiful Themes.
|
|
133
|
+
- **Highly Configurable**: Customize models, providers, tool permissions, and UI preferences through a simple `config.toml` file.
|
|
134
|
+
- **Safety First**: Features tool execution approval.
|
|
135
|
+
- **Multiple Built-in Agents**: Choose from different agent profiles tailored for specific workflows.
|
|
136
|
+
|
|
137
|
+
### Built-in Agents
|
|
138
|
+
|
|
139
|
+
codeMaster comes with several built-in agent profiles, each designed for different use cases:
|
|
140
|
+
|
|
141
|
+
- **`default`**: Standard agent that requires approval for tool executions. Best for general use.
|
|
142
|
+
- **`plan`**: Read-only agent for exploration and planning. Auto-approves safe tools like `grep` and `read_file`.
|
|
143
|
+
- **`accept-edits`**: Auto-approves file edits only (`write_file`, `search_replace`). Useful for code refactoring.
|
|
144
|
+
- **`auto-approve`**: Auto-approves all tool executions. Use with caution.
|
|
145
|
+
|
|
146
|
+
Use the `--agent` flag to select a different agent:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
codemaster --agent plan
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Subagents and Task Delegation
|
|
153
|
+
|
|
154
|
+
codeMaster supports subagents for delegating tasks. Subagents run independently and can perform specialized work without user interaction, preventing the context from being overloaded.
|
|
155
|
+
|
|
156
|
+
The `task` tool allows the agent to delegate work to subagents:
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
> Can you explore the codebase structure while I work on something else?
|
|
160
|
+
|
|
161
|
+
🤖 I'll use the task tool to delegate this to the explore subagent.
|
|
162
|
+
|
|
163
|
+
> task(task="Analyze the project structure and architecture", agent="explore")
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Create custom subagents by adding `agent_type = "subagent"` to your agent configuration. codeMaster comes with a built-in subagent called `explore`, a read-only subagent for codebase exploration used internally for delegation.
|
|
167
|
+
|
|
168
|
+
### Interactive User Questions
|
|
169
|
+
|
|
170
|
+
The `ask_user_question` tool allows the agent to ask you clarifying questions during its work. This enables more interactive and collaborative workflows.
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
> Can you help me refactor this function?
|
|
174
|
+
|
|
175
|
+
🤖 I need to understand your requirements better before proceeding.
|
|
176
|
+
|
|
177
|
+
> ask_user_question(questions=[{
|
|
178
|
+
"question": "What's the main goal of this refactoring?",
|
|
179
|
+
"options": [
|
|
180
|
+
{"label": "Performance", "description": "Make it run faster"},
|
|
181
|
+
{"label": "Readability", "description": "Make it easier to understand"},
|
|
182
|
+
{"label": "Maintainability", "description": "Make it easier to modify"}
|
|
183
|
+
]
|
|
184
|
+
}])
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The agent can ask multiple questions at once, displayed as tabs. Each question supports 2-4 options plus an automatic "Other" option for free text responses.
|
|
188
|
+
|
|
189
|
+
## Terminal Requirements
|
|
190
|
+
|
|
191
|
+
codeMaster's interactive interface requires a modern terminal emulator. Recommended terminal emulators include:
|
|
192
|
+
|
|
193
|
+
- **WezTerm** (cross-platform)
|
|
194
|
+
- **Alacritty** (cross-platform)
|
|
195
|
+
- **Ghostty** (Linux and macOS)
|
|
196
|
+
- **Kitty** (Linux and macOS)
|
|
197
|
+
|
|
198
|
+
Most modern terminals should work, but older or minimal terminal emulators may have display issues.
|
|
199
|
+
|
|
200
|
+
## Quick Start
|
|
201
|
+
|
|
202
|
+
1. Navigate to your project's root directory:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
cd /path/to/your/project
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
2. Run codeMaster:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
codemaster
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
3. If this is your first time running codeMaster, it will:
|
|
215
|
+
|
|
216
|
+
- Create a default configuration file at `~/.codemaster/config.toml`
|
|
217
|
+
- Prompt you to configure your LLM provider (Ollama local or cloud API)
|
|
218
|
+
- Save your configuration for future use
|
|
219
|
+
|
|
220
|
+
Alternatively, you can configure your setup using `codemaster --setup`.
|
|
221
|
+
|
|
222
|
+
4. Start interacting with the agent!
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
> Can you find all instances of the word "TODO" in the project?
|
|
226
|
+
|
|
227
|
+
🤖 The user wants to find all instances of "TODO". The `grep` tool is perfect for this. I will use it to search the current directory.
|
|
228
|
+
|
|
229
|
+
> grep(pattern="TODO", path=".")
|
|
230
|
+
|
|
231
|
+
... (grep tool output) ...
|
|
232
|
+
|
|
233
|
+
🤖 I found the following "TODO" comments in your project.
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Usage
|
|
237
|
+
|
|
238
|
+
### Interactive Mode
|
|
239
|
+
|
|
240
|
+
Simply run `codemaster` to enter the interactive chat loop.
|
|
241
|
+
|
|
242
|
+
- **Multi-line Input**: Press `Ctrl+J` or `Shift+Enter` for select terminals to insert a newline.
|
|
243
|
+
- **File Paths**: Reference files in your prompt using the `@` symbol for smart autocompletion (e.g., `> Read the file @src/agent.py`).
|
|
244
|
+
- **Shell Commands**: Prefix any command with `!` to execute it directly in your shell, bypassing the agent (e.g., `> !ls -l`).
|
|
245
|
+
- **External Editor**: Press `Ctrl+G` to edit your current input in an external editor.
|
|
246
|
+
- **Tool Output Toggle**: Press `Ctrl+O` to toggle the tool output view.
|
|
247
|
+
- **Todo View Toggle**: Press `Ctrl+T` to toggle the todo list view.
|
|
248
|
+
- **Auto-Approve Toggle**: Press `Shift+Tab` to toggle auto-approve mode on/off.
|
|
249
|
+
|
|
250
|
+
You can start codeMaster with a prompt using the following command:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
codemaster "Refactor the main function in cli/main.py to be more modular."
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Note**: The `--auto-approve` flag automatically approves all tool executions without prompting. In interactive mode, you can also toggle auto-approve on/off using `Shift+Tab`.
|
|
257
|
+
|
|
258
|
+
### Trust Folder System
|
|
259
|
+
|
|
260
|
+
codeMaster includes a trust folder system to ensure you only run the agent in directories you trust. When you first run codeMaster in a new directory which contains a `.codemaster` subfolder, it may ask you to confirm whether you trust the folder.
|
|
261
|
+
|
|
262
|
+
Trusted folders are remembered for future sessions. You can manage trusted folders through its configuration file `~/.codemaster/trusted_folders.toml`.
|
|
263
|
+
|
|
264
|
+
This safety feature helps prevent accidental execution in sensitive directories.
|
|
265
|
+
|
|
266
|
+
### Programmatic Mode
|
|
267
|
+
|
|
268
|
+
You can run codeMaster non-interactively by piping input or using the `--prompt` flag. This is useful for scripting.
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
codemaster --prompt "Refactor the main function in cli/main.py to be more modular."
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
By default, it uses `auto-approve` mode.
|
|
275
|
+
|
|
276
|
+
#### Programmatic Mode Options
|
|
277
|
+
|
|
278
|
+
When using `--prompt`, you can specify additional options:
|
|
279
|
+
|
|
280
|
+
- **`--max-turns N`**: Limit the maximum number of assistant turns. The session will stop after N turns.
|
|
281
|
+
- **`--max-price DOLLARS`**: Set a maximum cost limit in dollars. The session will be interrupted if the cost exceeds this limit.
|
|
282
|
+
- **`--enabled-tools TOOL`**: Enable specific tools. In programmatic mode, this disables all other tools. Can be specified multiple times. Supports exact names, glob patterns (e.g., `bash*`), or regex with `re:` prefix (e.g., `re:^serena_.*$`).
|
|
283
|
+
- **`--output FORMAT`**: Set the output format. Options:
|
|
284
|
+
- `text` (default): Human-readable text output
|
|
285
|
+
- `json`: All messages as JSON at the end
|
|
286
|
+
- `streaming`: Newline-delimited JSON per message
|
|
287
|
+
|
|
288
|
+
Example:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
codemaster --prompt "Analyze the codebase" --max-turns 5 --max-price 1.0 --output json
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Slash Commands
|
|
295
|
+
|
|
296
|
+
Use slash commands for meta-actions and configuration changes during a session.
|
|
297
|
+
|
|
298
|
+
### Built-in Slash Commands
|
|
299
|
+
|
|
300
|
+
codeMaster provides several built-in slash commands. Use slash commands by typing them in the input box:
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
> /help
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Custom Slash Commands via Skills
|
|
307
|
+
|
|
308
|
+
You can define your own slash commands through the skills system. Skills are reusable components that extend codeMaster's functionality.
|
|
309
|
+
|
|
310
|
+
To create a custom slash command:
|
|
311
|
+
|
|
312
|
+
1. Create a skill directory with a `SKILL.md` file
|
|
313
|
+
2. Set `user-invocable = true` in the skill metadata
|
|
314
|
+
3. Define the command logic in your skill
|
|
315
|
+
|
|
316
|
+
Example skill metadata:
|
|
317
|
+
|
|
318
|
+
```markdown
|
|
319
|
+
---
|
|
320
|
+
name: my-skill
|
|
321
|
+
description: My custom skill with slash commands
|
|
322
|
+
user-invocable: true
|
|
323
|
+
---
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Custom slash commands appear in the autocompletion menu alongside built-in commands.
|
|
327
|
+
|
|
328
|
+
## Skills System
|
|
329
|
+
|
|
330
|
+
codeMaster's skills system allows you to extend functionality through reusable components. Skills can add new tools, slash commands, and specialized behaviors.
|
|
331
|
+
|
|
332
|
+
codeMaster follows the [Agent Skills specification](https://agentskills.io/specification) for skill format and structure.
|
|
333
|
+
|
|
334
|
+
### Creating Skills
|
|
335
|
+
|
|
336
|
+
Skills are defined in directories with a `SKILL.md` file containing metadata in YAML frontmatter. For example, `~/.codemaster/skills/code-review/SKILL.md`:
|
|
337
|
+
|
|
338
|
+
```markdown
|
|
339
|
+
---
|
|
340
|
+
name: code-review
|
|
341
|
+
description: Perform automated code reviews
|
|
342
|
+
license: MIT
|
|
343
|
+
compatibility: Python 3.12+
|
|
344
|
+
user-invocable: true
|
|
345
|
+
allowed-tools:
|
|
346
|
+
- read_file
|
|
347
|
+
- grep
|
|
348
|
+
- ask_user_question
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
# Code Review Skill
|
|
352
|
+
|
|
353
|
+
This skill helps analyze code quality and suggest improvements.
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Skill Discovery
|
|
357
|
+
|
|
358
|
+
codeMaster discovers skills from multiple locations:
|
|
359
|
+
|
|
360
|
+
1. **Custom paths**: Configured in `config.toml` via `skill_paths`
|
|
361
|
+
2. **Standard Agent Skills path** (project root, trusted folders only): `.agents/skills/` — [Agent Skills](https://agentskills.io) standard
|
|
362
|
+
3. **Local project skills** (project root, trusted folders only): `.codemaster/skills/` in your project
|
|
363
|
+
4. **Global skills directory**: `~/.codemaster/skills/`
|
|
364
|
+
|
|
365
|
+
```toml
|
|
366
|
+
skill_paths = ["/path/to/custom/skills"]
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Managing Skills
|
|
370
|
+
|
|
371
|
+
Enable or disable skills using patterns in your configuration:
|
|
372
|
+
|
|
373
|
+
```toml
|
|
374
|
+
# Enable specific skills
|
|
375
|
+
enabled_skills = ["code-review", "test-*"]
|
|
376
|
+
|
|
377
|
+
# Disable specific skills
|
|
378
|
+
disabled_skills = ["experimental-*"]
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Skills support the same pattern matching as tools (exact names, glob patterns, and regex).
|
|
382
|
+
|
|
383
|
+
## Configuration
|
|
384
|
+
|
|
385
|
+
### Configuration File Location
|
|
386
|
+
|
|
387
|
+
codeMaster is configured via a `config.toml` file. It looks for this file first in `./.codemaster/config.toml` and then falls back to `~/.codemaster/config.toml`.
|
|
388
|
+
|
|
389
|
+
### API Key Configuration
|
|
390
|
+
|
|
391
|
+
To use codeMaster, you'll need a Mistral API key. You can obtain one by signing up at [https://console.mistral.ai](https://console.mistral.ai).
|
|
392
|
+
|
|
393
|
+
You can configure your API key using `codemaster --setup`, or through one of the methods below.
|
|
394
|
+
|
|
395
|
+
codeMaster supports multiple ways to configure your API keys:
|
|
396
|
+
|
|
397
|
+
1. **Interactive Setup (Recommended for first-time users)**: When you run codeMaster for the first time or if your API key is missing, codeMaster will prompt you to enter it. The key will be securely saved to `~/.codemaster/.env` for future sessions.
|
|
398
|
+
|
|
399
|
+
2. **Environment Variables**: Set your API key as an environment variable:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
export MISTRAL_API_KEY="your_mistral_api_key"
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
3. **`.env` File**: Create a `.env` file in `~/.codemaster/` and add your API keys:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
MISTRAL_API_KEY=your_mistral_api_key
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
codeMaster automatically loads API keys from `~/.codemaster/.env` on startup. Environment variables take precedence over the `.env` file if both are set.
|
|
412
|
+
|
|
413
|
+
**Note**: The `.env` file is specifically for API keys and other provider credentials. General codeMaster configuration should be done in `config.toml`.
|
|
414
|
+
|
|
415
|
+
### Custom System Prompts
|
|
416
|
+
|
|
417
|
+
You can create custom system prompts to replace the default one (`prompts/cli.md`). Create a markdown file in the `~/.codemaster/prompts/` directory with your custom prompt content.
|
|
418
|
+
|
|
419
|
+
To use a custom system prompt, set the `system_prompt_id` in your configuration to match the filename (without the `.md` extension):
|
|
420
|
+
|
|
421
|
+
```toml
|
|
422
|
+
# Use a custom system prompt
|
|
423
|
+
system_prompt_id = "my_custom_prompt"
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
This will load the prompt from `~/.codemaster/prompts/my_custom_prompt.md`.
|
|
427
|
+
|
|
428
|
+
### Custom Agent Configurations
|
|
429
|
+
|
|
430
|
+
You can create custom agent configurations for specific use cases (e.g., red-teaming, specialized tasks) by adding agent-specific TOML files in the `~/.codemaster/agents/` directory.
|
|
431
|
+
|
|
432
|
+
To use a custom agent, run codeMaster with the `--agent` flag:
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
codemaster --agent my_custom_agent
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
codeMaster will look for a file named `my_custom_agent.toml` in the agents directory and apply its configuration.
|
|
439
|
+
|
|
440
|
+
Example custom agent configuration (`~/.codemaster/agents/redteam.toml`):
|
|
441
|
+
|
|
442
|
+
```toml
|
|
443
|
+
# Custom agent configuration for red-teaming
|
|
444
|
+
active_model = "devstral-2"
|
|
445
|
+
system_prompt_id = "redteam"
|
|
446
|
+
|
|
447
|
+
# Disable some tools for this agent
|
|
448
|
+
disabled_tools = ["search_replace", "write_file"]
|
|
449
|
+
|
|
450
|
+
# Override tool permissions for this agent
|
|
451
|
+
[tools.bash]
|
|
452
|
+
permission = "always"
|
|
453
|
+
|
|
454
|
+
[tools.read_file]
|
|
455
|
+
permission = "always"
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Note: This implies that you have set up a redteam prompt named `~/.codemaster/prompts/redteam.md`.
|
|
459
|
+
|
|
460
|
+
### Tool Management
|
|
461
|
+
|
|
462
|
+
#### Enable/Disable Tools with Patterns
|
|
463
|
+
|
|
464
|
+
You can control which tools are active using `enabled_tools` and `disabled_tools`.
|
|
465
|
+
These fields support exact names, glob patterns, and regular expressions.
|
|
466
|
+
|
|
467
|
+
Examples:
|
|
468
|
+
|
|
469
|
+
```toml
|
|
470
|
+
# Only enable tools that start with "serena_" (glob)
|
|
471
|
+
enabled_tools = ["serena_*"]
|
|
472
|
+
|
|
473
|
+
# Regex (prefix with re:) — matches full tool name (case-insensitive)
|
|
474
|
+
enabled_tools = ["re:^serena_.*$"]
|
|
475
|
+
|
|
476
|
+
# Disable a group with glob; everything else stays enabled
|
|
477
|
+
disabled_tools = ["mcp_*", "grep"]
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
Notes:
|
|
481
|
+
|
|
482
|
+
- MCP tool names use underscores, e.g., `serena_list` not `serena.list`.
|
|
483
|
+
- Regex patterns are matched against the full tool name using fullmatch.
|
|
484
|
+
|
|
485
|
+
### MCP Server Configuration
|
|
486
|
+
|
|
487
|
+
You can configure MCP (Model Context Protocol) servers to extend codeMaster's capabilities. Add MCP server configurations under the `mcp_servers` section:
|
|
488
|
+
|
|
489
|
+
```toml
|
|
490
|
+
# Example MCP server configurations
|
|
491
|
+
[[mcp_servers]]
|
|
492
|
+
name = "my_http_server"
|
|
493
|
+
transport = "http"
|
|
494
|
+
url = "http://localhost:8000"
|
|
495
|
+
headers = { "Authorization" = "Bearer my_token" }
|
|
496
|
+
api_key_env = "MY_API_KEY_ENV_VAR"
|
|
497
|
+
api_key_header = "Authorization"
|
|
498
|
+
api_key_format = "Bearer {token}"
|
|
499
|
+
|
|
500
|
+
[[mcp_servers]]
|
|
501
|
+
name = "my_streamable_server"
|
|
502
|
+
transport = "streamable-http"
|
|
503
|
+
url = "http://localhost:8001"
|
|
504
|
+
headers = { "X-API-Key" = "my_api_key" }
|
|
505
|
+
|
|
506
|
+
[[mcp_servers]]
|
|
507
|
+
name = "fetch_server"
|
|
508
|
+
transport = "stdio"
|
|
509
|
+
command = "uvx"
|
|
510
|
+
args = ["mcp-server-fetch"]
|
|
511
|
+
env = { "DEBUG" = "1", "LOG_LEVEL" = "info" }
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Supported transports:
|
|
515
|
+
|
|
516
|
+
- `http`: Standard HTTP transport
|
|
517
|
+
- `streamable-http`: HTTP transport with streaming support
|
|
518
|
+
- `stdio`: Standard input/output transport (for local processes)
|
|
519
|
+
|
|
520
|
+
Key fields:
|
|
521
|
+
|
|
522
|
+
- `name`: A short alias for the server (used in tool names)
|
|
523
|
+
- `transport`: The transport type
|
|
524
|
+
- `url`: Base URL for HTTP transports
|
|
525
|
+
- `headers`: Additional HTTP headers
|
|
526
|
+
- `api_key_env`: Environment variable containing the API key
|
|
527
|
+
- `command`: Command to run for stdio transport
|
|
528
|
+
- `args`: Additional arguments for stdio transport
|
|
529
|
+
- `startup_timeout_sec`: Timeout in seconds for the server to start and initialize (default 10s)
|
|
530
|
+
- `tool_timeout_sec`: Timeout in seconds for tool execution (default 60s)
|
|
531
|
+
- `env`: Environment variables to set for the MCP server of transport type stdio
|
|
532
|
+
|
|
533
|
+
MCP tools are named using the pattern `{server_name}_{tool_name}` and can be configured with permissions like built-in tools:
|
|
534
|
+
|
|
535
|
+
```toml
|
|
536
|
+
# Configure permissions for specific MCP tools
|
|
537
|
+
[tools.fetch_server_get]
|
|
538
|
+
permission = "always"
|
|
539
|
+
|
|
540
|
+
[tools.my_http_server_query]
|
|
541
|
+
permission = "ask"
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
MCP server configurations support additional features:
|
|
545
|
+
|
|
546
|
+
- **Environment variables**: Set environment variables for MCP servers
|
|
547
|
+
- **Custom timeouts**: Configure startup and tool execution timeouts
|
|
548
|
+
|
|
549
|
+
Example with environment variables and timeouts:
|
|
550
|
+
|
|
551
|
+
```toml
|
|
552
|
+
[[mcp_servers]]
|
|
553
|
+
name = "my_server"
|
|
554
|
+
transport = "http"
|
|
555
|
+
url = "http://localhost:8000"
|
|
556
|
+
env = { "DEBUG" = "1", "LOG_LEVEL" = "info" }
|
|
557
|
+
startup_timeout_sec = 15
|
|
558
|
+
tool_timeout_sec = 120
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### Session Management
|
|
562
|
+
|
|
563
|
+
#### Session Continuation and Resumption
|
|
564
|
+
|
|
565
|
+
codeMaster supports continuing from previous sessions:
|
|
566
|
+
|
|
567
|
+
- **`--continue`** or **`-c`**: Continue from the most recent saved session
|
|
568
|
+
- **`--resume SESSION_ID`**: Resume a specific session by ID (supports partial matching)
|
|
569
|
+
|
|
570
|
+
```bash
|
|
571
|
+
# Continue from last session
|
|
572
|
+
codemaster --continue
|
|
573
|
+
|
|
574
|
+
# Resume specific session
|
|
575
|
+
codemaster --resume abc123
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
Session logging must be enabled in your configuration for these features to work.
|
|
579
|
+
|
|
580
|
+
#### Working Directory Control
|
|
581
|
+
|
|
582
|
+
Use the `--workdir` option to specify a working directory:
|
|
583
|
+
|
|
584
|
+
```bash
|
|
585
|
+
codemaster --workdir /path/to/project
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
This is useful when you want to run codeMaster from a different location than your current directory.
|
|
589
|
+
|
|
590
|
+
### Update Settings
|
|
591
|
+
|
|
592
|
+
#### Auto-Update
|
|
593
|
+
|
|
594
|
+
codeMaster includes an automatic update feature that keeps your installation current. This is enabled by default.
|
|
595
|
+
|
|
596
|
+
To disable auto-updates, add this to your `config.toml`:
|
|
597
|
+
|
|
598
|
+
```toml
|
|
599
|
+
enable_auto_update = false
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### Custom codeMaster Home Directory
|
|
603
|
+
|
|
604
|
+
By default, codeMaster stores its configuration in `~/.codemaster/`. You can override this by setting the `VIBE_HOME` environment variable:
|
|
605
|
+
|
|
606
|
+
```bash
|
|
607
|
+
export VIBE_HOME="/path/to/custom/codemaster/home"
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
This affects where codeMaster looks for:
|
|
611
|
+
|
|
612
|
+
- `config.toml` - Main configuration
|
|
613
|
+
- `.env` - API keys
|
|
614
|
+
- `agents/` - Custom agent configurations
|
|
615
|
+
- `prompts/` - Custom system prompts
|
|
616
|
+
- `tools/` - Custom tools
|
|
617
|
+
- `logs/` - Session logs
|
|
618
|
+
|
|
619
|
+
## Editors/IDEs
|
|
620
|
+
|
|
621
|
+
codeMaster can be used in text editors and IDEs that support [Agent Client Protocol](https://agentclientprotocol.com/overview/clients). See the [ACP Setup documentation](docs/acp-setup.md) for setup instructions for various editors and IDEs.
|
|
622
|
+
|
|
623
|
+
## Resources
|
|
624
|
+
|
|
625
|
+
- [CHANGELOG](CHANGELOG.md) - See what's new in each version
|
|
626
|
+
- [CONTRIBUTING](CONTRIBUTING.md) - Guidelines for feature requests, feedback and bug reports
|
|
627
|
+
|
|
628
|
+
## Data collection & usage
|
|
629
|
+
|
|
630
|
+
Use of codeMaster is subject to our [Privacy Policy](https://legal.mistral.ai/terms/privacy-policy) and may include the collection and processing of data related to your use of the service, such as usage data, to operate, maintain, and improve codeMaster. You can disable telemetry in your `config.toml` by setting `enable_telemetry = false`.
|
|
631
|
+
|
|
632
|
+
## License
|
|
633
|
+
|
|
634
|
+
Copyright 2025 codeMaster AI
|
|
635
|
+
|
|
636
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
637
|
+
you may not use this file except in compliance with the License.
|
|
638
|
+
You may obtain a copy of the License at
|
|
639
|
+
|
|
640
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
641
|
+
|
|
642
|
+
Unless required by applicable law or agreed to in writing, software
|
|
643
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
644
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
645
|
+
See the [LICENSE](LICENSE) file for the full license text.
|