fere-cli 0.2.3.dev21__py3-none-any.whl → 0.3.0.dev23__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.
fere_cli/commands/auth.py CHANGED
@@ -1,17 +1,14 @@
1
- """Auth commands: fere auth, fere whoami, fere credits, fere claim-daily."""
1
+ """Auth commands: fere auth, fere whoami, fere credits."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import dataclasses
6
- from datetime import datetime
7
-
8
5
  import click
9
6
  from fere_sdk import FereClient
10
7
  from rich.console import Console
11
8
 
12
9
  from ..async_util import async_command, get_client, is_tty
13
10
  from ..config import load_config, save_config
14
- from ..output import is_json_mode, print_error, print_success
11
+ from ..output import print_error, print_success
15
12
 
16
13
  console = Console()
17
14
 
@@ -100,62 +97,3 @@ async def credits(ctx):
100
97
  except Exception as e:
101
98
  print_error(str(e))
102
99
  raise SystemExit(1)
103
-
104
-
105
- def _fmt_dt(value: str | None) -> str:
106
- """Format an ISO 8601 UTC datetime string in the local timezone."""
107
- if not value:
108
- return ""
109
- try:
110
- dt = datetime.fromisoformat(value.replace("Z", "+00:00")).astimezone()
111
- tz_name = dt.strftime("%Z") or dt.strftime("%z")
112
- return (dt.strftime("%b %d, %Y at %I:%M %p ") + tz_name).replace(
113
- " 0", " "
114
- )
115
- except ValueError:
116
- return value
117
-
118
-
119
- @click.command(name="claim-daily")
120
- @click.pass_context
121
- @async_command
122
- async def claim_daily_credits(ctx):
123
- """Claim your daily credits bonus."""
124
- try:
125
- client = await get_client(ctx)
126
- result = await client.claim_daily_credits()
127
- await client.close()
128
-
129
- data = dataclasses.asdict(result)
130
- if not result.success:
131
- if result.error == "claim_cooldown":
132
- msg = (
133
- "Already claimed today."
134
- f" Next claim available at"
135
- f" {_fmt_dt(result.next_claim_available_at)}"
136
- if result.next_claim_available_at
137
- else "Already claimed today."
138
- )
139
- elif result.error == "balance_too_high":
140
- bal = result.current_balance
141
- msg = (
142
- f"Balance too high to claim (current: {bal} credits)."
143
- if bal is not None
144
- else "Balance too high to claim."
145
- )
146
- elif result.error == "user_not_found":
147
- msg = "User not found. Try logging in again."
148
- else:
149
- msg = result.error or "Daily claim failed."
150
- print_error(msg, details=data)
151
- raise SystemExit(1)
152
- if not is_json_mode() and data.get("next_claim_available_at"):
153
- data["next_claim_available_at"] = _fmt_dt(
154
- data["next_claim_available_at"]
155
- )
156
- print_success(data)
157
- except click.ClickException:
158
- raise
159
- except Exception as e:
160
- print_error(str(e))
161
- raise SystemExit(1)
fere_cli/main.py CHANGED
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  import click
6
6
 
7
7
  from . import __version__
8
- from .commands.auth import auth, claim_daily_credits, credits, whoami
8
+ from .commands.auth import auth, credits, whoami
9
9
  from .commands.chat import chat, threads
10
10
  from .commands.earn import earn
11
11
  from .commands.hooks import hooks
@@ -72,7 +72,6 @@ def cli(ctx, output_json, quiet, agent, base_url):
72
72
  cli.add_command(auth)
73
73
  cli.add_command(whoami)
74
74
  cli.add_command(credits)
75
- cli.add_command(claim_daily_credits, name="claim-daily")
76
75
 
77
76
  # Chat
78
77
  cli.add_command(chat)
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fere-cli
3
- Version: 0.2.3.dev21
3
+ Version: 0.3.0.dev23
4
4
  Summary: Terminal CLI for FereAI crypto trading and research
5
5
  Author-email: Fere AI <info@fere.ai>
6
6
  License-Expression: MIT
7
7
  Requires-Python: >=3.10
8
8
  Requires-Dist: click>=8.1
9
- Requires-Dist: fere-sdk>=0.2.3.dev21
9
+ Requires-Dist: fere-sdk>=0.3.0.dev23
10
10
  Requires-Dist: httpx>=0.27
11
11
  Requires-Dist: rich>=13.0
12
12
  Provides-Extra: dev
@@ -2,11 +2,11 @@ fere_cli/__init__.py,sha256=tQ7Vp1LCPsoI2hRFNekAZOEep_rO7TGuqhUqlm0ZMtU,341
2
2
  fere_cli/async_util.py,sha256=Ai832fD956lcDdYrTSbe59iU1Dl59rRZRODFz3KA9lU,1562
3
3
  fere_cli/banner.py,sha256=CE_sW4j460C3wGMwPVriZH-AJpWlGBHBxP1-h7DZUUM,823
4
4
  fere_cli/config.py,sha256=BIVr6ViLCWCEloWbxF0aekS4uSrvbUVzbSN1q9dHh_o,1574
5
- fere_cli/main.py,sha256=CDiWgb-4OPiVUakDq6wT6p5fYLGH3HKcdLcqfxGowTo,2510
5
+ fere_cli/main.py,sha256=WEisxeiVr4ut4_mhPl2__ci0DX6kKQYdlxp488gYWy8,2432
6
6
  fere_cli/output.py,sha256=j_2iad_g_IqySnHf0Zqh9HD7H2q_DeUHv2OlNGhBcBM,3647
7
7
  fere_cli/update.py,sha256=vsdQTC_ue6xLpwvJGVmNt89XT64vfYV_S-vtumJEDiM,9731
8
8
  fere_cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- fere_cli/commands/auth.py,sha256=xH9noLJ2SSCKsSvAUkfwM30CypCWEp7qeT_f_DzUzxE,4703
9
+ fere_cli/commands/auth.py,sha256=0tyoQZuGRNm53ZB88kLbG4cqfay_HR8Ju5A63e08J-s,2550
10
10
  fere_cli/commands/chat.py,sha256=YF_bI3HBY6vOrPMYjRrvPWP74kfqwIBIcAfb9ZI47_c,5106
11
11
  fere_cli/commands/earn.py,sha256=wDUmB7ZyQ4K2xGxm54WnnBFQiSZqThuC-h1J_yu4ito,3501
12
12
  fere_cli/commands/hooks.py,sha256=e3A1TD_qBt-I3zbQ_Wyf3oWhSceCQwFx0Wvn17Z74R4,2007
@@ -14,7 +14,7 @@ fere_cli/commands/limit_order.py,sha256=Hv-9_erKUlyYE97IhSS9XOMJDrJy3qF7z-SA_ed7
14
14
  fere_cli/commands/portfolio.py,sha256=7JJOIolmlud6yWStw7iv9GCOH1igOilKUJzPr7ixx2g,1758
15
15
  fere_cli/commands/swap.py,sha256=v4urnENxLiwiGhSPTMDGEgRA0iglAC41xN_65h6xWw0,2507
16
16
  fere_cli/commands/utility.py,sha256=0icyDsouq-NchWg_CY2WdrH9VoQjg1WBybkkmZgknAg,2198
17
- fere_cli-0.2.3.dev21.dist-info/METADATA,sha256=bwSBmbFXRZcWaKGUVlA1gKLA40XbO8TBe5XAnCpCfrg,3746
18
- fere_cli-0.2.3.dev21.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
19
- fere_cli-0.2.3.dev21.dist-info/entry_points.txt,sha256=vOltZxMv_RJwS1AqO3UstqpRp74xPd4UMlf62Ma-fWM,43
20
- fere_cli-0.2.3.dev21.dist-info/RECORD,,
17
+ fere_cli-0.3.0.dev23.dist-info/METADATA,sha256=OMYUBMpBrEpbdVyz7k8VlKp2P1ZsxEf_wPvnDHn58NU,3746
18
+ fere_cli-0.3.0.dev23.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
19
+ fere_cli-0.3.0.dev23.dist-info/entry_points.txt,sha256=vOltZxMv_RJwS1AqO3UstqpRp74xPd4UMlf62Ma-fWM,43
20
+ fere_cli-0.3.0.dev23.dist-info/RECORD,,