god-code 0.1.4__tar.gz → 0.1.5__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 (82) hide show
  1. {god_code-0.1.4 → god_code-0.1.5}/PKG-INFO +1 -1
  2. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/cli.py +85 -12
  3. {god_code-0.1.4 → god_code-0.1.5}/pyproject.toml +1 -1
  4. {god_code-0.1.4 → god_code-0.1.5}/.github/workflows/publish.yml +0 -0
  5. {god_code-0.1.4 → god_code-0.1.5}/.gitignore +0 -0
  6. {god_code-0.1.4 → god_code-0.1.5}/CHANGELOG.md +0 -0
  7. {god_code-0.1.4 → god_code-0.1.5}/CLAUDE.md +0 -0
  8. {god_code-0.1.4 → god_code-0.1.5}/CONTRIBUTING.md +0 -0
  9. {god_code-0.1.4 → god_code-0.1.5}/LICENSE +0 -0
  10. {god_code-0.1.4 → god_code-0.1.5}/README.md +0 -0
  11. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/__init__.py +0 -0
  12. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/__init__.py +0 -0
  13. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/collision_planner.py +0 -0
  14. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/consistency_checker.py +0 -0
  15. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/dependency_graph.py +0 -0
  16. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/gdscript_linter.py +0 -0
  17. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/pattern_advisor.py +0 -0
  18. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/project.py +0 -0
  19. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/resource_validator.py +0 -0
  20. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/scene_parser.py +0 -0
  21. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/scene_writer.py +0 -0
  22. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/godot/tscn_validator.py +0 -0
  23. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/llm/__init__.py +0 -0
  24. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/llm/client.py +0 -0
  25. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/llm/streaming.py +0 -0
  26. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/llm/vision.py +0 -0
  27. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/prompts/__init__.py +0 -0
  28. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/prompts/build_discipline.py +0 -0
  29. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/prompts/godot_playbook.py +0 -0
  30. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/prompts/knowledge_selector.py +0 -0
  31. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/prompts/system.py +0 -0
  32. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/py.typed +0 -0
  33. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/__init__.py +0 -0
  34. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/auth.py +0 -0
  35. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/config.py +0 -0
  36. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/context_manager.py +0 -0
  37. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/engine.py +0 -0
  38. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/error_loop.py +0 -0
  39. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/oauth.py +0 -0
  40. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/runtime/session.py +0 -0
  41. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/__init__.py +0 -0
  42. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/base.py +0 -0
  43. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/file_ops.py +0 -0
  44. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/git.py +0 -0
  45. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/godot_cli.py +0 -0
  46. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/list_dir.py +0 -0
  47. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/registry.py +0 -0
  48. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/screenshot.py +0 -0
  49. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/search.py +0 -0
  50. {god_code-0.1.4 → god_code-0.1.5}/godot_agent/tools/shell.py +0 -0
  51. {god_code-0.1.4 → god_code-0.1.5}/tests/__init__.py +0 -0
  52. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/__init__.py +0 -0
  53. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_collision_planner.py +0 -0
  54. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_consistency.py +0 -0
  55. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_dependency_graph.py +0 -0
  56. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_linter.py +0 -0
  57. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_pattern_advisor.py +0 -0
  58. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_project.py +0 -0
  59. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_resource_validator.py +0 -0
  60. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_scene_parser.py +0 -0
  61. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_scene_writer.py +0 -0
  62. {god_code-0.1.4 → god_code-0.1.5}/tests/godot/test_tscn_validator.py +0 -0
  63. {god_code-0.1.4 → god_code-0.1.5}/tests/llm/__init__.py +0 -0
  64. {god_code-0.1.4 → god_code-0.1.5}/tests/llm/test_client.py +0 -0
  65. {god_code-0.1.4 → god_code-0.1.5}/tests/llm/test_vision.py +0 -0
  66. {god_code-0.1.4 → god_code-0.1.5}/tests/prompts/__init__.py +0 -0
  67. {god_code-0.1.4 → god_code-0.1.5}/tests/prompts/test_knowledge_selector.py +0 -0
  68. {god_code-0.1.4 → god_code-0.1.5}/tests/prompts/test_system_prompt.py +0 -0
  69. {god_code-0.1.4 → god_code-0.1.5}/tests/runtime/__init__.py +0 -0
  70. {god_code-0.1.4 → god_code-0.1.5}/tests/runtime/test_config.py +0 -0
  71. {god_code-0.1.4 → god_code-0.1.5}/tests/runtime/test_context_manager.py +0 -0
  72. {god_code-0.1.4 → god_code-0.1.5}/tests/runtime/test_engine.py +0 -0
  73. {god_code-0.1.4 → god_code-0.1.5}/tests/runtime/test_error_loop.py +0 -0
  74. {god_code-0.1.4 → god_code-0.1.5}/tests/test_e2e.py +0 -0
  75. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/__init__.py +0 -0
  76. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_file_ops.py +0 -0
  77. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_git.py +0 -0
  78. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_godot_cli.py +0 -0
  79. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_list_dir.py +0 -0
  80. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_registry.py +0 -0
  81. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_search.py +0 -0
  82. {god_code-0.1.4 → god_code-0.1.5}/tests/tools/test_shell.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: god-code
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: AI coding agent specialized for Godot game development
5
5
  Project-URL: Homepage, https://github.com/chuisiufai/god-code
6
6
  Project-URL: Repository, https://github.com/chuisiufai/god-code
@@ -205,8 +205,8 @@ def main(ctx):
205
205
  if not _is_configured():
206
206
  _run_setup_wizard()
207
207
  else:
208
- # No subcommand but already configured show help
209
- click.echo(ctx.get_help())
208
+ # No subcommand enter interactive mode (like Claude Code)
209
+ ctx.invoke(chat)
210
210
 
211
211
 
212
212
  @main.command()
@@ -285,38 +285,111 @@ def ask(prompt: str, project: str, config: str | None, image: tuple[str, ...]):
285
285
  @main.command()
286
286
  @click.option("--project", "-p", default=".", help="Path to Godot project root")
287
287
  @click.option("--config", "-c", default=None, help="Path to config file")
288
- def chat(project: str, config: str | None):
288
+ def chat(project: str = ".", config: str | None = None):
289
289
  """Start an interactive chat session."""
290
290
  cfg = load_config(Path(config) if config else default_config_path())
291
291
  if not cfg.api_key and not cfg.oauth_token:
292
292
  click.secho("Not configured. Run 'god-code setup' first.", fg="yellow", err=True)
293
293
  raise SystemExit(1)
294
+
294
295
  project_root = Path(project).resolve()
295
- engine = build_engine(cfg, project_root)
296
296
  session_id = str(uuid.uuid4())[:8]
297
297
 
298
+ # Detect Godot project
299
+ has_project = (project_root / "project.godot").exists()
300
+
298
301
  click.echo()
299
- click.secho(f" God Code v0.1.0", fg="cyan", bold=True)
300
- click.echo(f" Session: {session_id}")
301
- click.echo(f" Project: {project_root}")
302
- click.echo(f" Model: {cfg.model}")
302
+ click.secho(" God Code", fg="cyan", bold=True)
303
+ click.echo(f" Session: {session_id} | Model: {cfg.model}")
304
+ if has_project:
305
+ from godot_agent.godot.project import parse_project_godot
306
+ proj = parse_project_godot(project_root / "project.godot")
307
+ click.echo(f" Project: {proj.name} ({project_root})")
308
+ else:
309
+ click.echo(f" Working dir: {project_root}")
310
+ click.secho(" No project.godot found. Use /cd to navigate to a Godot project.", fg="yellow")
303
311
  click.echo()
304
- click.echo(" Commands: 'quit' to exit, 'save' to save session")
312
+ click.echo(" /cd <path> — change project directory")
313
+ click.echo(" /info — show project info")
314
+ click.echo(" /help — show commands")
315
+ click.echo(" /save — save session")
316
+ click.echo(" /quit — exit")
305
317
  click.echo()
306
318
 
319
+ engine = build_engine(cfg, project_root)
320
+
321
+ def _rebuild_engine(new_root: Path) -> ConversationEngine:
322
+ nonlocal project_root, has_project
323
+ project_root = new_root.resolve()
324
+ has_project = (project_root / "project.godot").exists()
325
+ return build_engine(cfg, project_root)
326
+
307
327
  async def _loop() -> None:
328
+ nonlocal engine
308
329
  try:
309
330
  while True:
310
331
  try:
311
- user_input = click.prompt(click.style("you", fg="green"), prompt_suffix="> ")
332
+ user_input = click.prompt(
333
+ click.style("you", fg="green"), prompt_suffix="> "
334
+ )
312
335
  except (EOFError, KeyboardInterrupt):
313
336
  break
314
- if user_input.strip().lower() == "quit":
337
+
338
+ cmd = user_input.strip().lower()
339
+
340
+ if cmd in ("/quit", "quit", "/exit", "exit"):
315
341
  break
316
- if user_input.strip().lower() == "save":
342
+
343
+ if cmd in ("/save", "save"):
317
344
  path = save_session(cfg.session_dir, session_id, engine.messages)
318
345
  click.echo(f" Session saved to {path}")
319
346
  continue
347
+
348
+ if cmd == "/help":
349
+ click.echo(" /cd <path> — change project directory")
350
+ click.echo(" /info — show project info")
351
+ click.echo(" /save — save session")
352
+ click.echo(" /status — show auth & model info")
353
+ click.echo(" /quit — exit")
354
+ continue
355
+
356
+ if cmd == "/info":
357
+ if has_project:
358
+ from godot_agent.godot.project import parse_project_godot
359
+ proj = parse_project_godot(project_root / "project.godot")
360
+ click.echo(f" Project: {proj.name}")
361
+ click.echo(f" Version: {proj.version}")
362
+ click.echo(f" Main Scene: {proj.main_scene}")
363
+ click.echo(f" Resolution: {proj.viewport_width}x{proj.viewport_height}")
364
+ click.echo(f" Autoloads: {len(proj.autoloads)}")
365
+ else:
366
+ click.secho(f" No project.godot in {project_root}", fg="yellow")
367
+ continue
368
+
369
+ if cmd == "/status":
370
+ click.echo(f" Model: {cfg.model}")
371
+ click.echo(f" Project: {project_root}")
372
+ click.echo(f" Godot: {cfg.godot_path}")
373
+ continue
374
+
375
+ if user_input.strip().startswith("/cd "):
376
+ new_path = Path(user_input.strip()[4:]).expanduser().resolve()
377
+ if not new_path.exists():
378
+ click.secho(f" Path not found: {new_path}", fg="red")
379
+ continue
380
+ await engine.close()
381
+ engine = _rebuild_engine(new_path)
382
+ has_godot = (new_path / "project.godot").exists()
383
+ if has_godot:
384
+ from godot_agent.godot.project import parse_project_godot
385
+ proj = parse_project_godot(new_path / "project.godot")
386
+ click.secho(f" Switched to: {proj.name} ({new_path})", fg="green")
387
+ else:
388
+ click.echo(f" Working dir: {new_path}")
389
+ click.secho(" No project.godot found here.", fg="yellow")
390
+ continue
391
+
392
+ # Regular message → send to LLM
320
393
  response = await engine.submit(user_input)
321
394
  click.echo()
322
395
  click.echo(click.style("agent> ", fg="cyan") + response)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "god-code"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  description = "AI coding agent specialized for Godot game development"
5
5
  requires-python = ">=3.9"
6
6
  license = {text = "GPL-3.0-or-later"}
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
File without changes