miii-agent 0.1.0

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 +113 -0
  2. package/dist/cli.js +1860 -0
  3. package/package.json +51 -0
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # miii
2
+
3
+ The local-first AI coding agent for engineers who hate latency.
4
+
5
+ miii transforms your terminal into a high-performance development environment by pairing a tight Ink TUI with Ollama. It is a zero-config, private companion that can read your code, write your features, and run your tests—all without a single byte leaving your machine.
6
+
7
+ ## Architecture
8
+
9
+ ```mermaid
10
+ graph TD
11
+ User["User (Terminal)"] -->|"prompt / @file / /cmd"| InputBar
12
+
13
+ subgraph TUI ["Ink TUI (React)"]
14
+ InputBar["InputBar"] --> App["App.tsx"]
15
+ App --> ChatView["ChatView"]
16
+ App --> CommandPalette["CommandPalette\n(/models, /clear)"]
17
+ App --> FilePicker["FilePicker (@file)"]
18
+ App --> ModelsView["ModelsView"]
19
+ end
20
+
21
+ App -->|"user message"| AgentLoop["Agent Loop\n(agent/loop.ts)"]
22
+
23
+ subgraph Agent ["Agent Layer"]
24
+ AgentLoop -->|"chat request"| Adapter["Ollama Adapter\n(agent/adapter.ts)"]
25
+ AgentLoop -->|"tool call"| ToolRegistry["Tool Registry\n(tools/registry.ts)"]
26
+ AgentLoop -->|"permission check"| Policy["Permission Policy\n(permissions/policy.ts)"]
27
+ AgentLoop -->|"events"| EventBus["Event Bus\n(hooks/bus.ts)"]
28
+ end
29
+
30
+ subgraph Tools ["Tools"]
31
+ ToolRegistry --> ReadFile["read_file"]
32
+ ToolRegistry --> WriteFile["write_file"]
33
+ ToolRegistry --> EditFile["edit_file"]
34
+ ToolRegistry --> Glob["glob"]
35
+ ToolRegistry --> Grep["grep"]
36
+ ToolRegistry --> RunBash["run_bash"]
37
+ end
38
+
39
+ Adapter -->|"HTTP streaming"| Ollama["Ollama\n(local LLM server)"]
40
+ Ollama -->|"model response\n+ tool calls"| Adapter
41
+
42
+ Tools -->|"tool results"| AgentLoop
43
+ EventBus -->|"stream events"| ChatView
44
+
45
+ subgraph Storage ["Local Storage"]
46
+ Config["~/.miii/config.json\n(model, host, effort)"]
47
+ end
48
+
49
+ App -.->|"reads"| Config
50
+ ```
51
+
52
+ ## The Philosophy
53
+
54
+ Most AI agents are wrappers around cloud APIs. They are slow, expensive, and a privacy nightmare. miii is different:
55
+
56
+ 1. Local-First: Powered by Ollama. Your code stays on your disk.
57
+ 2. Zero Ceremony: No API keys. No billing. Just run miii and start coding.
58
+ 3. Engineering Mindset: miii doesn't just "chat". It treats every request as a bug, feature, or fix. It decomposes problems, executes tools, and verifies results.
59
+
60
+ ## Project Status
61
+
62
+ This project is currently an MVP designed to demonstrate and refine basic AI coding skills. I am refurbishing older implementations and experimenting with the agent loop. Feel free to fork, modify, or do whatever you want with this codebase.
63
+
64
+
65
+ ## Capabilities
66
+
67
+ miii is equipped with a suite of tools to interact with your workspace:
68
+
69
+ - File System: read_file, write_file, edit_file (precise string replacement).
70
+ - Discovery: glob (pattern matching), grep (regex search).
71
+ - Execution: run_bash (shell command execution).
72
+
73
+ Every sensitive operation is gated by a permission system. You decide what the agent can touch.
74
+
75
+ ## Quick Start
76
+
77
+ ### 1. Prerequisites
78
+ - Node.js 18+
79
+ - Ollama (running locally via ollama serve)
80
+ - A coder model (e.g., ollama pull qwen2.5-coder:14b)
81
+
82
+ ### 2. Install
83
+ npm i -g miii-cli
84
+
85
+ ### 3. Launch
86
+ miii
87
+
88
+ ## TUI Cheat Sheet
89
+
90
+ - Type & Enter: Send a prompt to the agent.
91
+ - @file: Inline a file's content into the context.
92
+ - /models: Switch your active Ollama model.
93
+ - /clear: Reset conversation history.
94
+ - Esc: Stop the current generation or tool execution.
95
+ - Ctrl+C: Quit.
96
+
97
+ ## Configuration
98
+
99
+ Global settings are stored in ~/.miii/config.json:
100
+ - model: Your default LLM.
101
+ - ollamaHost: Your Ollama API endpoint.
102
+ - effort: Tuning for temperature and limits (low | medium | high).
103
+
104
+
105
+ ## Development
106
+
107
+ git clone https://github.com/maruakshay/miii-cli.git
108
+ cd miii-cli
109
+ npm install
110
+ npm run dev
111
+
112
+ ## License
113
+ MIT