aiblueprint-cli 1.4.75 → 1.4.77
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
CHANGED
|
@@ -169,11 +169,11 @@ npx skills add Melvynx/aiblueprint --skill skill-manager
|
|
|
169
169
|
Unlock advanced features at [mlv.sh/claude-cli](https://mlv.sh/claude-cli)
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
|
-
#
|
|
173
|
-
npx aiblueprint-cli@latest agents pro activate YOUR_TOKEN
|
|
174
|
-
|
|
175
|
-
# Setup premium configs
|
|
172
|
+
# Setup premium configs (prompts for your token if needed)
|
|
176
173
|
npx aiblueprint-cli@latest agents pro setup
|
|
174
|
+
|
|
175
|
+
# Or activate first if you prefer
|
|
176
|
+
npx aiblueprint-cli@latest agents pro activate YOUR_TOKEN
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
## 🛠️ Development
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-style
|
|
3
|
-
description: Apply named visual style guides to landing pages and UI. Use for $use-style, /
|
|
3
|
+
description: Apply named visual style guides to landing pages and UI. Use for $use-style, /usestyle, list styles, or styles like grid, vercel-simple, stripe, linear, raycast, gumroad, dusk, or split-auth.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Load and apply a named style before designing or implementing any UI.
|
|
7
7
|
|
|
8
8
|
## Invocation
|
|
9
9
|
|
|
10
|
-
- Explicit: `$use-style grid`, `/
|
|
10
|
+
- Explicit: `$use-style grid`, `/usestyle split-auth`, `/usestyle list`, or "use the grid style"
|
|
11
11
|
- Implicit: user references `/aiblueprint`, `/agents`, `/aibuilder`, "grid theme", Vercel, Geist, a minimalist dark tool UI, Stripe / fintech / checkout / dashboard UI, Linear / issue tracker / app-shell sidebar UI, NYT / newspaper / editorial / broadsheet / magazine layouts, Anthropic / Claude / warm cream AI-lab pages, Gumroad / neo-brutalist / loud commerce / bold yellow-pink pages, Raycast / glossy dark / glow gradients / floating glass nav / premium product marketing, or Dusk / Attio / dark CRM dashboard floating on a twilight backdrop / blue data viz / colorful category pills
|
|
12
12
|
|
|
13
13
|
Parse the style name from `$ARGUMENTS` or the message. Treat `split-auth`, `signin 2pages`, `signin-2pages`, `sign-in 2 pages`, `auth split`, and `two-column auth` as `split-auth`. Treat `list`, `styles`, `available styles`, and missing style names with no implicit match as a request to list available styles and ask the user to choose before designing. Default to `grid` for Codelynx product landings. Default to `vercel-simple` when the user references Vercel, Geist, or minimalist dark developer tools. Default to `linear` when the user references Linear, an issue tracker, or a dense sidebar + list + detail app shell. Default to `new-york-times` when the user references a newspaper, broadsheet, magazine, or serif editorial layout. Default to `anthropic` when the user references Anthropic, Claude, or a warm cream + serif AI-lab aesthetic. Default to `gumroad` when the user references Gumroad, neo-brutalism, hard offset shadows, or a loud yellow/pink bordered look. Default to `raycast` when the user references Raycast, a glossy dark page with glow gradients, a floating glass nav, or premium dark product marketing. Default to `dusk` when the user references Attio, a dark CRM/data dashboard floating on a twilight/aurora backdrop, vivid-blue charts, or colorful category pills. Default to `split-auth` when the user asks for a polished login, sign-in, signup, OAuth, magic-code, or password-reset page with a two-panel visual layout.
|
|
@@ -21,10 +21,10 @@ Two-column authentication style for sign-in, signup, OAuth, magic-code, password
|
|
|
21
21
|
|
|
22
22
|
Use this style when the user says:
|
|
23
23
|
|
|
24
|
-
- `/
|
|
24
|
+
- `/usestyle split-auth`
|
|
25
25
|
- `$use-style split-auth`
|
|
26
26
|
- `use split-auth`
|
|
27
|
-
- `/
|
|
27
|
+
- `/usestyle signin 2pages`
|
|
28
28
|
- `two-column auth`
|
|
29
29
|
- `auth split`
|
|
30
30
|
- `make the sign in page like the example`
|
package/dist/cli.js
CHANGED
|
@@ -37809,6 +37809,74 @@ function getTokenInfo() {
|
|
|
37809
37809
|
var import_fs_extra17 = __toESM(require_lib4(), 1);
|
|
37810
37810
|
var API_URL = "https://codeline.app/api/products";
|
|
37811
37811
|
var PRODUCT_IDS = ["prd_XJVgxVPbGG", "prd_NKabAkdOkw"];
|
|
37812
|
+
|
|
37813
|
+
class PremiumActivationError extends Error {
|
|
37814
|
+
code;
|
|
37815
|
+
constructor(code, message) {
|
|
37816
|
+
super(message);
|
|
37817
|
+
this.code = code;
|
|
37818
|
+
this.name = "PremiumActivationError";
|
|
37819
|
+
}
|
|
37820
|
+
}
|
|
37821
|
+
function isPremiumActivationError(error) {
|
|
37822
|
+
return error instanceof PremiumActivationError;
|
|
37823
|
+
}
|
|
37824
|
+
function logPremiumActivationError(error) {
|
|
37825
|
+
M2.error(error.message);
|
|
37826
|
+
if (error.code === "invalid-token") {
|
|
37827
|
+
M2.info("\uD83D\uDC8E Get AIBlueprint CLI Premium at: https://mlv.sh/claude-cli");
|
|
37828
|
+
}
|
|
37829
|
+
}
|
|
37830
|
+
async function promptForPremiumToken() {
|
|
37831
|
+
const result = await he({
|
|
37832
|
+
message: "Enter your Premium access token:",
|
|
37833
|
+
placeholder: "Your ProductsOnUsers ID from codeline.app",
|
|
37834
|
+
validate: (value) => {
|
|
37835
|
+
if (!value)
|
|
37836
|
+
return "Token is required";
|
|
37837
|
+
if (value.length < 5)
|
|
37838
|
+
return "Token seems invalid";
|
|
37839
|
+
return;
|
|
37840
|
+
}
|
|
37841
|
+
});
|
|
37842
|
+
if (pD(result)) {
|
|
37843
|
+
xe("Premium activation cancelled");
|
|
37844
|
+
process.exit(0);
|
|
37845
|
+
}
|
|
37846
|
+
return result;
|
|
37847
|
+
}
|
|
37848
|
+
async function fetchPremiumActivationData(userToken) {
|
|
37849
|
+
const encodedToken = encodeURIComponent(userToken);
|
|
37850
|
+
for (const productId of PRODUCT_IDS) {
|
|
37851
|
+
const response = await fetch(`${API_URL}/${productId}/have-access?token=${encodedToken}`);
|
|
37852
|
+
if (response.ok) {
|
|
37853
|
+
const responseData = await response.json();
|
|
37854
|
+
if (responseData.hasAccess) {
|
|
37855
|
+
return responseData;
|
|
37856
|
+
}
|
|
37857
|
+
}
|
|
37858
|
+
}
|
|
37859
|
+
return null;
|
|
37860
|
+
}
|
|
37861
|
+
async function activatePremiumToken(userToken) {
|
|
37862
|
+
const premiumToken = userToken ?? await promptForPremiumToken();
|
|
37863
|
+
const spinner = Y2();
|
|
37864
|
+
spinner.start("Validating token against premium products...");
|
|
37865
|
+
const data = await fetchPremiumActivationData(premiumToken);
|
|
37866
|
+
if (!data) {
|
|
37867
|
+
spinner.stop("Token validation failed");
|
|
37868
|
+
throw new PremiumActivationError("invalid-token", "Invalid token or no access to premium products");
|
|
37869
|
+
}
|
|
37870
|
+
spinner.stop("Token validated");
|
|
37871
|
+
const githubToken = data.product?.metadata?.["cli-github-token"];
|
|
37872
|
+
if (!githubToken) {
|
|
37873
|
+
throw new PremiumActivationError("missing-github-token", "No GitHub token found in product metadata. Please contact support.");
|
|
37874
|
+
}
|
|
37875
|
+
spinner.start("Saving token...");
|
|
37876
|
+
await saveToken(githubToken);
|
|
37877
|
+
spinner.stop("Token saved");
|
|
37878
|
+
return { githubToken, data };
|
|
37879
|
+
}
|
|
37812
37880
|
async function countInstalledItems(claudeDir) {
|
|
37813
37881
|
const counts = {
|
|
37814
37882
|
agents: 0,
|
|
@@ -37841,60 +37909,11 @@ async function countInstalledItems(claudeDir) {
|
|
|
37841
37909
|
async function proActivateCommand(userToken) {
|
|
37842
37910
|
Ie(source_default.blue(`\uD83D\uDD11 Activate AIBlueprint CLI Premium ${source_default.gray(`v${getVersion()}`)}`));
|
|
37843
37911
|
try {
|
|
37844
|
-
|
|
37845
|
-
const result = await he({
|
|
37846
|
-
message: "Enter your Premium access token:",
|
|
37847
|
-
placeholder: "Your ProductsOnUsers ID from codeline.app",
|
|
37848
|
-
validate: (value) => {
|
|
37849
|
-
if (!value)
|
|
37850
|
-
return "Token is required";
|
|
37851
|
-
if (value.length < 5)
|
|
37852
|
-
return "Token seems invalid";
|
|
37853
|
-
return;
|
|
37854
|
-
}
|
|
37855
|
-
});
|
|
37856
|
-
if (pD(result)) {
|
|
37857
|
-
xe("Activation cancelled");
|
|
37858
|
-
process.exit(0);
|
|
37859
|
-
}
|
|
37860
|
-
userToken = result;
|
|
37861
|
-
}
|
|
37862
|
-
const spinner = Y2();
|
|
37863
|
-
spinner.start("Validating token against premium products...");
|
|
37864
|
-
let validationSuccess = false;
|
|
37865
|
-
let data = null;
|
|
37866
|
-
for (const productId of PRODUCT_IDS) {
|
|
37867
|
-
const response = await fetch(`${API_URL}/${productId}/have-access?token=${userToken}`);
|
|
37868
|
-
if (response.ok) {
|
|
37869
|
-
const responseData = await response.json();
|
|
37870
|
-
if (responseData.hasAccess) {
|
|
37871
|
-
data = responseData;
|
|
37872
|
-
validationSuccess = true;
|
|
37873
|
-
break;
|
|
37874
|
-
}
|
|
37875
|
-
}
|
|
37876
|
-
}
|
|
37877
|
-
if (!validationSuccess || !data) {
|
|
37878
|
-
spinner.stop("Token validation failed");
|
|
37879
|
-
M2.error("Invalid token or no access to premium products");
|
|
37880
|
-
M2.info("\uD83D\uDC8E Get AIBlueprint CLI Premium at: https://mlv.sh/claude-cli");
|
|
37881
|
-
Se(source_default.red("❌ Activation failed"));
|
|
37882
|
-
process.exit(1);
|
|
37883
|
-
}
|
|
37884
|
-
spinner.stop("Token validated");
|
|
37885
|
-
const githubToken = data.product.metadata?.["cli-github-token"];
|
|
37886
|
-
if (!githubToken) {
|
|
37887
|
-
M2.error("No GitHub token found in product metadata. Please contact support.");
|
|
37888
|
-
Se(source_default.red("❌ Activation failed"));
|
|
37889
|
-
process.exit(1);
|
|
37890
|
-
}
|
|
37891
|
-
spinner.start("Saving token...");
|
|
37892
|
-
await saveToken(githubToken);
|
|
37893
|
-
spinner.stop("Token saved");
|
|
37912
|
+
const { data } = await activatePremiumToken(userToken);
|
|
37894
37913
|
const tokenInfo = getTokenInfo();
|
|
37895
37914
|
M2.success("✅ Token activated!");
|
|
37896
|
-
M2.info(`User: ${data.user
|
|
37897
|
-
M2.info(`Product: ${data.product
|
|
37915
|
+
M2.info(`User: ${data.user?.name ?? "Unknown"} (${data.user?.email ?? "unknown email"})`);
|
|
37916
|
+
M2.info(`Product: ${data.product?.title ?? "Premium"}`);
|
|
37898
37917
|
M2.info(`Token saved to: ${tokenInfo.path}`);
|
|
37899
37918
|
M2.info(source_default.cyan(`
|
|
37900
37919
|
\uD83D\uDCA1 Next step: Run 'npx aiblueprint-cli@latest agents pro setup' to install premium configs`));
|
|
@@ -37903,7 +37922,9 @@ async function proActivateCommand(userToken) {
|
|
|
37903
37922
|
} catch (error) {
|
|
37904
37923
|
trackError(error, { command: "pro-activate" });
|
|
37905
37924
|
await flushTelemetry();
|
|
37906
|
-
if (error
|
|
37925
|
+
if (isPremiumActivationError(error)) {
|
|
37926
|
+
logPremiumActivationError(error);
|
|
37927
|
+
} else if (error instanceof Error) {
|
|
37907
37928
|
M2.error(error.message);
|
|
37908
37929
|
}
|
|
37909
37930
|
Se(source_default.red("❌ Activation failed"));
|
|
@@ -37937,12 +37958,13 @@ async function proStatusCommand() {
|
|
|
37937
37958
|
async function proSetupCommand(options = {}) {
|
|
37938
37959
|
Ie(source_default.blue(`⚙️ Setup AIBlueprint CLI Premium ${source_default.gray(`v${getVersion()}`)}`));
|
|
37939
37960
|
try {
|
|
37940
|
-
|
|
37961
|
+
let githubToken = await getToken();
|
|
37941
37962
|
if (!githubToken) {
|
|
37942
|
-
M2.
|
|
37943
|
-
M2.info("
|
|
37944
|
-
|
|
37945
|
-
|
|
37963
|
+
M2.warn("No token found");
|
|
37964
|
+
M2.info("Enter your Premium access token to activate and continue setup.");
|
|
37965
|
+
const activation = await activatePremiumToken();
|
|
37966
|
+
githubToken = activation.githubToken;
|
|
37967
|
+
M2.success("✅ Token activated. Continuing setup...");
|
|
37946
37968
|
}
|
|
37947
37969
|
const { claudeDir } = resolveFolders(options);
|
|
37948
37970
|
const spinner = Y2();
|
|
@@ -37995,7 +38017,9 @@ async function proSetupCommand(options = {}) {
|
|
|
37995
38017
|
} catch (error) {
|
|
37996
38018
|
trackError(error, { command: "pro-setup" });
|
|
37997
38019
|
await flushTelemetry();
|
|
37998
|
-
if (error
|
|
38020
|
+
if (isPremiumActivationError(error)) {
|
|
38021
|
+
logPremiumActivationError(error);
|
|
38022
|
+
} else if (error instanceof Error) {
|
|
37999
38023
|
M2.error(error.message);
|
|
38000
38024
|
}
|
|
38001
38025
|
Se(source_default.red("❌ Setup failed"));
|
|
@@ -39464,7 +39488,7 @@ function registerAgentsCommands(cmd) {
|
|
|
39464
39488
|
proCmd.command("status").description("Check your Premium token status").action(() => {
|
|
39465
39489
|
proStatusCommand();
|
|
39466
39490
|
});
|
|
39467
|
-
proCmd.command("setup").description("Install premium configurations
|
|
39491
|
+
proCmd.command("setup").description("Install premium configurations, prompting for activation if needed").action((options, command) => {
|
|
39468
39492
|
const parentOptions = command.parent.parent.opts();
|
|
39469
39493
|
proSetupCommand({
|
|
39470
39494
|
folder: parentOptions.folder,
|