@cliptude/cli 0.1.2 → 0.1.3
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.
- package/README.md +3 -3
- package/cliptude_mcp/__pycache__/cli.cpython-313.pyc +0 -0
- package/cliptude_mcp/__pycache__/client.cpython-313.pyc +0 -0
- package/cliptude_mcp/cli.py +33 -3
- package/cliptude_mcp/client.py +3 -0
- package/cliptude_mcp/server.py +5 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/README.md
CHANGED
|
@@ -19,17 +19,17 @@ cliptude auth login
|
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
cliptude templates
|
|
22
|
-
cliptude generate --template "Finance vector weekly" --title "Why index funds win" --prompt "
|
|
22
|
+
cliptude generate --template "Finance vector weekly" --title "Why index funds win" --prompt "why most retail traders underperform the S&P over 10 years, keep it for beginners" --duration 3-4
|
|
23
23
|
cliptude generate --template "Finance vector weekly" --title "Why index funds win" --script-file script.txt
|
|
24
24
|
cliptude status <job-id>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`--title` is required. `generate` returns immediately (`queued`). Poll `status`.
|
|
27
|
+
`--title` is required. Optional `--duration` is a wizard bucket (`3-4`, `6-8`, `10-12`, …). Omit it to use the template duration, or the word-count estimate when you pass `--script`. `generate` returns immediately (`queued`). Poll `status`.
|
|
28
28
|
|
|
29
29
|
Faceless bring-your-own coding:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
cliptude generate --template "My Faceless" --title "
|
|
32
|
+
cliptude generate --template "My Faceless" --title "Why index funds win" --prompt "why most retail traders underperform the S&P over 10 years, keep it for beginners" --faceless-coding external
|
|
33
33
|
cliptude kit <job-id> --out ./kit.zip
|
|
34
34
|
cliptude submit-project <job-id> ./project.zip
|
|
35
35
|
```
|
|
Binary file
|
|
Binary file
|
package/cliptude_mcp/cli.py
CHANGED
|
@@ -63,7 +63,17 @@ def _run_auth(auth_cmd: str) -> None:
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
def main(argv: list[str] | None = None) -> None:
|
|
66
|
-
parser = argparse.ArgumentParser(
|
|
66
|
+
parser = argparse.ArgumentParser(
|
|
67
|
+
prog="cliptude",
|
|
68
|
+
description="Cliptude jobs CLI",
|
|
69
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
70
|
+
epilog=(
|
|
71
|
+
"example:\n"
|
|
72
|
+
' cliptude generate --template "Finance vector weekly" --title "Why index funds win" '
|
|
73
|
+
'--prompt "why most retail traders underperform the S&P over 10 years, keep it for beginners" '
|
|
74
|
+
'--duration 3-4'
|
|
75
|
+
),
|
|
76
|
+
)
|
|
67
77
|
sub = parser.add_subparsers(dest="cmd", required=True)
|
|
68
78
|
|
|
69
79
|
auth = sub.add_parser("auth", help="Sign in with a browser")
|
|
@@ -76,10 +86,24 @@ def main(argv: list[str] | None = None) -> None:
|
|
|
76
86
|
t.add_argument("--limit", type=int, default=20)
|
|
77
87
|
t.add_argument("--offset", type=int, default=0)
|
|
78
88
|
|
|
79
|
-
g = sub.add_parser(
|
|
89
|
+
g = sub.add_parser(
|
|
90
|
+
"generate",
|
|
91
|
+
help="Start a job",
|
|
92
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
93
|
+
epilog=(
|
|
94
|
+
"example:\n"
|
|
95
|
+
' cliptude generate --template "Finance vector weekly" --title "Why index funds win" '
|
|
96
|
+
'--prompt "why most retail traders underperform the S&P over 10 years, keep it for beginners" '
|
|
97
|
+
'--duration 3-4'
|
|
98
|
+
),
|
|
99
|
+
)
|
|
80
100
|
g.add_argument("--template", required=True, help="Template name or UUID")
|
|
81
101
|
g.add_argument("--title", required=True)
|
|
82
|
-
g.add_argument(
|
|
102
|
+
g.add_argument(
|
|
103
|
+
"--prompt",
|
|
104
|
+
default="",
|
|
105
|
+
help='Topic or brief, e.g. "why most retail traders underperform the S&P over 10 years, keep it for beginners"',
|
|
106
|
+
)
|
|
83
107
|
g.add_argument("--script", default="")
|
|
84
108
|
g.add_argument("--script-file", default="")
|
|
85
109
|
g.add_argument(
|
|
@@ -87,6 +111,11 @@ def main(argv: list[str] | None = None) -> None:
|
|
|
87
111
|
default="",
|
|
88
112
|
help="external = you author Faceless storyboard/HTML; omit for Cliptude coding",
|
|
89
113
|
)
|
|
114
|
+
g.add_argument(
|
|
115
|
+
"--duration",
|
|
116
|
+
default="",
|
|
117
|
+
help="Wizard duration bucket, e.g. 3-4 or 6-8. Default: template duration (or estimated from --script)",
|
|
118
|
+
)
|
|
90
119
|
|
|
91
120
|
k = sub.add_parser("kit", help="Download Faceless coding kit zip")
|
|
92
121
|
k.add_argument("job_id")
|
|
@@ -129,6 +158,7 @@ def main(argv: list[str] | None = None) -> None:
|
|
|
129
158
|
prompt=args.prompt or None,
|
|
130
159
|
script=script or None,
|
|
131
160
|
faceless_coding=(args.faceless_coding or None),
|
|
161
|
+
duration=(args.duration or None),
|
|
132
162
|
))
|
|
133
163
|
elif args.cmd == "kit":
|
|
134
164
|
dest = Path(args.out)
|
package/cliptude_mcp/client.py
CHANGED
|
@@ -144,6 +144,7 @@ class CliptudeClient:
|
|
|
144
144
|
prompt: str | None = None,
|
|
145
145
|
script: str | None = None,
|
|
146
146
|
faceless_coding: str | None = None,
|
|
147
|
+
duration: str | None = None,
|
|
147
148
|
) -> Any:
|
|
148
149
|
body: dict[str, Any] = {"template_id": template_id, "title": title}
|
|
149
150
|
if prompt:
|
|
@@ -152,6 +153,8 @@ class CliptudeClient:
|
|
|
152
153
|
body["script"] = script
|
|
153
154
|
if faceless_coding:
|
|
154
155
|
body["faceless_coding"] = faceless_coding
|
|
156
|
+
if duration:
|
|
157
|
+
body["duration"] = duration
|
|
155
158
|
return self.request("POST", "/api/v1/jobs", json_body=body)
|
|
156
159
|
|
|
157
160
|
def get_job(self, job_id: str) -> Any:
|
package/cliptude_mcp/server.py
CHANGED
|
@@ -92,6 +92,10 @@ def build_server(*, with_http_auth: bool = False):
|
|
|
92
92
|
str | None,
|
|
93
93
|
Field(description='Use "external" for Faceless Explainer BYO HTML. Omit for Cliptude coding.'),
|
|
94
94
|
] = None,
|
|
95
|
+
duration: Annotated[
|
|
96
|
+
str | None,
|
|
97
|
+
Field(description="Wizard duration bucket such as 3-4 or 6-8. Omit to use the template (or estimate from script)."),
|
|
98
|
+
] = None,
|
|
95
99
|
) -> dict[str, Any]:
|
|
96
100
|
"""Start generation and return a job id immediately. Do not wait for the MP4. Poll get_job. Provide prompt and/or script."""
|
|
97
101
|
try:
|
|
@@ -101,6 +105,7 @@ def build_server(*, with_http_auth: bool = False):
|
|
|
101
105
|
prompt=prompt,
|
|
102
106
|
script=script,
|
|
103
107
|
faceless_coding=faceless_coding,
|
|
108
|
+
duration=duration,
|
|
104
109
|
)
|
|
105
110
|
except Exception as exc:
|
|
106
111
|
return _err(exc)
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED