jvcli 2.0.3__py3-none-any.whl → 2.0.5__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.
- jvcli/__init__.py +1 -1
- jvcli/cli.py +2 -0
- jvcli/client/lib/utils.py +1 -1
- jvcli/commands/startproject.py +67 -0
- jvcli/templates/2.0.0/project/env.example +13 -0
- jvcli/templates/2.0.0/project/globals.jac +2 -0
- jvcli/templates/2.0.0/project/main.jac +2 -0
- {jvcli-2.0.3.dist-info → jvcli-2.0.5.dist-info}/METADATA +7 -1
- {jvcli-2.0.3.dist-info → jvcli-2.0.5.dist-info}/RECORD +13 -9
- {jvcli-2.0.3.dist-info → jvcli-2.0.5.dist-info}/WHEEL +1 -1
- {jvcli-2.0.3.dist-info → jvcli-2.0.5.dist-info}/LICENSE +0 -0
- {jvcli-2.0.3.dist-info → jvcli-2.0.5.dist-info}/entry_points.txt +0 -0
- {jvcli-2.0.3.dist-info → jvcli-2.0.5.dist-info}/top_level.txt +0 -0
jvcli/__init__.py
CHANGED
jvcli/cli.py
CHANGED
@@ -9,6 +9,7 @@ from jvcli.commands.create import create
|
|
9
9
|
from jvcli.commands.download import download
|
10
10
|
from jvcli.commands.info import info
|
11
11
|
from jvcli.commands.publish import publish
|
12
|
+
from jvcli.commands.startproject import startproject
|
12
13
|
from jvcli.commands.studio import studio
|
13
14
|
from jvcli.commands.update import update
|
14
15
|
|
@@ -28,6 +29,7 @@ jvcli.add_command(publish)
|
|
28
29
|
jvcli.add_command(info)
|
29
30
|
jvcli.add_command(studio)
|
30
31
|
jvcli.add_command(client)
|
32
|
+
jvcli.add_command(startproject)
|
31
33
|
|
32
34
|
# Register standalone commands
|
33
35
|
jvcli.add_command(signup)
|
jvcli/client/lib/utils.py
CHANGED
@@ -0,0 +1,67 @@
|
|
1
|
+
"""Start project command."""
|
2
|
+
|
3
|
+
import os
|
4
|
+
|
5
|
+
import click
|
6
|
+
|
7
|
+
from jvcli import __supported__jivas__versions__
|
8
|
+
from jvcli.utils import TEMPLATES_DIR
|
9
|
+
|
10
|
+
|
11
|
+
@click.command()
|
12
|
+
@click.argument("project_name")
|
13
|
+
@click.option(
|
14
|
+
"--version",
|
15
|
+
default=max(__supported__jivas__versions__),
|
16
|
+
show_default=True,
|
17
|
+
help="Jivas project version to use for scaffolding.",
|
18
|
+
)
|
19
|
+
def startproject(project_name: str, version: str) -> None:
|
20
|
+
"""
|
21
|
+
Initialize a new Jivas project with the necessary structure.
|
22
|
+
|
23
|
+
Usage:
|
24
|
+
jvcli startproject <project_name> [--version <jivas_version>]
|
25
|
+
"""
|
26
|
+
template_path = os.path.join(TEMPLATES_DIR, version, "project")
|
27
|
+
|
28
|
+
if not os.path.exists(template_path):
|
29
|
+
click.secho(f"Template for Jivas version {version} not found.", fg="red")
|
30
|
+
return
|
31
|
+
|
32
|
+
project_structure: dict = {
|
33
|
+
"tests": [],
|
34
|
+
"actions": [],
|
35
|
+
"daf": [],
|
36
|
+
"scripts": [],
|
37
|
+
}
|
38
|
+
|
39
|
+
try:
|
40
|
+
print(f"Creating project: {project_name} (Version: {version})")
|
41
|
+
os.makedirs(project_name, exist_ok=True)
|
42
|
+
|
43
|
+
# Create directories
|
44
|
+
for folder in project_structure.keys():
|
45
|
+
os.makedirs(os.path.join(project_name, folder), exist_ok=True)
|
46
|
+
|
47
|
+
# Copy template files from the selected version
|
48
|
+
for filename in ["main.jac", "globals.jac", "env.example"]:
|
49
|
+
template_file_path = os.path.join(template_path, filename)
|
50
|
+
if os.path.exists(template_file_path):
|
51
|
+
with open(template_file_path, "r") as template_file:
|
52
|
+
contents = template_file.read()
|
53
|
+
|
54
|
+
# Write `.env` instead of `env.example`
|
55
|
+
target_filename = ".env" if filename == "env.example" else filename
|
56
|
+
with open(
|
57
|
+
os.path.join(project_name, target_filename), "w"
|
58
|
+
) as project_file:
|
59
|
+
project_file.write(contents)
|
60
|
+
|
61
|
+
click.secho(
|
62
|
+
f"Successfully created Jivas project: {project_name} (Version: {version})",
|
63
|
+
fg="green",
|
64
|
+
)
|
65
|
+
|
66
|
+
except Exception as e:
|
67
|
+
click.secho(f"Error creating project: {e}", fg="red")
|
@@ -0,0 +1,13 @@
|
|
1
|
+
JIVAS_USER=admin@jivas.com
|
2
|
+
JIVAS_PASSWORD=password
|
3
|
+
JIVAS_PORT=8000
|
4
|
+
JIVAS_BASE_URL=http://localhost:8000
|
5
|
+
JIVAS_STUDIO_URL=http://localhost:8989
|
6
|
+
JIVAS_FILES_URL=http://localhost:8000/files
|
7
|
+
JIVAS_DESCRIPTOR_ROOT_PATH=".jvdata"
|
8
|
+
JIVAS_ACTIONS_ROOT_PATH="actions"
|
9
|
+
JIVAS_DAF_ROOT_PATH="daf"
|
10
|
+
JIVAS_FILES_ROOT_PATH=".files"
|
11
|
+
JIVAS_WEBHOOK_SECRET_KEY="ABCDEFGHIJK"
|
12
|
+
JIVAS_ENVIRONMENT=development
|
13
|
+
JACPATH="./"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: jvcli
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.5
|
4
4
|
Summary: CLI tool for Jivas Package Repository
|
5
5
|
Home-page: https://github.com/TrueSelph/jvcli
|
6
6
|
Author: TrueSelph Inc.
|
@@ -70,6 +70,12 @@ To publish an action:
|
|
70
70
|
jvcli publish action --path ./my_action --visibility public
|
71
71
|
```
|
72
72
|
|
73
|
+
To start a new project:
|
74
|
+
|
75
|
+
```sh
|
76
|
+
jvcli startproject my_project
|
77
|
+
```
|
78
|
+
|
73
79
|
For more detailed usage, refer to the help command:
|
74
80
|
|
75
81
|
```sh
|
@@ -1,13 +1,13 @@
|
|
1
|
-
jvcli/__init__.py,sha256=
|
1
|
+
jvcli/__init__.py,sha256=PBj7YcQJHvAR2bcA7G1AIWNneChT6NOjlUrHAbb3BPQ,170
|
2
2
|
jvcli/api.py,sha256=gs0ZWf5T6nMJc6m1aGz6qZpqDHhYhhtVsvN6UYwtpAs,11113
|
3
3
|
jvcli/auth.py,sha256=p04T02ufqbENx_93oDPg3xsq7sv-Nabeq3YR1kLXfSg,1215
|
4
|
-
jvcli/cli.py,sha256=
|
4
|
+
jvcli/cli.py,sha256=VM_QGPiYfSdqOZ4n0YLZbrOwXm0d5lHmzv47MqTyBMc,1060
|
5
5
|
jvcli/utils.py,sha256=NKWjjJ45NFlwT7QVMh1YMY2zfvGaJ_8LppG4D8QXCwA,7726
|
6
6
|
jvcli/client/__init__.py,sha256=WGP05OBzZHReqENYs1qYqMnYvgAaNVW6KvGQvyB3NGs,85
|
7
7
|
jvcli/client/app.py,sha256=v494Q_uvw4gO9s4s_KlP_Zxd8g_IEG1BkefoEdppjxU,5464
|
8
8
|
jvcli/client/lib/__init__.py,sha256=_Wv8CNIxeIle_x0U9T6w9s5mPuOY9-0u69BvTEPXLUw,38
|
9
9
|
jvcli/client/lib/page.py,sha256=QF53ffO4A2P9QTdPFfi0baCpKyEMmfkLyhJNxm7pTb0,2225
|
10
|
-
jvcli/client/lib/utils.py,sha256=
|
10
|
+
jvcli/client/lib/utils.py,sha256=YJQGMBCuQnWDoSj-dGq8IHos3vc_I_sU160fHPV5-aM,9826
|
11
11
|
jvcli/client/lib/widgets.py,sha256=-YijWUNEgR93LoWiOEDUMi2_sgD_p-dbmkuR92NA-GU,9424
|
12
12
|
jvcli/client/pages/__init__.py,sha256=sXsBV8cGItWhXtYg8PkfCd1Vi5ibd-rv5LABnPC_St4,51
|
13
13
|
jvcli/client/pages/analytics_page.py,sha256=bNlIaMgWGHz_XO4Z2a0jzEUL1ryGR_4s8TDsyTjZP10,5660
|
@@ -21,6 +21,7 @@ jvcli/commands/create.py,sha256=-9Lcng3Ef6AMZwBcuXDgvJCuvWxB_dB_fQF5-OBCkqA,1339
|
|
21
21
|
jvcli/commands/download.py,sha256=AT6SFiJ9ysqNMDCdKsZ6CMUx96qpyzgraOk6EuNL2Qs,3417
|
22
22
|
jvcli/commands/info.py,sha256=NyIDpR_AGMMSFPE0tFZv4dIuv_gwqrfd589zQAA_Q3s,2685
|
23
23
|
jvcli/commands/publish.py,sha256=q1ihoL42GmEsU5ggHN3bcg8QD26kjRUZGfQpRzI2GMo,6630
|
24
|
+
jvcli/commands/startproject.py,sha256=lMKKUcYqwvACKV1Pm0Y6rEqNuazZnu2mcq_Ax1b-9gk,2119
|
24
25
|
jvcli/commands/studio.py,sha256=4acrd5Wpv5h2TBFPrzOQGyAtMpy8bQaqPh96Js9nod8,2761
|
25
26
|
jvcli/commands/update.py,sha256=LwCLg-W1b8WSdFkiiJ8WwTit2HJXTLpM5OQ4WBTe9C4,1997
|
26
27
|
jvcli/studio/index.html,sha256=a4UaOrpXsTrHTF1iN3VIWzF7wgVWvFCEzoFRw-tDPXc,474
|
@@ -36,9 +37,12 @@ jvcli/templates/2.0.0/agent_descriptor.yaml,sha256=h6_pxmaP-oJqLDCHAyZ1ckETfWD6D
|
|
36
37
|
jvcli/templates/2.0.0/agent_info.yaml,sha256=3olXRQDQG-543o7zSWWT23kJsK29QGhdx6-tOLXvCk8,207
|
37
38
|
jvcli/templates/2.0.0/agent_knowledge.yaml,sha256=hI0ifr0ICiZGce-oUFovBOmDWxGU1Z2M10WyZH_wS2g,284
|
38
39
|
jvcli/templates/2.0.0/agent_memory.yaml,sha256=_MBgObZcW1UzwWuYQVJiPZ_7TvYbGrDgd-xMuzJEkVo,9
|
39
|
-
jvcli
|
40
|
-
jvcli
|
41
|
-
jvcli
|
42
|
-
jvcli-2.0.
|
43
|
-
jvcli-2.0.
|
44
|
-
jvcli-2.0.
|
40
|
+
jvcli/templates/2.0.0/project/env.example,sha256=cQv5YeuEhxUmnDYE1sofCCPuPLAlHP88qnDl2DLd6R4,396
|
41
|
+
jvcli/templates/2.0.0/project/globals.jac,sha256=CEt7L25wEZfE6TupqpM1ilHbtJMQQWExDQ5GJlkHPts,56
|
42
|
+
jvcli/templates/2.0.0/project/main.jac,sha256=r37jsaGq-85YvDbHP3bQvBXk0u8w0rtRTZTNxZOjTW0,48
|
43
|
+
jvcli-2.0.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
44
|
+
jvcli-2.0.5.dist-info/METADATA,sha256=r-0Ai4kId6koQjfWXLjQ_k7iz0ZoiDtp8fPQkifFgF8,4179
|
45
|
+
jvcli-2.0.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
46
|
+
jvcli-2.0.5.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
|
47
|
+
jvcli-2.0.5.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
|
48
|
+
jvcli-2.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|