crowdtime-cli 0.12.0__tar.gz → 0.12.2__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.
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/PKG-INFO +1 -1
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/pyproject.toml +1 -1
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/__init__.py +1 -1
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/client.py +2 -2
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/projects_cmd.py +19 -9
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/.gitignore +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/LICENSE +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/README.md +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/auth.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/__init__.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/ai_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/auth_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/billing_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/clients_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/config_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/expense_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/favorites_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/insights_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/invoice_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/log_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/org_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/payroll_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/report_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/skill_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/tasks_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/team_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/timer_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/timesheet_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/commands/version_cmd.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/config.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/formatters.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/main.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/models.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/oauth.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/resolvers.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/skills/crowdtime/SKILL.md +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/skills/crowdtime/references/commands.md +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/skills/crowdtime/references/workflows.md +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/utils.py +0 -0
- {crowdtime_cli-0.12.0 → crowdtime_cli-0.12.2}/src/crowdtime_cli/version_check.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crowdtime-cli
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.2
|
|
4
4
|
Summary: AI-powered time tracking CLI — a modern, developer-friendly alternative to Harvest
|
|
5
5
|
Project-URL: Homepage, https://crowdtime.lat
|
|
6
6
|
Project-URL: Documentation, https://crowdtime.lat/docs
|
|
@@ -40,7 +40,7 @@ class CrowdTimeClient:
|
|
|
40
40
|
|
|
41
41
|
if require_auth and not self.token:
|
|
42
42
|
console.print(
|
|
43
|
-
"[red]Not authenticated.[/red] Please run [bold]ct login[/bold] first."
|
|
43
|
+
"[red]Not authenticated.[/red] Please run [bold]ct auth login[/bold] first."
|
|
44
44
|
)
|
|
45
45
|
raise SystemExit(1)
|
|
46
46
|
|
|
@@ -133,7 +133,7 @@ class CrowdTimeClient:
|
|
|
133
133
|
|
|
134
134
|
if response.status_code == 401:
|
|
135
135
|
console.print(
|
|
136
|
-
"[red]Authentication failed.[/red] Please run [bold]ct login[/bold] to re-authenticate."
|
|
136
|
+
"[red]Authentication failed.[/red] Please run [bold]ct auth login[/bold] to re-authenticate."
|
|
137
137
|
)
|
|
138
138
|
raise SystemExit(1)
|
|
139
139
|
|
|
@@ -13,6 +13,7 @@ from ..client import APIError, CrowdTimeClient
|
|
|
13
13
|
from ..config import get_config
|
|
14
14
|
from ..formatters import extract_results, format_currency, format_error, format_projects_table, format_success, print_json
|
|
15
15
|
from ..models import Project
|
|
16
|
+
from ..resolvers import resolve_project
|
|
16
17
|
from ..utils import format_duration
|
|
17
18
|
|
|
18
19
|
app = typer.Typer(name="projects", help="Manage projects.")
|
|
@@ -82,7 +83,8 @@ def show(
|
|
|
82
83
|
client = CrowdTimeClient(require_auth=True, require_org=True)
|
|
83
84
|
|
|
84
85
|
try:
|
|
85
|
-
|
|
86
|
+
project_uuid = resolve_project(client, project_id)
|
|
87
|
+
data = client.get(f"/projects/{project_uuid}/")
|
|
86
88
|
project = Project(**data)
|
|
87
89
|
|
|
88
90
|
if output_json:
|
|
@@ -207,7 +209,8 @@ def archive(
|
|
|
207
209
|
client = CrowdTimeClient(require_auth=True, require_org=True)
|
|
208
210
|
|
|
209
211
|
try:
|
|
210
|
-
|
|
212
|
+
project_uuid = resolve_project(client, project_id)
|
|
213
|
+
data = client.patch(f"/projects/{project_uuid}/", data={"status": "archived"})
|
|
211
214
|
format_success(f"Project '{project_id}' archived.")
|
|
212
215
|
except APIError as e:
|
|
213
216
|
if e.status_code == 404:
|
|
@@ -304,7 +307,8 @@ def update(
|
|
|
304
307
|
raise typer.Exit(1)
|
|
305
308
|
|
|
306
309
|
try:
|
|
307
|
-
|
|
310
|
+
project_uuid = resolve_project(api_client, project_id)
|
|
311
|
+
data = api_client.patch(f"/projects/{project_uuid}/", data=payload)
|
|
308
312
|
project = Project(**data)
|
|
309
313
|
|
|
310
314
|
if output_json:
|
|
@@ -348,7 +352,8 @@ def budget(
|
|
|
348
352
|
|
|
349
353
|
try:
|
|
350
354
|
# Fetch project details for budget type and amount
|
|
351
|
-
|
|
355
|
+
project_uuid = resolve_project(client, project_id)
|
|
356
|
+
project_data = client.get(f"/projects/{project_uuid}/")
|
|
352
357
|
project = Project(**project_data)
|
|
353
358
|
|
|
354
359
|
# Trigger refresh if requested
|
|
@@ -455,7 +460,8 @@ def list_members(
|
|
|
455
460
|
client = CrowdTimeClient(require_auth=True, require_org=True)
|
|
456
461
|
|
|
457
462
|
try:
|
|
458
|
-
|
|
463
|
+
project_uuid = resolve_project(client, project_id)
|
|
464
|
+
data = client.get(f"/projects/{project_uuid}/members/")
|
|
459
465
|
members_list = data if isinstance(data, list) else extract_results(data)
|
|
460
466
|
|
|
461
467
|
if output_json:
|
|
@@ -513,7 +519,8 @@ def list_tasks(
|
|
|
513
519
|
client = CrowdTimeClient(require_auth=True, require_org=True)
|
|
514
520
|
|
|
515
521
|
try:
|
|
516
|
-
|
|
522
|
+
project_uuid = resolve_project(client, project_id)
|
|
523
|
+
data = client.get(f"/projects/{project_uuid}/tasks/")
|
|
517
524
|
tasks_list = data if isinstance(data, list) else extract_results(data)
|
|
518
525
|
|
|
519
526
|
if output_json:
|
|
@@ -584,7 +591,8 @@ def update_member(
|
|
|
584
591
|
raise typer.Exit(1)
|
|
585
592
|
|
|
586
593
|
try:
|
|
587
|
-
|
|
594
|
+
project_uuid = resolve_project(client, project_id)
|
|
595
|
+
data = client.patch(f"/projects/{project_uuid}/members/{user_id}/", data=payload)
|
|
588
596
|
if output_json:
|
|
589
597
|
print_json(data)
|
|
590
598
|
else:
|
|
@@ -633,7 +641,8 @@ def add_members_bulk(
|
|
|
633
641
|
members.append(entry)
|
|
634
642
|
|
|
635
643
|
try:
|
|
636
|
-
|
|
644
|
+
project_uuid = resolve_project(client, project_id)
|
|
645
|
+
data = client.post(f"/projects/{project_uuid}/members/bulk/", data={"members": members})
|
|
637
646
|
result = extract_results(data) or data
|
|
638
647
|
|
|
639
648
|
if output_json:
|
|
@@ -660,7 +669,8 @@ def add_tasks_bulk(
|
|
|
660
669
|
client = CrowdTimeClient(require_auth=True, require_org=True)
|
|
661
670
|
|
|
662
671
|
try:
|
|
663
|
-
|
|
672
|
+
project_uuid = resolve_project(client, project_id)
|
|
673
|
+
data = client.post(f"/projects/{project_uuid}/tasks/bulk/", data={"task_ids": tasks})
|
|
664
674
|
result = extract_results(data) or data
|
|
665
675
|
|
|
666
676
|
if output_json:
|
|
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
|