exemplar-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.
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/PKG-INFO +2 -2
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/prompts.py +16 -13
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/pyproject.toml +2 -2
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/README.md +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/__init__.py +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/_scopes.py +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/_skill_targets.py +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/doctor.py +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/main.py +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/memory.py +0 -0
- {exemplar_cli-0.1.6 → exemplar_cli-0.1.7}/exemplar_cli/skills.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: exemplar-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: Exemplar terminal CLI for skills, prompts, gateway catalog, and memory
|
|
5
5
|
License: LicenseRef-Proprietary
|
|
6
6
|
Author: Exemplar Dev LLC
|
|
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Requires-Dist: exemplar-core (>=0.1.
|
|
13
|
+
Requires-Dist: exemplar-core (>=0.1.6,<0.2)
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
|
|
16
16
|
# exemplar-cli
|
|
@@ -29,8 +29,11 @@ def _cmd_list(args: argparse.Namespace) -> int:
|
|
|
29
29
|
return 0
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
_PROMPT_REF_HELP = "Prompt ID (prompt_…) or unique name"
|
|
33
|
+
|
|
34
|
+
|
|
32
35
|
def _cmd_get(args: argparse.Namespace) -> int:
|
|
33
|
-
record = prompts_from_env().get(args.
|
|
36
|
+
record = prompts_from_env().get(args.prompt_ref)
|
|
34
37
|
if args.json:
|
|
35
38
|
print(json.dumps(_record_dict(record), indent=2))
|
|
36
39
|
return 0
|
|
@@ -77,7 +80,7 @@ def _cmd_run(args: argparse.Namespace) -> int:
|
|
|
77
80
|
return 1
|
|
78
81
|
key, value = pair.split("=", 1)
|
|
79
82
|
variables[key.strip()] = value
|
|
80
|
-
result = prompts_from_env().run(args.
|
|
83
|
+
result = prompts_from_env().run(args.prompt_ref, variables=variables, model=args.model)
|
|
81
84
|
if args.json:
|
|
82
85
|
print(json.dumps(result, indent=2))
|
|
83
86
|
else:
|
|
@@ -90,7 +93,7 @@ def _cmd_publish(args: argparse.Namespace) -> int:
|
|
|
90
93
|
if args.user:
|
|
91
94
|
messages.append({"role": "user", "content": args.user})
|
|
92
95
|
record = prompts_from_env().publish_version(
|
|
93
|
-
args.
|
|
96
|
+
args.prompt_ref,
|
|
94
97
|
messages=messages,
|
|
95
98
|
change_notes=args.notes,
|
|
96
99
|
)
|
|
@@ -102,8 +105,8 @@ def _cmd_publish(args: argparse.Namespace) -> int:
|
|
|
102
105
|
|
|
103
106
|
|
|
104
107
|
def _cmd_delete(args: argparse.Namespace) -> int:
|
|
105
|
-
prompts_from_env().delete(args.
|
|
106
|
-
print(f"Deleted {args.
|
|
108
|
+
prompts_from_env().delete(args.prompt_ref)
|
|
109
|
+
print(f"Deleted {args.prompt_ref}")
|
|
107
110
|
return 0
|
|
108
111
|
|
|
109
112
|
|
|
@@ -120,8 +123,8 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
120
123
|
" exemplar prompts list\n"
|
|
121
124
|
" exemplar prompts create support-summary --title \"Support\" \\\n"
|
|
122
125
|
" --system \"Be concise.\" --user \"Topic: {{topic}}.\" --variables topic\n"
|
|
123
|
-
" exemplar prompts run
|
|
124
|
-
" exemplar prompts publish
|
|
126
|
+
" exemplar prompts run incident-summary --var topic=returns\n"
|
|
127
|
+
" exemplar prompts publish incident-summary --system \"Be concise.\" --notes \"v2\"\n"
|
|
125
128
|
),
|
|
126
129
|
)
|
|
127
130
|
sub = parser.add_subparsers(dest="command", required=True, metavar="COMMAND")
|
|
@@ -138,10 +141,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
138
141
|
|
|
139
142
|
get_p = sub.add_parser(
|
|
140
143
|
"get",
|
|
141
|
-
help="Show prompt messages by ID",
|
|
144
|
+
help="Show prompt messages by ID or name",
|
|
142
145
|
description="Fetch a prompt and print its message templates (or full record with --json).",
|
|
143
146
|
)
|
|
144
|
-
get_p.add_argument("
|
|
147
|
+
get_p.add_argument("prompt_ref", metavar="ID_OR_NAME", help=_PROMPT_REF_HELP)
|
|
145
148
|
get_p.add_argument("--json", action="store_true", help="Output full prompt record as JSON")
|
|
146
149
|
get_p.set_defaults(func=_cmd_get)
|
|
147
150
|
|
|
@@ -186,7 +189,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
186
189
|
help="Execute a prompt with template variables",
|
|
187
190
|
description="Run a prompt through the Exemplar platform and print the model response.",
|
|
188
191
|
)
|
|
189
|
-
run_p.add_argument("
|
|
192
|
+
run_p.add_argument("prompt_ref", metavar="ID_OR_NAME", help=_PROMPT_REF_HELP)
|
|
190
193
|
run_p.add_argument(
|
|
191
194
|
"--var",
|
|
192
195
|
action="append",
|
|
@@ -202,7 +205,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
202
205
|
help="Publish a new version of an existing prompt",
|
|
203
206
|
description="Add a new immutable version with updated messages and change notes.",
|
|
204
207
|
)
|
|
205
|
-
publish_p.add_argument("
|
|
208
|
+
publish_p.add_argument("prompt_ref", metavar="ID_OR_NAME", help=_PROMPT_REF_HELP)
|
|
206
209
|
publish_p.add_argument("--system", required=True, help="System message for the new version")
|
|
207
210
|
publish_p.add_argument("--user", help="User message template for the new version")
|
|
208
211
|
publish_p.add_argument(
|
|
@@ -216,9 +219,9 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
216
219
|
delete_p = sub.add_parser(
|
|
217
220
|
"delete",
|
|
218
221
|
help="Delete a prompt from the registry",
|
|
219
|
-
description="Permanently remove a prompt template by ID.",
|
|
222
|
+
description="Permanently remove a prompt template by ID or unique name.",
|
|
220
223
|
)
|
|
221
|
-
delete_p.add_argument("
|
|
224
|
+
delete_p.add_argument("prompt_ref", metavar="ID_OR_NAME", help=_PROMPT_REF_HELP)
|
|
222
225
|
delete_p.set_defaults(func=_cmd_delete)
|
|
223
226
|
|
|
224
227
|
return parser
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "exemplar-cli"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.7"
|
|
4
4
|
description = "Exemplar terminal CLI for skills, prompts, gateway catalog, and memory"
|
|
5
5
|
authors = ["Exemplar Dev LLC"]
|
|
6
6
|
license = "LicenseRef-Proprietary"
|
|
@@ -9,7 +9,7 @@ packages = [{ include = "exemplar_cli" }]
|
|
|
9
9
|
|
|
10
10
|
[tool.poetry.dependencies]
|
|
11
11
|
python = ">=3.10,<4.0"
|
|
12
|
-
exemplar-core = ">=0.1.
|
|
12
|
+
exemplar-core = ">=0.1.6,<0.2"
|
|
13
13
|
|
|
14
14
|
[tool.poetry.scripts]
|
|
15
15
|
exemplar = "exemplar_cli.main:main"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|