titan-cli 0.1.1__py3-none-any.whl → 0.1.2__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.
titan_cli/__init__.py CHANGED
@@ -1,3 +1,5 @@
1
1
  """Titan CLI - Modular development tools orchestrator."""
2
2
 
3
- __version__ = "0.1.1"
3
+ from importlib.metadata import version
4
+
5
+ __version__ = version("titan-cli")
titan_cli/cli.py CHANGED
@@ -8,7 +8,7 @@ import typer
8
8
  from titan_cli import __version__
9
9
  from titan_cli.messages import msg
10
10
  from titan_cli.ui.tui import launch_tui
11
- from titan_cli.utils.autoupdate import check_for_updates, get_update_message
11
+ from titan_cli.utils.autoupdate import check_for_updates, perform_update
12
12
 
13
13
 
14
14
 
@@ -34,10 +34,32 @@ def main(ctx: typer.Context):
34
34
  # Check for updates (non-blocking, silent on errors)
35
35
  try:
36
36
  update_info = check_for_updates()
37
- message = get_update_message(update_info)
38
- if message:
39
- typer.echo(message)
40
- typer.echo() # Empty line for spacing
37
+ if update_info["update_available"]:
38
+ current = update_info["current_version"]
39
+ latest = update_info["latest_version"]
40
+
41
+ typer.echo(f"🔔 Update available: v{current} → v{latest}")
42
+ typer.echo()
43
+
44
+ # Ask user if they want to update
45
+ if typer.confirm("Would you like to update now?", default=True):
46
+ typer.echo("⏳ Updating Titan CLI...")
47
+ result = perform_update()
48
+
49
+ if result["success"]:
50
+ typer.echo(f"✅ Successfully updated to v{latest} using {result['method']}")
51
+ typer.echo("🔄 Please restart Titan to use the new version")
52
+ typer.echo()
53
+ # Exit so user can restart
54
+ raise typer.Exit(0)
55
+ else:
56
+ typer.echo(f"❌ Update failed: {result['error']}")
57
+ typer.echo(" Please try manually: pipx upgrade titan-cli")
58
+ typer.echo()
59
+ # Continue to TUI even if update fails
60
+ else:
61
+ typer.echo("⏭ Skipping update. Run 'pipx upgrade titan-cli' to update later.")
62
+ typer.echo()
41
63
  except Exception:
42
64
  # Silently ignore update check failures
43
65
  pass
@@ -108,7 +108,7 @@ def perform_update() -> Dict[str, any]:
108
108
  # Try pipx first (recommended)
109
109
  try:
110
110
  subprocess.check_call(
111
- ["pipx", "upgrade", "titan-cli"],
111
+ ["pipx", "upgrade", "--force", "titan-cli"],
112
112
  stdout=subprocess.DEVNULL,
113
113
  stderr=subprocess.DEVNULL
114
114
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: titan-cli
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Modular development tools orchestrator - Streamline your workflows with AI integration and intuitive terminal UI
5
5
  Home-page: https://github.com/masmovil/titan-cli
6
6
  License: MIT
@@ -46,7 +46,7 @@ titan_plugin_jira/agents/prompts.py,sha256=MWiEbLz_vnHwdnT8toPiS4wDCK0m8lw1kLW6T
46
46
  titan_plugin_jira/agents/response_parser.py,sha256=BoM64QhXUcr2APikqjcc2d78U-fdwClSoa3Nv7sm7uI,13881
47
47
  titan_plugin_jira/agents/token_tracker.py,sha256=yNJQ8HYQl0S-nTZsPHYbb5Vc70rzGHpAsiWE83Gy2zA,7191
48
48
  titan_plugin_jira/agents/validators.py,sha256=PzwtSbjzN1mrsU2gNQn6EqBJSVI-pTPhbpQiHuG3LXc,8186
49
- titan_plugin_jira/clients/jira_client.py,sha256=8M5M5Rw1HXZ5kZdams7XWXxYv_ZXXLsdUdl0vqymTCE,24041
49
+ titan_plugin_jira/clients/jira_client.py,sha256=ttjP1-Y20niofNGsnZv_RcdBj2dP2x3WDgggVqTKlao,24068
50
50
  titan_plugin_jira/config/jira_agent.toml,sha256=IOBaBlM3c7KsNiMCwOdKdibjB0QjRo71w1Kaf65CrHs,3114
51
51
  titan_plugin_jira/config/templates/issue_analysis.md.j2,sha256=xPznSjW3U8GXFtumRx2BwtyS4erFYWHk2zCUrT7XCQA,1452
52
52
  titan_plugin_jira/exceptions.py,sha256=NCOVDhynbVmyNFvi_zihl2JPTMr4twIsIb2Bk-v7ZJU,902
@@ -63,7 +63,7 @@ titan_plugin_jira/utils/__init__.py,sha256=CW540Bjbw33xaoiPlawEtNE7ncr4K3Pg_sFgZ
63
63
  titan_plugin_jira/utils/issue_sorter.py,sha256=5l5K20ppb1zfhuEOyXXkmfV_zh1wTio1IUWMU2IBaRE,4012
64
64
  titan_plugin_jira/utils/saved_queries.py,sha256=bWFI1LSs8ydCRprcJTHk6DMrq1wXN27pb5zoYYVJpRw,5111
65
65
  titan_plugin_jira/workflows/analyze-jira-issues.yaml,sha256=VQ-_trGZGxvQUFsbXmrc8r2q9TIi5bfO-T4l6r-JyMw,802
66
- titan_cli/__init__.py,sha256=_nW8DdME-bAY5jhY6JxgOQiAnuI67w3BjvFlEVIUKOI,81
66
+ titan_cli/__init__.py,sha256=1gPtpwnCCyNpmlPD35zE08IPu1OhMErhfRA0sakZLJE,134
67
67
  titan_cli/__main__.py,sha256=4tNjZ0tzDfvLID_RSjWREFBqEQ7pRnnerIqAv9Qd5uY,68
68
68
  titan_cli/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
69
  titan_cli/ai/agents/__init__.py,sha256=u5KT7ROBAvhpl_cVoju6rYtmKunxp2dti2clqTzVU00,341
@@ -77,7 +77,7 @@ titan_cli/ai/providers/__init__.py,sha256=sNzrQGY3MM1EmYaHKJux4yRE5tvZMIRUlHcLfG
77
77
  titan_cli/ai/providers/anthropic.py,sha256=ibfIpseHsouEEc8HdIUihzlMQCJHQgNa1sQNSoPY0WY,4085
78
78
  titan_cli/ai/providers/base.py,sha256=X2Mp0acJm4WSEWgF6m7d30x5CjVBwkW4pzdHyETmjwc,1778
79
79
  titan_cli/ai/providers/gemini.py,sha256=hQwNe3wKXlORh6mE3vCHa-jm1vCJStqTmZLxDbaFUcA,10004
80
- titan_cli/cli.py,sha256=PpziNMB7TIW_-KDSbeUxkhVEaWwOSiKeaImcs0CNkJ0,1431
80
+ titan_cli/cli.py,sha256=qgPl0IDKG-PBJK7DfGemod5652hys1a2CuMWIR7cDbY,2573
81
81
  titan_cli/clients/__init__.py,sha256=gI2mQ8JeuqFa8u7XAbYlyjOph1Z5VR42NnLOjq65iD4,22
82
82
  titan_cli/clients/gcloud_client.py,sha256=BXc7PWqcWIjF4-l2GV3w__r11MmfPtl8OW5TFw4hgr4,1902
83
83
  titan_cli/core/__init__.py,sha256=Z5dxtLlHbAQu79NUqjlA7Ovh9toDM2B9PiVv0J-kWGQ,71
@@ -138,9 +138,9 @@ titan_cli/ui/tui/widgets/status_bar.py,sha256=7pbDfdorHM4JGf5qsjI0Z60G6MEJnMH466
138
138
  titan_cli/ui/tui/widgets/table.py,sha256=uWXyUda6mvflBybrrUSZh5Nvf794ege8SUe_0D24y3c,1668
139
139
  titan_cli/ui/tui/widgets/text.py,sha256=p5h2V9w-JmPigwUFn-ky_D7gyYiix_93FJNqNmCYNHY,4057
140
140
  titan_cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
- titan_cli/utils/autoupdate.py,sha256=s90BN_5_jvvJVgMpMXxI5KbFzst0SBBn7ELCh28SCYs,4140
142
- titan_cli-0.1.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
143
- titan_cli-0.1.1.dist-info/METADATA,sha256=ga09v13ZzFk6i97Kps2xS7Gxyvq0GT26UXD1A0Nlo8c,4526
144
- titan_cli-0.1.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
145
- titan_cli-0.1.1.dist-info/entry_points.txt,sha256=i_Zucivhsx6FcrkKDQS00MJ_Nwse-nAEkuksCcs_Ym8,186
146
- titan_cli-0.1.1.dist-info/RECORD,,
141
+ titan_cli/utils/autoupdate.py,sha256=Tq3SJp3iOMNONQZOw-48G6AmpKrPOyWV9RxuCA03q4M,4151
142
+ titan_cli-0.1.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
143
+ titan_cli-0.1.2.dist-info/METADATA,sha256=ZhF_YczaaFKY8lzbs_ltDHYNKCvOVgR8ZKv5GvaQlKA,4526
144
+ titan_cli-0.1.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
145
+ titan_cli-0.1.2.dist-info/entry_points.txt,sha256=i_Zucivhsx6FcrkKDQS00MJ_Nwse-nAEkuksCcs_Ym8,186
146
+ titan_cli-0.1.2.dist-info/RECORD,,
@@ -50,18 +50,19 @@ class JiraClient:
50
50
  JIRA Server/Next uses Basic Auth with Personal Access Token.
51
51
  For JIRA Cloud: API tokens can be created at https://id.atlassian.com/manage/api-tokens
52
52
  """
53
+ # Validate before processing
54
+ if not base_url:
55
+ raise JiraAPIError("JIRA base URL not provided")
56
+
57
+ if not api_token:
58
+ raise JiraAPIError("JIRA API token not provided")
59
+
53
60
  self.base_url = base_url.rstrip("/")
54
61
  self.email = email
55
62
  self.api_token = api_token
56
63
  self.project_key = project_key
57
64
  self.timeout = timeout
58
65
 
59
- if not self.api_token:
60
- raise JiraAPIError("JIRA API token not provided")
61
-
62
- if not self.base_url:
63
- raise JiraAPIError("JIRA base URL not provided")
64
-
65
66
  if not self.email:
66
67
  raise JiraAPIError("JIRA user email not provided")
67
68