maxac 0.1.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chris McKenzie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
maxac-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,220 @@
1
+ Metadata-Version: 2.4
2
+ Name: maxac
3
+ Version: 0.1.0
4
+ Summary: A one-shot command-line helper with scoped execution tasks
5
+ Author: agent-cli contributors
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/day50/agent-cli
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE.MIT
19
+ Requires-Dist: pyyaml
20
+ Requires-Dist: streamdown>=0.36
21
+ Dynamic: license-file
22
+
23
+ # agent-cli
24
+
25
+ > Your terminal. Any task. One command.
26
+
27
+ ```bash
28
+ ta "how much disk space do I have remaining"
29
+ ```
30
+
31
+ You describe what you want. `ac` uses LLM intelligence where it matters — skill matching, tool selection, result verification — so the agent is robust to the variance that breaks classical heuristics. At default verbosity, you just see the answer. Add `-v` or `-vv` for internals.
32
+
33
+ ---
34
+
35
+ ## Install
36
+
37
+ ```bash
38
+ uvx/pipx/uv tool maxac
39
+ ```
40
+
41
+ Then point it at any OpenAI-compatible API and ask you TA:
42
+
43
+ ```bash
44
+ ac -s model "gemma4:9b"
45
+ ac -s base_url "http://localhost:11434/"
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Try it now
51
+
52
+ ```bash
53
+ # Run a one-shot task
54
+ ac "list all files in the current directory"
55
+
56
+ # No arguments → show current status (tools, skills, config)
57
+ ac
58
+ ```
59
+
60
+ `ac` and `agent-cli` are interchangeable — `ac` is the short alias.
61
+
62
+ ---
63
+
64
+ ## What happens when you run a task
65
+
66
+ 1. **Defines success** — the LLM writes a concrete, directly verifiable success condition before touching anything (e.g. "output contains filesystem mount points and their total/used/available space" — not vague things like "output contains information about disk usage").
67
+ 2. **Matches skills** — the LLM checks saved skills against your task. It rejects generic matches (a bare `cat` skill won't fire when you asked about disk space — the LLM knows `df` is the right tool).
68
+ 3. **Plans** — the LLM picks the best tool for the job (`df` for disk space, `free` for memory, `git` for repos) — not limited to already-linked tools. Any tool on PATH is fair game.
69
+ 4. **Resolves tools** — needed tools are symlinked automatically (with your approval). If a tool isn't on PATH, the LLM suggests an alternative before falling back to system search.
70
+ 5. **Executes step-by-step** — each action is visible at `-v`; nothing runs silently.
71
+ 6. **Verifies** — the LLM checks tool output against the success condition and produces a human-readable answer (e.g. "The CPU is AMD Ryzen 7 and the memory is 16GB").
72
+ 7. **Learns** — the LLM names the skill, identifies variable arguments, and parameterizes the plan — all via LLM, not regex.
73
+
74
+ ---
75
+
76
+ ## Tool isolation
77
+
78
+ Instead of reaching into your full system `PATH`, `ac` works with a minimal set of symlinked tools under its config directory:
79
+
80
+ ```
81
+ ~/.local/agent-cli/tools/
82
+ doc/bin/ whatis apropos man pydoc
83
+ find/bin/ cat head tail ls
84
+ vcs/bin/ git ← symlinked on first use, after you say yes
85
+ build/bin/ npm pip …
86
+ ```
87
+
88
+ When a task needs a new tool, the agent checks PATH first, then asks the LLM for an alternative if needed, then falls back to `whatis`/`apropos` as a last resort. It prompts you before symlinking:
89
+
90
+ ```
91
+ ? allow symlink: git → tools/vcs/bin/git [y/N]
92
+ ```
93
+
94
+ Use `-y` / `--yes` to pre-approve all symlinks for non-interactive runs:
95
+
96
+ ```bash
97
+ ac -y "clone github.com/user/repo as my-repo"
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Skills
103
+
104
+ Every successful task is saved as a **skill** — an [Anthropic-compatible](https://agentskills.io) `SKILL.md` + `plan.json` pair under your config directory:
105
+
106
+ ```
107
+ ~/.local/agent-cli/skills/
108
+ clone-repo/
109
+ SKILL.md # YAML frontmatter + instructions (importable to other tools)
110
+ plan.json # parameterized plan, params_map, success condition
111
+ ```
112
+
113
+ The LLM identifies variable arguments (URLs, repo names, paths, versions) and gives them semantic parameter names (e.g. `repository_url`, `branch_name`) — so the same skill works on new inputs without re-planning. Skill matching is also LLM-driven: the model decides whether a saved skill genuinely applies to your task, rejecting false matches like a generic `cat` skill when you asked about disk space.
114
+
115
+ ### Skill commands
116
+
117
+ ```bash
118
+ ac --skills # list all saved skills
119
+ ac --skills clone-repo # show detail: instructions, plan, params
120
+ ac -d clone-repo # delete a bad skill so it re-learns from scratch
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Configuration
126
+
127
+ Config lives at `~/.local/agent-cli/config.json` (path varies by platform — see table below).
128
+
129
+ ### Set values
130
+
131
+ ```bash
132
+ ac -s model "gpt-4o"
133
+ ac -s base_url "https://api.openai.com/v1"
134
+ ac -s key "sk-..."
135
+ ac -s # show current values (key is masked)
136
+ ```
137
+
138
+ `base_url` is auto-corrected — if it doesn't already end with `/v1` or `/v1beta`, `/v1` is appended:
139
+
140
+ ```bash
141
+ ac -s base_url "https://integrate.api.nvidia.com"
142
+ # → stored as https://integrate.api.nvidia.com/v1
143
+ ```
144
+
145
+ ### List available models
146
+
147
+ Run `-m` with no value to query the `/models` endpoint — useful for verifying your key and `base_url`:
148
+
149
+ ```bash
150
+ ac -m
151
+ # ✓ models available at https://api.openai.com/v1:
152
+ # · gpt-4o (openai)
153
+ # · gpt-4o-mini (openai)
154
+ ```
155
+
156
+ ### One-shot overrides
157
+
158
+ Override model, base URL, or key for a single run without changing saved config:
159
+
160
+ ```bash
161
+ ac -m "gpt-4o-mini" "summarise this repo in 10 bullets"
162
+ ac -b "https://my-proxy.example.com/v1" -k "sk-..." "list all files"
163
+ ```
164
+
165
+ ### Debug: see the raw API call
166
+
167
+ ```bash
168
+ ac --curlify "say hi"
169
+ # prints the equivalent curl command before executing
170
+ ```
171
+
172
+ ### Config directory
173
+
174
+ | Platform | Default path |
175
+ |---|---|
176
+ | Linux | `~/.local/agent-cli/` |
177
+ | macOS (framework build) | `~/Library/Python/3.x/agent-cli/` |
178
+ | macOS (non-framework) | `~/.local/agent-cli/` |
179
+ | Override | `-c <path>` / `--config-dir <path>` |
180
+
181
+ ---
182
+
183
+ ## Quick reference
184
+
185
+ | Command | What it does |
186
+ |---|---|
187
+ | `ac "<task>"` | Run a one-shot task |
188
+ | `ac` | Show status (tools, skills, config) |
189
+ | `ac -s model "gpt-4o"` | Set default model |
190
+ | `ac -s base_url "…"` | Set default API base URL |
191
+ | `ac -s key "…"` | Set default API key |
192
+ | `ac -s` | Show current config values |
193
+ | `ac -m` | List models at current base URL |
194
+ | `ac -m "model" "<task>"` | Run task with a different model |
195
+ | `ac -b "url" "<task>"` | Run task with a different base URL |
196
+ | `ac -k "key" "<task>"` | Run task with a different API key |
197
+ | `ac --skills` | List saved skills |
198
+ | `ac --skills <name>` | Show skill detail |
199
+ | `ac -d <name>` | Delete a skill |
200
+ | `ac -v "<task>"` | Show sections and steps (`-vv` for raw tool output) |
201
+ | `ac -y "<task>"` | Auto-approve all tool symlinks |
202
+ | `ac -c <path> "<task>"` | Use a different config directory |
203
+ | `ac --curlify "<task>"` | Print the raw API call as curl |
204
+
205
+ ---
206
+
207
+ ## Contributing
208
+
209
+ If you've run a task and thought "that should just work" — open an issue with:
210
+ - what you typed
211
+ - what you expected
212
+ - what actually happened
213
+
214
+ PRs welcome.
215
+
216
+ ---
217
+
218
+ ## License
219
+
220
+ MIT
maxac-0.1.0/README.md ADDED
@@ -0,0 +1,198 @@
1
+ # agent-cli
2
+
3
+ > Your terminal. Any task. One command.
4
+
5
+ ```bash
6
+ ta "how much disk space do I have remaining"
7
+ ```
8
+
9
+ You describe what you want. `ac` uses LLM intelligence where it matters — skill matching, tool selection, result verification — so the agent is robust to the variance that breaks classical heuristics. At default verbosity, you just see the answer. Add `-v` or `-vv` for internals.
10
+
11
+ ---
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ uvx/pipx/uv tool maxac
17
+ ```
18
+
19
+ Then point it at any OpenAI-compatible API and ask you TA:
20
+
21
+ ```bash
22
+ ac -s model "gemma4:9b"
23
+ ac -s base_url "http://localhost:11434/"
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Try it now
29
+
30
+ ```bash
31
+ # Run a one-shot task
32
+ ac "list all files in the current directory"
33
+
34
+ # No arguments → show current status (tools, skills, config)
35
+ ac
36
+ ```
37
+
38
+ `ac` and `agent-cli` are interchangeable — `ac` is the short alias.
39
+
40
+ ---
41
+
42
+ ## What happens when you run a task
43
+
44
+ 1. **Defines success** — the LLM writes a concrete, directly verifiable success condition before touching anything (e.g. "output contains filesystem mount points and their total/used/available space" — not vague things like "output contains information about disk usage").
45
+ 2. **Matches skills** — the LLM checks saved skills against your task. It rejects generic matches (a bare `cat` skill won't fire when you asked about disk space — the LLM knows `df` is the right tool).
46
+ 3. **Plans** — the LLM picks the best tool for the job (`df` for disk space, `free` for memory, `git` for repos) — not limited to already-linked tools. Any tool on PATH is fair game.
47
+ 4. **Resolves tools** — needed tools are symlinked automatically (with your approval). If a tool isn't on PATH, the LLM suggests an alternative before falling back to system search.
48
+ 5. **Executes step-by-step** — each action is visible at `-v`; nothing runs silently.
49
+ 6. **Verifies** — the LLM checks tool output against the success condition and produces a human-readable answer (e.g. "The CPU is AMD Ryzen 7 and the memory is 16GB").
50
+ 7. **Learns** — the LLM names the skill, identifies variable arguments, and parameterizes the plan — all via LLM, not regex.
51
+
52
+ ---
53
+
54
+ ## Tool isolation
55
+
56
+ Instead of reaching into your full system `PATH`, `ac` works with a minimal set of symlinked tools under its config directory:
57
+
58
+ ```
59
+ ~/.local/agent-cli/tools/
60
+ doc/bin/ whatis apropos man pydoc
61
+ find/bin/ cat head tail ls
62
+ vcs/bin/ git ← symlinked on first use, after you say yes
63
+ build/bin/ npm pip …
64
+ ```
65
+
66
+ When a task needs a new tool, the agent checks PATH first, then asks the LLM for an alternative if needed, then falls back to `whatis`/`apropos` as a last resort. It prompts you before symlinking:
67
+
68
+ ```
69
+ ? allow symlink: git → tools/vcs/bin/git [y/N]
70
+ ```
71
+
72
+ Use `-y` / `--yes` to pre-approve all symlinks for non-interactive runs:
73
+
74
+ ```bash
75
+ ac -y "clone github.com/user/repo as my-repo"
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Skills
81
+
82
+ Every successful task is saved as a **skill** — an [Anthropic-compatible](https://agentskills.io) `SKILL.md` + `plan.json` pair under your config directory:
83
+
84
+ ```
85
+ ~/.local/agent-cli/skills/
86
+ clone-repo/
87
+ SKILL.md # YAML frontmatter + instructions (importable to other tools)
88
+ plan.json # parameterized plan, params_map, success condition
89
+ ```
90
+
91
+ The LLM identifies variable arguments (URLs, repo names, paths, versions) and gives them semantic parameter names (e.g. `repository_url`, `branch_name`) — so the same skill works on new inputs without re-planning. Skill matching is also LLM-driven: the model decides whether a saved skill genuinely applies to your task, rejecting false matches like a generic `cat` skill when you asked about disk space.
92
+
93
+ ### Skill commands
94
+
95
+ ```bash
96
+ ac --skills # list all saved skills
97
+ ac --skills clone-repo # show detail: instructions, plan, params
98
+ ac -d clone-repo # delete a bad skill so it re-learns from scratch
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Configuration
104
+
105
+ Config lives at `~/.local/agent-cli/config.json` (path varies by platform — see table below).
106
+
107
+ ### Set values
108
+
109
+ ```bash
110
+ ac -s model "gpt-4o"
111
+ ac -s base_url "https://api.openai.com/v1"
112
+ ac -s key "sk-..."
113
+ ac -s # show current values (key is masked)
114
+ ```
115
+
116
+ `base_url` is auto-corrected — if it doesn't already end with `/v1` or `/v1beta`, `/v1` is appended:
117
+
118
+ ```bash
119
+ ac -s base_url "https://integrate.api.nvidia.com"
120
+ # → stored as https://integrate.api.nvidia.com/v1
121
+ ```
122
+
123
+ ### List available models
124
+
125
+ Run `-m` with no value to query the `/models` endpoint — useful for verifying your key and `base_url`:
126
+
127
+ ```bash
128
+ ac -m
129
+ # ✓ models available at https://api.openai.com/v1:
130
+ # · gpt-4o (openai)
131
+ # · gpt-4o-mini (openai)
132
+ ```
133
+
134
+ ### One-shot overrides
135
+
136
+ Override model, base URL, or key for a single run without changing saved config:
137
+
138
+ ```bash
139
+ ac -m "gpt-4o-mini" "summarise this repo in 10 bullets"
140
+ ac -b "https://my-proxy.example.com/v1" -k "sk-..." "list all files"
141
+ ```
142
+
143
+ ### Debug: see the raw API call
144
+
145
+ ```bash
146
+ ac --curlify "say hi"
147
+ # prints the equivalent curl command before executing
148
+ ```
149
+
150
+ ### Config directory
151
+
152
+ | Platform | Default path |
153
+ |---|---|
154
+ | Linux | `~/.local/agent-cli/` |
155
+ | macOS (framework build) | `~/Library/Python/3.x/agent-cli/` |
156
+ | macOS (non-framework) | `~/.local/agent-cli/` |
157
+ | Override | `-c <path>` / `--config-dir <path>` |
158
+
159
+ ---
160
+
161
+ ## Quick reference
162
+
163
+ | Command | What it does |
164
+ |---|---|
165
+ | `ac "<task>"` | Run a one-shot task |
166
+ | `ac` | Show status (tools, skills, config) |
167
+ | `ac -s model "gpt-4o"` | Set default model |
168
+ | `ac -s base_url "…"` | Set default API base URL |
169
+ | `ac -s key "…"` | Set default API key |
170
+ | `ac -s` | Show current config values |
171
+ | `ac -m` | List models at current base URL |
172
+ | `ac -m "model" "<task>"` | Run task with a different model |
173
+ | `ac -b "url" "<task>"` | Run task with a different base URL |
174
+ | `ac -k "key" "<task>"` | Run task with a different API key |
175
+ | `ac --skills` | List saved skills |
176
+ | `ac --skills <name>` | Show skill detail |
177
+ | `ac -d <name>` | Delete a skill |
178
+ | `ac -v "<task>"` | Show sections and steps (`-vv` for raw tool output) |
179
+ | `ac -y "<task>"` | Auto-approve all tool symlinks |
180
+ | `ac -c <path> "<task>"` | Use a different config directory |
181
+ | `ac --curlify "<task>"` | Print the raw API call as curl |
182
+
183
+ ---
184
+
185
+ ## Contributing
186
+
187
+ If you've run a task and thought "that should just work" — open an issue with:
188
+ - what you typed
189
+ - what you expected
190
+ - what actually happened
191
+
192
+ PRs welcome.
193
+
194
+ ---
195
+
196
+ ## License
197
+
198
+ MIT