@emend-ai/utim 1.46.36 → 1.46.39

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 (3) hide show
  1. package/README.md +155 -149
  2. package/bin/utim.js +14 -5
  3. package/package.json +44 -44
package/README.md CHANGED
@@ -1,136 +1,143 @@
1
- # UTIM CLI Agent: Enterprise Coder Assistant
2
-
3
- UTIM is an agentic developer CLI assistant designed to automate coding tasks directly inside your local terminal, featuring robust safety controls, self-healing quality gates, and local-first semantic memory.
4
-
5
- ---
6
-
7
- ## šŸš€ Quick Start
8
-
9
- ### 1. Installation
10
- Install the package from your local source directory:
11
-
12
- ```bash
13
- # Basic installation
14
- pip install .
15
-
16
- # Recommended: Full installation (includes semantic vector RAG & web search)
17
- pip install ".[full]"
18
- ```
19
-
20
- ### 2. Provider & Model Configuration
21
- Start the chat session:
22
- ```bash
23
- utim
24
- ```
25
- On first run, UTIM checks for `.utim/config.json`. If it does not exist, it runs a provider and model configuration wizard. You can configure:
26
- - **Default Providers**: OpenRouter, OpenAI, custom servers, etc.
27
- - **Model Picker**: Press `Ctrl+M` in the chat terminal at any time to configure, pick, add, or delete LLMs.
28
-
29
- ---
30
-
31
- ## ⚔ Main CLI Commands
32
-
33
- - **`utim`**: Starts the interactive chat terminal (TUI).
34
- - **`utim task "<prompt>"`**: Executes a single task autonomously from the command line and exits. In an interactive terminal (`stdin` is a TTY) file writes and commands prompt for confirmation; when piped/scripted they run in auto-accept mode.
35
- - **`utim --dry-run`**: Starts the session in **Dry-Run Mode** (all code modifications and shell commands are simulated, not written/executed).
36
- - **`utim --sandbox`**: Runs all mutating shell command proposals in the intelligent local sandbox (untrusted commands will block until approved).
37
- - **`utim doctor`** / **`utim init`** / **`utim reset`**: Administrative commands for state diagnosis, initialization, and factory resets.
38
-
39
- ---
40
-
41
- ## šŸ› ļø In-Chat Slash Commands
42
-
43
- Inside the interactive chat terminal, type these slash commands for direct workspace control:
44
-
45
- - **`/undo`**: Reverts the last assistant action, restoring files to their exact "before" state and rolling back messages.
46
- - **`/redo`**: Re-applies the last undone turn, re-writing files and restoring conversation logs.
47
- - **`/rewind <turn_index>`**: Rolls back the entire session to a specific conversation turn.
48
- - **`/doctor`**: Run diagnostics on environment variables, Python version, dependencies, API model connections, and MCP server status.
49
- - **`/report`**: Generates a support bundle under `.utim_tmp/report_bundle.zip` (automatically redacts secrets, passwords, or personal names/files).
50
- - **`/reset`**: Wipes the current chat history without deleting persistent local vector memory.
51
-
52
- ---
53
-
54
- ## 🧠 Architecture & How it Works
55
-
56
- 1. **Local Memory (`.utim/memory.json` & ChromaDB)**:
57
- - Global user preferences, rules, and facts are synced to a semantic vector database (`.utim_tmp/vector_db`).
58
- - Relevant memories are dynamically fetched via semantic similarity (RAG) and injected into the system prompt context, preventing prompt bloating.
59
- 2. **Undo/Redo Stack & Session State**:
60
- - Every file change (writes, batch string edits, moves, deletions) computes a diff snapshot.
61
- - The entire stack is serialized dynamically to `.utim/session_state.json`. You can close your shell, shut down your computer, and resume later with intact rollback features.
62
- 3. **Workspace Boundary & Safety Controls**:
63
- - Prior to writing files, UTIM performs **Pre-Commit Syntax Checks** (AST compilation for Python, JSON loads, JS/TS checks).
64
- - If tests are available (`pytest`, `npm test`, etc.), UTIM runs them in a background **Regression testing loop**, prompting the model to self-heal code errors if assertions fail.
65
- - **Interactive TUI mode** (`utim`): every file mutation shows an interactive diff dialog; the developer accepts, edits, or rejects individual hunks before they are applied.
66
- - **CLI task mode** (`utim task`): when running in a real terminal, destructive operations (`rm`, package installs, `>` redirects) prompt for `y/n` confirmation. When stdin is piped/non-interactive all edits are auto-accepted.
67
- - **Sandbox mode** (`utim --sandbox`): classifies every terminal command as safe or risky and blocks risky commands until explicitly approved.
68
-
69
- ---
70
-
71
- ## āš ļø What this Tool Can and Cannot Do
72
-
73
- ### Can Do:
74
- - Read, write, and patch codebases safely.
75
- - Install and coordinate custom MCP (Model Context Protocol) servers.
76
- - Self-heal syntax and test errors before files are written.
77
- - Revert any file modification instantly.
78
-
79
- ### Cannot Do:
80
- - **No Remote Code Execution**: Runs locally on your machine.
81
- - **Unverified Sensitive Reads Blocked**: Reading files or memory matching sensitive keys (like passwords, secret codes, or personal data) is blocked unless verified via your configured verification code.
82
- - **No Auto-Deletions**: Any command that deletes files outside the working directory is blocked automatically.
83
-
84
- ---
85
-
86
- ## šŸ“‹ Compatibility Matrix
87
-
88
- | Component | Minimum Version | Recommended Version | Notes |
89
- |-----------|-----------------|---------------------|-------|
90
- | **Python** | 3.10 | 3.11+ | 3.10 required for asyncio features |
91
- | **pip** | 21.0 | 23.0+ | For modern dependency resolution |
92
- | **Node.js** | 18.0 | 20.0+ | Only if using MCP servers |
93
- | **Operating System** | | | |
94
- | - Windows | 10 (1903+) | 11 | PowerShell or CMD required |
95
- | - macOS | 11 (Big Sur) | 14 (Sonoma) | Terminal.app or iTerm2 |
96
- | - Linux | Ubuntu 20.04 | Ubuntu 22.04+ | Any modern distro with bash |
97
- | **Terminals** | | | |
98
- | - Windows Terminal | 1.0 | 1.19+ | Full color support |
99
- | - iTerm2 | 3.4+ | 3.5+ | Recommended on macOS |
100
- | - VS Code Terminal | 1.70+ | 1.85+ | Full support |
101
- | **Required Tools** | | | |
102
- | - git | 2.30 | 2.40+ | For undo/redo and diffs |
103
- | - Docker | 20.10 | 24.0+ | Optional, for sandbox mode |
104
-
105
- ### Supported LLM Providers
106
-
107
- | Provider | API Type | Models Supported |
108
- |----------|----------|------------------|
109
- | OpenRouter | REST | Claude, GPT, Gemini, Mistral, etc. |
110
- | OpenAI | REST | GPT-4o, GPT-4 Turbo, GPT-3.5 |
111
- | Anthropic | REST | Claude 3.5, 3, 2 |
112
- | Google AI | REST | Gemini 1.5 Pro/Flash |
113
- | Azure OpenAI | REST | GPT-4, GPT-3.5 |
114
- | Ollama | Local | Llama 3, Mistral, CodeLlama |
115
- | Custom Server | REST | Any OpenAI-compatible API |
116
-
117
- ---
118
-
119
- ## šŸ“„ Related Documentation
120
-
121
- - [šŸ“– Full Documentation](https://utim.dev/docs)
122
- - [šŸ”’ Security Policy](SECURITY.md) — vulnerability reporting, security@utim.dev
123
- - [šŸ—„ļø Data Handling Reference](DATA_HANDLING.md) — what stays local, what goes to backend, what goes to model providers
124
- - [šŸ“Š SLA & Support](SLA.md)
125
- - [šŸ›”ļø Privacy Policy](landing/src/docs_md/privacy.md)
126
-
127
- ## šŸ“¦ Installation Methods
128
-
129
- ### npm (recommended — works without Python pre-installed)
130
- ```bash
131
- npm install -g @emend-ai/utim
132
- ```
133
-
1
+ # UTIM CLI Agent: Enterprise Coder Assistant
2
+
3
+ UTIM is an agentic developer CLI assistant designed to automate coding tasks directly inside your local terminal, featuring robust safety controls, self-healing quality gates, and local-first semantic memory.
4
+
5
+ ---
6
+
7
+ ## šŸš€ Quick Start
8
+
9
+ ### 1. Installation
10
+
11
+ **Recommended: Automated Installer (UNIX / macOS / Android Termux)**
12
+ Use the automated installation script, which detects your environment (such as Termux) and automatically installs build dependencies (like `rust`, `clang`, and `binutils`) and configures correct API levels:
13
+
14
+ ```bash
15
+ curl -sL https://raw.githubusercontent.com/emendai/utim/main/install.sh | bash
16
+ ```
17
+
18
+ **Alternative: Local Installation (from source)**
19
+ ```bash
20
+ # Basic installation
21
+ pip install .
22
+
23
+ # Recommended: Full installation (includes semantic vector RAG & web search)
24
+ pip install ".[full]"
25
+ ```
26
+
27
+ ### 2. Provider & Model Configuration
28
+ Start the chat session:
29
+ ```bash
30
+ utim
31
+ ```
32
+ On first run, UTIM checks for `.utim/config.json`. If it does not exist, it runs a provider and model configuration wizard. You can configure:
33
+ - **Default Providers**: OpenRouter, OpenAI, custom servers, etc.
34
+ - **Model Picker**: Press `Ctrl+M` in the chat terminal at any time to configure, pick, add, or delete LLMs.
35
+
36
+ ---
37
+
38
+ ## ⚔ Main CLI Commands
39
+
40
+ - **`utim`**: Starts the interactive chat terminal (TUI).
41
+ - **`utim task "<prompt>"`**: Executes a single task autonomously from the command line and exits. In an interactive terminal (`stdin` is a TTY) file writes and commands prompt for confirmation; when piped/scripted they run in auto-accept mode.
42
+ - **`utim --dry-run`**: Starts the session in **Dry-Run Mode** (all code modifications and shell commands are simulated, not written/executed).
43
+ - **`utim --sandbox`**: Runs all mutating shell command proposals in the intelligent local sandbox (untrusted commands will block until approved).
44
+ - **`utim doctor`** / **`utim init`** / **`utim reset`**: Administrative commands for state diagnosis, initialization, and factory resets.
45
+
46
+ ---
47
+
48
+ ## šŸ› ļø In-Chat Slash Commands
49
+
50
+ Inside the interactive chat terminal, type these slash commands for direct workspace control:
51
+
52
+ - **`/undo`**: Reverts the last assistant action, restoring files to their exact "before" state and rolling back messages.
53
+ - **`/redo`**: Re-applies the last undone turn, re-writing files and restoring conversation logs.
54
+ - **`/rewind <turn_index>`**: Rolls back the entire session to a specific conversation turn.
55
+ - **`/doctor`**: Run diagnostics on environment variables, Python version, dependencies, API model connections, and MCP server status.
56
+ - **`/report`**: Generates a support bundle under `.utim_tmp/report_bundle.zip` (automatically redacts secrets, passwords, or personal names/files).
57
+ - **`/reset`**: Wipes the current chat history without deleting persistent local vector memory.
58
+
59
+ ---
60
+
61
+ ## 🧠 Architecture & How it Works
62
+
63
+ 1. **Local Memory (`.utim/memory.json` & ChromaDB)**:
64
+ - Global user preferences, rules, and facts are synced to a semantic vector database (`.utim_tmp/vector_db`).
65
+ - Relevant memories are dynamically fetched via semantic similarity (RAG) and injected into the system prompt context, preventing prompt bloating.
66
+ 2. **Undo/Redo Stack & Session State**:
67
+ - Every file change (writes, batch string edits, moves, deletions) computes a diff snapshot.
68
+ - The entire stack is serialized dynamically to `.utim/session_state.json`. You can close your shell, shut down your computer, and resume later with intact rollback features.
69
+ 3. **Workspace Boundary & Safety Controls**:
70
+ - Prior to writing files, UTIM performs **Pre-Commit Syntax Checks** (AST compilation for Python, JSON loads, JS/TS checks).
71
+ - If tests are available (`pytest`, `npm test`, etc.), UTIM runs them in a background **Regression testing loop**, prompting the model to self-heal code errors if assertions fail.
72
+ - **Interactive TUI mode** (`utim`): every file mutation shows an interactive diff dialog; the developer accepts, edits, or rejects individual hunks before they are applied.
73
+ - **CLI task mode** (`utim task`): when running in a real terminal, destructive operations (`rm`, package installs, `>` redirects) prompt for `y/n` confirmation. When stdin is piped/non-interactive all edits are auto-accepted.
74
+ - **Sandbox mode** (`utim --sandbox`): classifies every terminal command as safe or risky and blocks risky commands until explicitly approved.
75
+
76
+ ---
77
+
78
+ ## āš ļø What this Tool Can and Cannot Do
79
+
80
+ ### Can Do:
81
+ - Read, write, and patch codebases safely.
82
+ - Install and coordinate custom MCP (Model Context Protocol) servers.
83
+ - Self-heal syntax and test errors before files are written.
84
+ - Revert any file modification instantly.
85
+
86
+ ### Cannot Do:
87
+ - **No Remote Code Execution**: Runs locally on your machine.
88
+ - **Unverified Sensitive Reads Blocked**: Reading files or memory matching sensitive keys (like passwords, secret codes, or personal data) is blocked unless verified via your configured verification code.
89
+ - **No Auto-Deletions**: Any command that deletes files outside the working directory is blocked automatically.
90
+
91
+ ---
92
+
93
+ ## šŸ“‹ Compatibility Matrix
94
+
95
+ | Component | Minimum Version | Recommended Version | Notes |
96
+ |-----------|-----------------|---------------------|-------|
97
+ | **Python** | 3.10 | 3.11+ | 3.10 required for asyncio features |
98
+ | **pip** | 21.0 | 23.0+ | For modern dependency resolution |
99
+ | **Node.js** | 18.0 | 20.0+ | Only if using MCP servers |
100
+ | **Operating System** | | | |
101
+ | - Windows | 10 (1903+) | 11 | PowerShell or CMD required |
102
+ | - macOS | 11 (Big Sur) | 14 (Sonoma) | Terminal.app or iTerm2 |
103
+ | - Linux | Ubuntu 20.04 | Ubuntu 22.04+ | Any modern distro with bash |
104
+ | **Terminals** | | | |
105
+ | - Windows Terminal | 1.0 | 1.19+ | Full color support |
106
+ | - iTerm2 | 3.4+ | 3.5+ | Recommended on macOS |
107
+ | - VS Code Terminal | 1.70+ | 1.85+ | Full support |
108
+ | **Required Tools** | | | |
109
+ | - git | 2.30 | 2.40+ | For undo/redo and diffs |
110
+ | - Docker | 20.10 | 24.0+ | Optional, for sandbox mode |
111
+
112
+ ### Supported LLM Providers
113
+
114
+ | Provider | API Type | Models Supported |
115
+ |----------|----------|------------------|
116
+ | OpenRouter | REST | Claude, GPT, Gemini, Mistral, etc. |
117
+ | OpenAI | REST | GPT-4o, GPT-4 Turbo, GPT-3.5 |
118
+ | Anthropic | REST | Claude 3.5, 3, 2 |
119
+ | Google AI | REST | Gemini 1.5 Pro/Flash |
120
+ | Azure OpenAI | REST | GPT-4, GPT-3.5 |
121
+ | Ollama | Local | Llama 3, Mistral, CodeLlama |
122
+ | Custom Server | REST | Any OpenAI-compatible API |
123
+
124
+ ---
125
+
126
+ ## šŸ“„ Related Documentation
127
+
128
+ - [šŸ“– Full Documentation](https://utim.dev/docs)
129
+ - [šŸ”’ Security Policy](SECURITY.md) — vulnerability reporting, security@utim.dev
130
+ - [šŸ—„ļø Data Handling Reference](DATA_HANDLING.md) — what stays local, what goes to backend, what goes to model providers
131
+ - [šŸ“Š SLA & Support](SLA.md)
132
+ - [šŸ›”ļø Privacy Policy](landing/src/docs_md/privacy.md)
133
+
134
+ ## šŸ“¦ Installation Methods
135
+
136
+ ### npm (recommended — works without Python pre-installed)
137
+ ```bash
138
+ npm install -g @emend-ai/utim
139
+ ```
140
+
134
141
  ### pip (from PyPI)
135
142
  ```bash
136
143
  pip install utim-cli
@@ -149,19 +156,18 @@ server.
149
156
  git clone https://github.com/emendai/utim.git
150
157
  cd utim
151
158
  pip install -e ".[full]"
152
- ```
153
-
154
- ### Smoke-test your install
155
- ```bash
156
- utim --version # Should print the current version
157
- utim doctor # Runs diagnostics — all checks should pass
158
- ```
159
-
160
- See [INSTALLATION_VERIFICATION.md](INSTALLATION_VERIFICATION.md) for detailed verification steps and troubleshooting.
161
-
162
- ## šŸ”¢ Version
163
-
164
- UTIM uses a single canonical version defined in [`utim_cli/_version.py`](utim_cli/_version.py).
165
- Run `python scripts/sync_version.py` to propagate a version bump to all surfaces
166
- (`package.json`, `pyproject.toml`, `CHANGELOG.md`) before releasing.
167
-
159
+ ```
160
+
161
+ ### Smoke-test your install
162
+ ```bash
163
+ utim --version # Should print the current version
164
+ utim doctor # Runs diagnostics — all checks should pass
165
+ ```
166
+
167
+ See [INSTALLATION_VERIFICATION.md](INSTALLATION_VERIFICATION.md) for detailed verification steps and troubleshooting.
168
+
169
+ ## šŸ”¢ Version
170
+
171
+ UTIM uses a single canonical version defined in [`utim_cli/_version.py`](utim_cli/_version.py).
172
+ Run `python scripts/sync_version.py` to propagate a version bump to all surfaces
173
+ (`package.json`, `pyproject.toml`, `CHANGELOG.md`) before releasing.
package/bin/utim.js CHANGED
@@ -157,9 +157,18 @@ function installEngine(python) {
157
157
  '\nšŸ’” Termux detected. Preparing Android-compatible dependencies...\n\n'
158
158
  );
159
159
 
160
- // Step 1: Install python-cryptography via pkg to avoid heavy cryptography C/Rust compilation
161
- process.stderr.write('āš™ Installing python-cryptography via Termux package manager...\n\n');
162
- spawnSync('pkg', ['install', '-y', 'python-cryptography'], {
160
+ // Auto-configure ANDROID_API_LEVEL environment variable to prevent compiler build failures
161
+ try {
162
+ const res = spawnSync('getprop', ['ro.build.version.sdk'], { encoding: 'utf8' });
163
+ if (res.status === 0 && res.stdout.trim()) {
164
+ process.env.ANDROID_API_LEVEL = res.stdout.trim();
165
+ process.stderr.write(`āš™ Setting ANDROID_API_LEVEL=${process.env.ANDROID_API_LEVEL} for builds...\n\n`);
166
+ }
167
+ } catch (_) {}
168
+
169
+ // Step 1: Install python-cryptography and build tools via pkg to support compilation of optional dependencies (chromadb, tree-sitter, scrapy, etc.)
170
+ process.stderr.write('āš™ Installing python-cryptography and build dependencies via Termux package manager...\n\n');
171
+ spawnSync('pkg', ['install', '-y', 'python-cryptography', 'clang', 'make', 'rust', 'libffi', 'openssl', 'libxml2', 'libxslt', 'libcrypt'], {
163
172
  stdio: 'inherit',
164
173
  shell: false,
165
174
  });
@@ -211,10 +220,10 @@ try:
211
220
  print("[+] Successfully installed pydantic-core and matching pydantic!")
212
221
  else:
213
222
  print("[-] No matching wheel found for", py_tag, plat)
214
- sys.exit(1)
223
+ print("[*] Proceeding with standard source compilation...")
215
224
  except Exception as e:
216
225
  print("[-] Failed to download/install pydantic-core wheel:", e)
217
- sys.exit(1)
226
+ print("[*] Proceeding with standard source compilation...")
218
227
  `;
219
228
  spawnSync(
220
229
  python,
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
- {
2
- "name": "@emend-ai/utim",
3
- "version": "1.46.36",
4
- "description": "UTIM \u2013 Universal Terminal Intelligence Manager. An agentic AI coding assistant for your terminal.",
5
- "keywords": [
6
- "ai",
7
- "agent",
8
- "cli",
9
- "coding-assistant",
10
- "agentic",
11
- "llm",
12
- "mcp",
13
- "utim"
14
- ],
15
- "homepage": "https://utim.dev",
16
- "bugs": {
17
- "url": "https://github.com/emendai/utim/issues"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/emendai/utim.git"
22
- },
23
- "license": "MIT",
24
- "author": "Emendai <support@emendai.com>",
25
- "bin": {
26
- "utim": "bin/utim.js"
27
- },
28
- "scripts": {
29
- "postinstall": "node scripts/postinstall.js"
30
- },
31
- "files": [
32
- "bin/utim.js",
33
- "scripts/postinstall.js",
34
- "README.md",
35
- "LICENSE"
36
- ],
37
- "engines": {
38
- "node": ">=16.0.0"
39
- },
40
- "publishConfig": {
41
- "access": "public",
42
- "registry": "https://registry.npmjs.org/"
43
- }
44
- }
1
+ {
2
+ "name": "@emend-ai/utim",
3
+ "version": "1.46.39",
4
+ "description": "UTIM – Universal Terminal Intelligence Manager. An agentic AI coding assistant for your terminal.",
5
+ "keywords": [
6
+ "ai",
7
+ "agent",
8
+ "cli",
9
+ "coding-assistant",
10
+ "agentic",
11
+ "llm",
12
+ "mcp",
13
+ "utim"
14
+ ],
15
+ "homepage": "https://utim.dev",
16
+ "bugs": {
17
+ "url": "https://github.com/emendai/utim/issues"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/emendai/utim.git"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Emendai <support@emendai.com>",
25
+ "bin": {
26
+ "utim": "bin/utim.js"
27
+ },
28
+ "scripts": {
29
+ "postinstall": "node scripts/postinstall.js"
30
+ },
31
+ "files": [
32
+ "bin/utim.js",
33
+ "scripts/postinstall.js",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "engines": {
38
+ "node": ">=16.0.0"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "registry": "https://registry.npmjs.org/"
43
+ }
44
+ }