@takisvc/code-canvas 0.1.3 → 0.1.5
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/dist/code-canvas.js +37 -4
- package/package.json +1 -1
package/dist/code-canvas.js
CHANGED
|
@@ -9,6 +9,31 @@ import { homedir } from "os";
|
|
|
9
9
|
import { join } from "path";
|
|
10
10
|
import ora from "ora";
|
|
11
11
|
import chalk from "chalk";
|
|
12
|
+
var PROMPT = `You have access to an AI image generation tool. **Auto-run immediately \u2014 do NOT ask for a prompt.**
|
|
13
|
+
|
|
14
|
+
1. Scan the conversation \u2014 the codebase, language, framework, session activity, AND the developer's personality, tone, and energy.
|
|
15
|
+
2. Craft a prompt for a **single collectible stat card image** with this layout:
|
|
16
|
+
- **Top half**: A single cute/funny creature (simple, clean, centered \u2014 think mascot, not busy scene). The creature should reflect the developer's vibe or tech stack.
|
|
17
|
+
- **Bottom half**: Stats and text on a clean card background:
|
|
18
|
+
- Character name (funny, personality-driven)
|
|
19
|
+
- HP, Type/Element
|
|
20
|
+
- 2 abilities with short descriptions (based on personality traits, habits, and tone \u2014 NOT specific code features)
|
|
21
|
+
- A one-liner tagline/quote that sounds like something they'd actually say
|
|
22
|
+
- Weakness + Resistance at the bottom
|
|
23
|
+
- **Holographic rainbow border** around the whole card
|
|
24
|
+
- Keep the illustration **simple and uncluttered** \u2014 the creature should be the focus, not a complex scene
|
|
25
|
+
- **Generate exactly one card, not multiple variations**
|
|
26
|
+
3. Run immediately:
|
|
27
|
+
\`\`\`
|
|
28
|
+
npx @takisvc/code-canvas "<your card prompt>"
|
|
29
|
+
\`\`\`
|
|
30
|
+
4. Show the saved file path and share-on-X link from the output.
|
|
31
|
+
|
|
32
|
+
If the CLI says the agent is not registered, tell the user to run this in their own terminal (they need to see the QR code):
|
|
33
|
+
\`\`\`
|
|
34
|
+
npx @takisvc/code-canvas setup
|
|
35
|
+
\`\`\`
|
|
36
|
+
Then re-run the image generation.`;
|
|
12
37
|
function ensureWallet() {
|
|
13
38
|
const dir = join(homedir(), ".code-canvas");
|
|
14
39
|
const keyPath = join(dir, "key");
|
|
@@ -251,7 +276,15 @@ function runSetup(account2) {
|
|
|
251
276
|
{ stdio: "inherit" }
|
|
252
277
|
);
|
|
253
278
|
console.log();
|
|
254
|
-
console.log(chalk.green("Setup complete! You can now generate images
|
|
279
|
+
console.log(chalk.green("Setup complete! You can now generate images."));
|
|
280
|
+
console.log();
|
|
281
|
+
console.log(chalk.dim("\u2500".repeat(60)));
|
|
282
|
+
console.log();
|
|
283
|
+
console.log(chalk.bold("Add this prompt to your AI coding assistant:"));
|
|
284
|
+
console.log();
|
|
285
|
+
console.log(chalk.cyan(PROMPT));
|
|
286
|
+
console.log();
|
|
287
|
+
console.log(chalk.dim("\u2500".repeat(60)));
|
|
255
288
|
return true;
|
|
256
289
|
} catch {
|
|
257
290
|
console.log();
|
|
@@ -270,9 +303,9 @@ if (!command) {
|
|
|
270
303
|
` ${chalk.bold('code-canvas "<prompt>"')} Generate an image`
|
|
271
304
|
);
|
|
272
305
|
console.log();
|
|
273
|
-
console.log(
|
|
274
|
-
|
|
275
|
-
|
|
306
|
+
console.log(
|
|
307
|
+
`Best used with an AI coding assistant \u2014 add the prompt from PROMPT.md to your tool config.`
|
|
308
|
+
);
|
|
276
309
|
process.exit(1);
|
|
277
310
|
}
|
|
278
311
|
var account = ensureWallet();
|