mlx-code 0.0.10__tar.gz → 0.0.11__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.
Files changed (26) hide show
  1. {mlx_code-0.0.10 → mlx_code-0.0.11}/PKG-INFO +8 -4
  2. {mlx_code-0.0.10 → mlx_code-0.0.11}/README.md +2 -2
  3. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/main.py +6 -3
  4. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/repl.py +19 -1
  5. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code.egg-info/PKG-INFO +8 -4
  6. {mlx_code-0.0.10 → mlx_code-0.0.11}/setup.py +7 -2
  7. {mlx_code-0.0.10 → mlx_code-0.0.11}/LICENSE +0 -0
  8. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/__init__.py +0 -0
  9. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/apis.py +0 -0
  10. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/gits.py +0 -0
  11. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/lsp_tool.py +0 -0
  12. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/mcb.py +0 -0
  13. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/mcb_tool.py +0 -0
  14. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/stream_log.py +0 -0
  15. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/tools.py +0 -0
  16. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/util.py +0 -0
  17. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/view_git.py +0 -0
  18. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code/view_log.py +0 -0
  19. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code.egg-info/SOURCES.txt +0 -0
  20. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code.egg-info/dependency_links.txt +0 -0
  21. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code.egg-info/entry_points.txt +0 -0
  22. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code.egg-info/requires.txt +0 -0
  23. {mlx_code-0.0.10 → mlx_code-0.0.11}/mlx_code.egg-info/top_level.txt +0 -0
  24. {mlx_code-0.0.10 → mlx_code-0.0.11}/setup.cfg +0 -0
  25. {mlx_code-0.0.10 → mlx_code-0.0.11}/tests/__init__.py +0 -0
  26. {mlx_code-0.0.10 → mlx_code-0.0.11}/tests/test.py +0 -0
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlx-code
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Coding Agent for Mac
5
- Home-page: https://github.com/JosefAlbers/mlx-code
5
+ Home-page: https://josefalbers.github.io/mlx-code/
6
6
  Author: J Joe
7
7
  Author-email: albersj66@gmail.com
8
8
  License: Apache-2.0
9
+ Project-URL: Source, https://github.com/JosefAlbers/mlx-code
10
+ Project-URL: Issues, https://github.com/JosefAlbers/mlx-code/issues
11
+ Project-URL: Documentation, https://josefalbers.github.io/mlx-code/
9
12
  Requires-Python: >=3.12.8
10
13
  Description-Content-Type: text/markdown
11
14
  License-File: LICENSE
@@ -22,16 +25,17 @@ Dynamic: description-content-type
22
25
  Dynamic: home-page
23
26
  Dynamic: license
24
27
  Dynamic: license-file
28
+ Dynamic: project-url
25
29
  Dynamic: provides-extra
26
30
  Dynamic: requires-dist
27
31
  Dynamic: requires-python
28
32
  Dynamic: summary
29
33
 
30
- # mlx-code
34
+ # [mlx-code](https://josefalbers.github.io/mlx-code)
31
35
 
32
36
  A lightweight coding agent built on Apple's MLX framework.
33
37
 
34
- [![demo](https://raw.githubusercontent.com/JosefAlbers/mlx-code/main/assets/mlx-code.gif)](https://youtu.be/0lkY7YQCyCo)
38
+ https://github.com/user-attachments/assets/0569d101-8d0a-4e67-9e82-fce84a5ef3f0
35
39
 
36
40
  ---
37
41
 
@@ -1,8 +1,8 @@
1
- # mlx-code
1
+ # [mlx-code](https://josefalbers.github.io/mlx-code)
2
2
 
3
3
  A lightweight coding agent built on Apple's MLX framework.
4
4
 
5
- [![demo](https://raw.githubusercontent.com/JosefAlbers/mlx-code/main/assets/mlx-code.gif)](https://youtu.be/0lkY7YQCyCo)
5
+ https://github.com/user-attachments/assets/0569d101-8d0a-4e67-9e82-fce84a5ef3f0
6
6
 
7
7
  ---
8
8
 
@@ -861,7 +861,7 @@ def generate_step(
861
861
  y, logprobs = _step(input_tokens=prompt, input_embeddings=input_embeddings)
862
862
  mx.async_eval(y, logprobs)
863
863
  n = 0
864
- _tl = int(max_tokens * 0.2)
864
+ _tl = int(max_tokens * 0.9)
865
865
  _td = []
866
866
  while True:
867
867
  if n != max_tokens:
@@ -1487,7 +1487,7 @@ def serve(
1487
1487
  fixed_port: bool = False,
1488
1488
  gwt=None,
1489
1489
  ) -> tuple[HTTPServer, str]:
1490
- handler = make_handler(model, os.path.abspath(cache), system, tools, skips, gwt)
1490
+ handler = make_handler(model, cache, system, tools, skips, gwt)
1491
1491
  while True:
1492
1492
  try:
1493
1493
  server = HTTPServer((host, port), handler)
@@ -1523,6 +1523,8 @@ def main():
1523
1523
  "-m",
1524
1524
  "--model",
1525
1525
  default="mlx-community/Qwen3.5-4B-OptiQ-4bit",
1526
+ # default="mlx-community/Qwen3.6-27B-OptiQ-4bit",
1527
+ # default="mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit",
1526
1528
  help="MLX model path or HuggingFace repo ID (default: Qwen3.5-4B-OptiQ-4bit)",
1527
1529
  )
1528
1530
  parser.add_argument(
@@ -1581,6 +1583,7 @@ def main():
1581
1583
  parser.add_argument("--stream", default=None, help="File to stream log into")
1582
1584
  args, leash_args = parser.parse_known_args()
1583
1585
  logger.debug(f"args={args!r} leash_args={leash_args!r}")
1586
+ cache = os.path.abspath(args.cache)
1584
1587
  with tempfile.TemporaryDirectory(dir="/tmp") as _home:
1585
1588
  env = os.environ.copy()
1586
1589
  home = Path(_home)
@@ -1597,7 +1600,7 @@ def main():
1597
1600
  host=args.host,
1598
1601
  port=args.port if args.port is not None else 8000,
1599
1602
  model=args.model,
1600
- cache=args.cache,
1603
+ cache=cache,
1601
1604
  system=None if args.leash in ("none", "noapi") else args.system,
1602
1605
  tools=args.tools,
1603
1606
  skips=args.skips,
@@ -234,7 +234,7 @@ class Agent:
234
234
  return msg
235
235
 
236
236
 
237
- _REPL_HELP = "Commands:\n /help — show this message\n /clear — clear conversation history\n /history — print message history\n /tools — list active tools\n /branch — spawn a branched sub-agent and run a one-shot prompt\n /abort — signal abort after next tool call\n /quit / exit — end the session\n"
237
+ _REPL_HELP = "Commands:\n /help — show this message\n /clear — clear conversation history\n /history — print message history\n /tools — list active tools\n /branch — spawn a branched sub-agent and run a one-shot prompt\n /abort — signal abort after next tool call\n /export [path] — export session to a timestamped JSON file\n /quit / exit — end the session\n"
238
238
  import sys
239
239
  import os
240
240
  from contextlib import contextmanager
@@ -552,6 +552,24 @@ async def repl(agent, init_prompt=None) -> None:
552
552
  elif cmd == "/abort":
553
553
  agent.abort()
554
554
  print("[abort signalled]")
555
+ elif cmd == "/export":
556
+ import datetime
557
+
558
+ ts = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
559
+ default_path = os.path.join(os.getcwd(), f"session_{ts}.json")
560
+ out_path = arg.strip() or default_path
561
+ payload = {
562
+ "version": 1,
563
+ "exported_at": ts,
564
+ "system": agent.system,
565
+ "messages": agent.messages,
566
+ }
567
+ try:
568
+ with open(out_path, "w", encoding="utf-8") as f:
569
+ json.dump(payload, f, indent=2, ensure_ascii=False)
570
+ print(f"[exported {len(agent.messages)} messages → {out_path}]")
571
+ except OSError as e:
572
+ print(f"[export failed: {e}]")
555
573
  else:
556
574
  print(f"Unknown command: {cmd} (try /help)")
557
575
  continue
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlx-code
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Coding Agent for Mac
5
- Home-page: https://github.com/JosefAlbers/mlx-code
5
+ Home-page: https://josefalbers.github.io/mlx-code/
6
6
  Author: J Joe
7
7
  Author-email: albersj66@gmail.com
8
8
  License: Apache-2.0
9
+ Project-URL: Source, https://github.com/JosefAlbers/mlx-code
10
+ Project-URL: Issues, https://github.com/JosefAlbers/mlx-code/issues
11
+ Project-URL: Documentation, https://josefalbers.github.io/mlx-code/
9
12
  Requires-Python: >=3.12.8
10
13
  Description-Content-Type: text/markdown
11
14
  License-File: LICENSE
@@ -22,16 +25,17 @@ Dynamic: description-content-type
22
25
  Dynamic: home-page
23
26
  Dynamic: license
24
27
  Dynamic: license-file
28
+ Dynamic: project-url
25
29
  Dynamic: provides-extra
26
30
  Dynamic: requires-dist
27
31
  Dynamic: requires-python
28
32
  Dynamic: summary
29
33
 
30
- # mlx-code
34
+ # [mlx-code](https://josefalbers.github.io/mlx-code)
31
35
 
32
36
  A lightweight coding agent built on Apple's MLX framework.
33
37
 
34
- [![demo](https://raw.githubusercontent.com/JosefAlbers/mlx-code/main/assets/mlx-code.gif)](https://youtu.be/0lkY7YQCyCo)
38
+ https://github.com/user-attachments/assets/0569d101-8d0a-4e67-9e82-fce84a5ef3f0
35
39
 
36
40
  ---
37
41
 
@@ -2,11 +2,16 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mlx-code",
5
- url="https://github.com/JosefAlbers/mlx-code",
5
+ url="https://josefalbers.github.io/mlx-code/",
6
+ project_urls={
7
+ "Source": "https://github.com/JosefAlbers/mlx-code",
8
+ "Issues": "https://github.com/JosefAlbers/mlx-code/issues",
9
+ "Documentation": "https://josefalbers.github.io/mlx-code/",
10
+ },
6
11
  author_email="albersj66@gmail.com",
7
12
  author="J Joe",
8
13
  license="Apache-2.0",
9
- version="0.0.10",
14
+ version="0.0.11",
10
15
  readme="README.md",
11
16
  description="Coding Agent for Mac",
12
17
  long_description=open("README.md").read(),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes