localcoder 0.1.0__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.
localcoder/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ """localcoder — Local AI coding agent. Works with Gemma 4, Qwen 3.5, and any model."""
2
+ __version__ = "0.1.0"
localcoder/__main__.py ADDED
@@ -0,0 +1,2 @@
1
+ from localcoder.cli import main
2
+ main()
localcoder/agent.py ADDED
@@ -0,0 +1,35 @@
1
+ """Agent runner — delegates to the localcoder agent script."""
2
+ import os, sys
3
+
4
+
5
+ def run_agent(api_base, model, args):
6
+ """Run the localcoder agent with the given config."""
7
+ os.environ["GEMMA_API_BASE"] = api_base
8
+ os.environ["GEMMA_MODEL"] = model
9
+
10
+ # Find the agent script — bundled with the package
11
+ script = os.path.join(os.path.dirname(__file__), "localcoder_agent.py")
12
+ if not os.path.exists(script):
13
+ # Fallback
14
+ script = os.path.expanduser("~/Projects/gemma4-research/localcoder")
15
+
16
+ if not os.path.exists(script):
17
+ from rich.console import Console
18
+ Console().print("[red]Agent script not found.[/]")
19
+ return
20
+
21
+ cmd = [sys.executable, script]
22
+ if args.prompt:
23
+ cmd += ["-p", args.prompt]
24
+ if args.cont:
25
+ cmd += ["-c"]
26
+ if args.model:
27
+ cmd += ["-m", model]
28
+ if args.yolo or args.bypass:
29
+ cmd += ["--yolo"]
30
+ if args.ask:
31
+ cmd += ["--ask"]
32
+ if args.api:
33
+ cmd += ["--api", api_base]
34
+
35
+ os.execvp(sys.executable, cmd)