ai-workshop-taster 0.1.0

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.
Files changed (2) hide show
  1. package/index.mjs +42 -0
  2. package/package.json +26 -0
package/index.mjs ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ai-workshop-taster: copy the pre-workshop taster into a fresh folder.
4
+ *
5
+ * Wraps `tiged` (maintained degit fork): it downloads the latest commit of the public
6
+ * ai-workshop-taster repo as a tarball (no git history) into a clean folder you can run
7
+ * setup.sh in. Running this IS the readiness check for the real workshop's fetch step.
8
+ *
9
+ * npx ai-workshop-taster # -> ./ai-workshop-taster
10
+ * npx ai-workshop-taster my-folder # -> ./my-folder
11
+ *
12
+ * Then: cd <folder> && ./setup.sh
13
+ */
14
+ import tiged from "tiged";
15
+ import { existsSync } from "node:fs";
16
+
17
+ const REPO = "jagreehal/ai-workshop-taster";
18
+
19
+ async function main() {
20
+ const dest = process.argv[2] || "ai-workshop-taster";
21
+ if (existsSync(dest)) {
22
+ throw new Error(`Destination already exists: ${dest}`);
23
+ }
24
+
25
+ console.log(`\nCopying ${REPO} -> ${dest} ...`);
26
+
27
+ // Tarball mode keeps the public npx flow to one prerequisite: Node.js.
28
+ // Use git mode when testing against a private repo.
29
+ const mode = process.env.TASTER_TIGED_MODE === "git" ? "git" : "tar";
30
+ const emitter = tiged(REPO, { mode, cache: false, force: false, verbose: true });
31
+ await emitter.clone(dest);
32
+
33
+ console.log(
34
+ `\n✓ Done. Next:\n cd ${dest}\n ./setup.sh # or: ./setup.sh python | ts\n` +
35
+ `\nWindows: run setup.sh under WSL or Git Bash (see README).\n`,
36
+ );
37
+ }
38
+
39
+ main().catch((err) => {
40
+ console.error(`\nai-workshop-taster: ${err.message}`);
41
+ process.exit(1);
42
+ });
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "ai-workshop-taster",
3
+ "version": "0.1.0",
4
+ "description": "Scaffold the AI workshop pre-flight taster and verify your machine is ready",
5
+ "type": "module",
6
+ "bin": {
7
+ "ai-workshop-taster": "index.mjs"
8
+ },
9
+ "files": [
10
+ "index.mjs"
11
+ ],
12
+ "engines": {
13
+ "node": ">=20"
14
+ },
15
+ "dependencies": {
16
+ "tiged": "^2.12.8"
17
+ },
18
+ "keywords": [
19
+ "ai-workshop",
20
+ "taster",
21
+ "pydantic-ai",
22
+ "vercel-ai-sdk",
23
+ "scaffold"
24
+ ],
25
+ "license": "MIT"
26
+ }