zai-cli 0.1.6__tar.gz → 0.1.7__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 (109) hide show
  1. {zai_cli-0.1.6 → zai_cli-0.1.7}/CHANGELOG.md +8 -0
  2. {zai_cli-0.1.6/zai_cli.egg-info → zai_cli-0.1.7}/PKG-INFO +1 -1
  3. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_interactive.py +18 -16
  4. zai_cli-0.1.7/zai/__init__.py +1 -0
  5. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/interactive.py +42 -4
  6. {zai_cli-0.1.6 → zai_cli-0.1.7/zai_cli.egg-info}/PKG-INFO +1 -1
  7. zai_cli-0.1.6/zai/__init__.py +0 -1
  8. {zai_cli-0.1.6 → zai_cli-0.1.7}/LICENSE +0 -0
  9. {zai_cli-0.1.6 → zai_cli-0.1.7}/MANIFEST.in +0 -0
  10. {zai_cli-0.1.6 → zai_cli-0.1.7}/README.md +0 -0
  11. {zai_cli-0.1.6 → zai_cli-0.1.7}/pyproject.toml +0 -0
  12. {zai_cli-0.1.6 → zai_cli-0.1.7}/scripts/release_preflight.py +0 -0
  13. {zai_cli-0.1.6 → zai_cli-0.1.7}/setup.cfg +0 -0
  14. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_agent.py +0 -0
  15. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_auth.py +0 -0
  16. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_browser.py +0 -0
  17. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_code_runner.py +0 -0
  18. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_config_main.py +0 -0
  19. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_core.py +0 -0
  20. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_errors.py +0 -0
  21. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_hooks_skills_session.py +0 -0
  22. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_input.py +0 -0
  23. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_integrations_cli.py +0 -0
  24. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_mcp.py +0 -0
  25. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_plugins.py +0 -0
  26. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_process.py +0 -0
  27. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_project_memory.py +0 -0
  28. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_providers.py +0 -0
  29. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_release_preflight.py +0 -0
  30. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_search.py +0 -0
  31. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_security.py +0 -0
  32. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_settings_cli.py +0 -0
  33. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_storage.py +0 -0
  34. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_streaming.py +0 -0
  35. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_tool_schema.py +0 -0
  36. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_tools.py +0 -0
  37. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_undo.py +0 -0
  38. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_utilities.py +0 -0
  39. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_vision.py +0 -0
  40. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_watch.py +0 -0
  41. {zai_cli-0.1.6 → zai_cli-0.1.7}/tests/test_workflows.py +0 -0
  42. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/__main__.py +0 -0
  43. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/__init__.py +0 -0
  44. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/common.py +0 -0
  45. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/integrations.py +0 -0
  46. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/settings.py +0 -0
  47. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/setup_wizard.py +0 -0
  48. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/utilities.py +0 -0
  49. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/cli/workflows.py +0 -0
  50. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/commands/commit.md +0 -0
  51. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/commands/explain.md +0 -0
  52. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/commands/feature.md +0 -0
  53. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/commands/fix.md +0 -0
  54. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/commands/review.md +0 -0
  55. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/config.py +0 -0
  56. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/__init__.py +0 -0
  57. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/agent.py +0 -0
  58. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/auth.py +0 -0
  59. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/cancellation.py +0 -0
  60. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/commands.py +0 -0
  61. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/context.py +0 -0
  62. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/errors.py +0 -0
  63. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/fallback.py +0 -0
  64. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/hooks.py +0 -0
  65. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/memory.py +0 -0
  66. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/process.py +0 -0
  67. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/project_memory.py +0 -0
  68. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/repomap.py +0 -0
  69. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/runtime.py +0 -0
  70. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/security.py +0 -0
  71. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/session.py +0 -0
  72. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/storage.py +0 -0
  73. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/streaming.py +0 -0
  74. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/tool_schema.py +0 -0
  75. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/undo.py +0 -0
  76. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/core/watch.py +0 -0
  77. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/main.py +0 -0
  78. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/mcp/__init__.py +0 -0
  79. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/mcp/client.py +0 -0
  80. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/mcp/manager.py +0 -0
  81. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/plugins/__init__.py +0 -0
  82. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/plugins/base.py +0 -0
  83. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/plugins/loader.py +0 -0
  84. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/__init__.py +0 -0
  85. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/anthropic.py +0 -0
  86. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/base.py +0 -0
  87. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/cerebras.py +0 -0
  88. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/gemini.py +0 -0
  89. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/groq.py +0 -0
  90. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/ollama.py +0 -0
  91. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/openai.py +0 -0
  92. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/openrouter.py +0 -0
  93. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/providers/qwen.py +0 -0
  94. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/skills/__init__.py +0 -0
  95. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/skills/registry.py +0 -0
  96. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/__init__.py +0 -0
  97. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/browser.py +0 -0
  98. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/code_runner.py +0 -0
  99. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/files.py +0 -0
  100. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/git.py +0 -0
  101. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/search.py +0 -0
  102. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/tools/vision.py +0 -0
  103. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/ui/__init__.py +0 -0
  104. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai/ui/input.py +0 -0
  105. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai_cli.egg-info/SOURCES.txt +0 -0
  106. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai_cli.egg-info/dependency_links.txt +0 -0
  107. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai_cli.egg-info/entry_points.txt +0 -0
  108. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai_cli.egg-info/requires.txt +0 -0
  109. {zai_cli-0.1.6 → zai_cli-0.1.7}/zai_cli.egg-info/top_level.txt +0 -0
@@ -5,6 +5,14 @@ All notable changes to this project are documented in this file.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and the project uses [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [0.1.7] - 2026-06-28
9
+
10
+ ### Changed
11
+
12
+ - Changed first-run interactive onboarding so `zai` offers provider login inside
13
+ the interactive startup flow instead of sending users back to an external
14
+ command.
15
+
8
16
  ## [0.1.6] - 2026-06-28
9
17
 
10
18
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zai-cli
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Your personal AI CLI — free, fast, and smart
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/HumaizaNaz/zai_cli
@@ -53,25 +53,27 @@ def test_interactive_plain_commands_show_local_help(tmp_path, monkeypatch, capsy
53
53
 
54
54
  def test_interactive_offers_setup_when_no_provider(tmp_path, monkeypatch, capsys):
55
55
  monkeypatch.chdir(tmp_path)
56
- with patch("zai.cli.interactive.has_available_provider", return_value=False):
57
- with patch("zai.cli.interactive.Confirm.ask", return_value=True):
58
- with patch(
59
- "zai.cli.interactive._run_key_setup_interactive",
60
- return_value=True,
61
- ) as setup:
62
- with patch("zai.cli.interactive.fire_hook", return_value=True):
63
- with patch("zai.cli.interactive.plugin_loader.load_all", return_value={}):
64
- with patch("zai.cli.interactive.plugin_loader.get_errors", return_value={}):
65
- with patch("zai.cli.interactive._connect_mcp_servers"):
66
- with patch(
67
- "zai.cli.interactive.InteractiveInput.prompt",
68
- side_effect=EOFError(),
69
- ):
70
- run_interactive("groq")
56
+ with patch(
57
+ "zai.cli.interactive.has_available_provider",
58
+ side_effect=[False, False, True],
59
+ ):
60
+ with patch("zai.cli.interactive.Prompt.ask", return_value="groq"):
61
+ with patch("zai.cli.interactive.Confirm.ask", return_value=False):
62
+ with patch("zai.cli.interactive.save_provider_key") as save:
63
+ with patch("zai.cli.interactive.fire_hook", return_value=True):
64
+ with patch("zai.cli.interactive.plugin_loader.load_all", return_value={}):
65
+ with patch("zai.cli.interactive.plugin_loader.get_errors", return_value={}):
66
+ with patch("zai.cli.interactive._connect_mcp_servers"):
67
+ with patch(
68
+ "zai.cli.interactive.InteractiveInput.prompt",
69
+ side_effect=EOFError(),
70
+ ):
71
+ run_interactive("groq")
71
72
 
72
73
  output = capsys.readouterr().out
73
74
  assert "No AI provider available" in output
74
- setup.assert_called_once()
75
+ assert "Auth login" in output
76
+ save.assert_called_once_with("groq", "groq")
75
77
 
76
78
 
77
79
  def test_interactive_key_setup_saves_entered_key(capsys):
@@ -0,0 +1 @@
1
+ __version__ = "0.1.7"
@@ -341,6 +341,45 @@ def _run_auth_command(stripped: str) -> None:
341
341
  )
342
342
 
343
343
 
344
+ def _run_first_run_auth_menu() -> bool:
345
+ while not has_available_provider():
346
+ choice = Prompt.ask(
347
+ "Connect provider",
348
+ choices=[
349
+ "groq",
350
+ "gemini",
351
+ "openai",
352
+ "anthropic",
353
+ "ollama",
354
+ "setup",
355
+ "status",
356
+ "exit",
357
+ ],
358
+ default="groq",
359
+ )
360
+ if choice == "exit":
361
+ return False
362
+ if choice == "status":
363
+ _show_auth_status()
364
+ continue
365
+ if choice == "setup":
366
+ return _run_key_setup_interactive()
367
+ if choice == "ollama":
368
+ console.print(
369
+ "[cyan]Ollama does not need an API key.[/cyan]\n"
370
+ "Start Ollama locally, then run [bold]zai model test ollama[/bold]."
371
+ )
372
+ return has_available_provider()
373
+ _run_auth_login(choice)
374
+ if has_available_provider():
375
+ return True
376
+ console.print(
377
+ "[yellow]No provider is connected yet. Choose another provider "
378
+ "or type exit.[/yellow]"
379
+ )
380
+ return True
381
+
382
+
344
383
  def _run_key_setup_interactive() -> bool:
345
384
  return run_setup_wizard(console=console)
346
385
 
@@ -443,12 +482,11 @@ def run_interactive(model: str = None) -> None:
443
482
  " 3. Connect Anthropic API key\n"
444
483
  " 4. Use local Ollama\n"
445
484
  " 5. Advanced: run Codex/Claude official CLI login\n\n"
446
- "Run [cyan]zai auth status[/cyan] to inspect providers.",
485
+ "Choose a provider below. You can also use [cyan]status[/cyan] "
486
+ "or [cyan]setup[/cyan].",
447
487
  border_style="red",
448
488
  ))
449
- if not Confirm.ask("Set up an API key now?", default=True):
450
- return
451
- if not _run_key_setup_interactive():
489
+ if not _run_first_run_auth_menu():
452
490
  return
453
491
 
454
492
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zai-cli
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Your personal AI CLI — free, fast, and smart
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/HumaizaNaz/zai_cli
@@ -1 +0,0 @@
1
- __version__ = "0.1.6"
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
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
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
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
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
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
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
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
File without changes