naracli 1.0.76 → 1.0.78

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.
@@ -172830,13 +172830,14 @@ async function handleAgentGet(agentId, options) {
172830
172830
  console.log(` Tweet must include #NaraChain. Credits are based on likes, bookmarks, retweets, and quotes.`);
172831
172831
  console.log("");
172832
172832
  } else {
172833
- const tweetText = `Claiming my AI agent ${agentId} on #NaraChain @NaraBuildAI`;
172834
- const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23")}`;
172835
- console.log(` Tip: Bind your Twitter to get stake-free PoMI mining credits!`);
172833
+ const tweetText = `Claiming my AI agent "${agentId}" on #NaraChain @NaraBuildAI`;
172834
+ const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23").replace(/"/g, "%22")}`;
172835
+ console.log(` Tip: Bind your Twitter to earn 20 NARA + stake-free PoMI mining credits!`);
172836
172836
  console.log(` 1. Post a tweet with this content:`);
172837
172837
  console.log(` ${tweetText}`);
172838
172838
  console.log(` Link: ${tweetIntent}`);
172839
172839
  console.log(` 2. Then run: npx naracli agent bind-twitter <tweet-url>`);
172840
+ console.log(` 3. Follow @NaraBuildAI: https://x.com/intent/follow?screen_name=NaraBuildAI`);
172840
172841
  console.log("");
172841
172842
  }
172842
172843
  }
@@ -173020,6 +173021,10 @@ function parseTweetUrl(url) {
173020
173021
  printError(`Invalid tweet URL. Expected format: https://x.com/<username>/status/<id>`);
173021
173022
  process.exit(1);
173022
173023
  }
173024
+ if (m[1] === "i") {
173025
+ printError(`This URL uses x.com/i/ redirect and does not contain your real username. Please copy the tweet URL from your profile page (format: https://x.com/<username>/status/<id>).`);
173026
+ process.exit(1);
173027
+ }
173023
173028
  return { username: m[1], tweetId: BigInt(m[2]), tweetUrl: url };
173024
173029
  }
173025
173030
  async function handleAgentTwitterSet(agentId, username, tweetUrl, options) {
@@ -173308,14 +173313,15 @@ Example:
173308
173313
  }
173309
173314
  } catch {
173310
173315
  }
173311
- const tweetText = `Claiming my AI agent ${agentId} on #NaraChain @NaraBuildAI`;
173312
- const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23")}`;
173316
+ const tweetText = `Claiming my AI agent "${agentId}" on #NaraChain @NaraBuildAI`;
173317
+ const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23").replace(/"/g, "%22")}`;
173313
173318
  console.log("");
173314
- console.log(` Bind your Twitter to get stake-free PoMI mining credits!`);
173319
+ console.log(` Bind your Twitter to earn 20 NARA + stake-free PoMI mining credits!`);
173315
173320
  console.log(` 1. Post a tweet with this content:`);
173316
173321
  console.log(` ${tweetText}`);
173317
173322
  console.log(` Link: ${tweetIntent}`);
173318
173323
  console.log(` 2. Then run: npx naracli agent bind-twitter <tweet-url>`);
173324
+ console.log(` 3. Follow @NaraBuildAI: https://x.com/intent/follow?screen_name=NaraBuildAI`);
173319
173325
  console.log("");
173320
173326
  return;
173321
173327
  }
@@ -173504,6 +173510,21 @@ function registerCommands(program3) {
173504
173510
  process.exit(1);
173505
173511
  }
173506
173512
  });
173513
+ program3.command("activity").description("Show current community activities and events (check daily for new rewards)").action(async () => {
173514
+ try {
173515
+ const res = await fetch("https://nara.build/activity.md");
173516
+ if (!res.ok) {
173517
+ printError(`Failed to fetch activity info (HTTP ${res.status})`);
173518
+ process.exit(1);
173519
+ }
173520
+ const content = await res.text();
173521
+ const stripped = content.replace(/^---[\s\S]*?---\n*/, "");
173522
+ console.log(stripped);
173523
+ } catch (error) {
173524
+ printError(error.message);
173525
+ process.exit(1);
173526
+ }
173527
+ });
173507
173528
  program3.command("address").description("Show wallet public address (run this first to check if a wallet exists)").action(async () => {
173508
173529
  const opts = program3.opts();
173509
173530
  try {
@@ -173630,7 +173651,7 @@ function registerCommands(program3) {
173630
173651
  }
173631
173652
 
173632
173653
  // bin/nara-cli.ts
173633
- var version2 = true ? "1.0.76" : "dev";
173654
+ var version2 = true ? "1.0.78" : "dev";
173634
173655
  var program2 = new Command();
173635
173656
  program2.name("naracli").description("CLI for the Nara chain. Native coin is NARA (not SOL). Mine NARA for free via PoMI quests, manage wallets, register agents, and more. Run 'naracli <command> --help' for details on any command.").version(version2);
173636
173657
  program2.option("-r, --rpc-url <url>", "RPC endpoint (default: https://mainnet-api.nara.build/)").option("-w, --wallet <path>", "Path to wallet keypair JSON file (default: ~/.config/nara/id.json)").option("-j, --json", "Output in JSON format");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naracli",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "description": "CLI for the Nara chain (Solana-compatible)",
5
5
  "homepage": "https://nara.build",
6
6
  "repository": {
@@ -231,13 +231,14 @@ async function handleAgentGet(agentId: string, options: GlobalOptions) {
231
231
  console.log("");
232
232
  } else {
233
233
  // Not bound — show bind tip
234
- const tweetText = `Claiming my AI agent ${agentId} on #NaraChain @NaraBuildAI`;
235
- const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23")}`;
236
- console.log(` Tip: Bind your Twitter to get stake-free PoMI mining credits!`);
234
+ const tweetText = `Claiming my AI agent "${agentId}" on #NaraChain @NaraBuildAI`;
235
+ const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23").replace(/"/g, "%22")}`;
236
+ console.log(` Tip: Bind your Twitter to earn 20 NARA + stake-free PoMI mining credits!`);
237
237
  console.log(` 1. Post a tweet with this content:`);
238
238
  console.log(` ${tweetText}`);
239
239
  console.log(` Link: ${tweetIntent}`);
240
240
  console.log(` 2. Then run: npx naracli agent bind-twitter <tweet-url>`);
241
+ console.log(` 3. Follow @NaraBuildAI: https://x.com/intent/follow?screen_name=NaraBuildAI`);
241
242
  console.log("");
242
243
  }
243
244
  }
@@ -466,6 +467,10 @@ function parseTweetUrl(url: string): { username: string; tweetId: bigint; tweetU
466
467
  printError(`Invalid tweet URL. Expected format: https://x.com/<username>/status/<id>`);
467
468
  process.exit(1);
468
469
  }
470
+ if (m[1] === "i") {
471
+ printError(`This URL uses x.com/i/ redirect and does not contain your real username. Please copy the tweet URL from your profile page (format: https://x.com/<username>/status/<id>).`);
472
+ process.exit(1);
473
+ }
469
474
  return { username: m[1], tweetId: BigInt(m[2]), tweetUrl: url };
470
475
  }
471
476
 
@@ -887,14 +892,15 @@ Example:
887
892
  } catch {
888
893
  // No binding found
889
894
  }
890
- const tweetText = `Claiming my AI agent ${agentId} on #NaraChain @NaraBuildAI`;
891
- const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23")}`;
895
+ const tweetText = `Claiming my AI agent "${agentId}" on #NaraChain @NaraBuildAI`;
896
+ const tweetIntent = `https://x.com/intent/tweet?text=${tweetText.replace(/ /g, "%20").replace(/#/g, "%23").replace(/"/g, "%22")}`;
892
897
  console.log("");
893
- console.log(` Bind your Twitter to get stake-free PoMI mining credits!`);
898
+ console.log(` Bind your Twitter to earn 20 NARA + stake-free PoMI mining credits!`);
894
899
  console.log(` 1. Post a tweet with this content:`);
895
900
  console.log(` ${tweetText}`);
896
901
  console.log(` Link: ${tweetIntent}`);
897
902
  console.log(` 2. Then run: npx naracli agent bind-twitter <tweet-url>`);
903
+ console.log(` 3. Follow @NaraBuildAI: https://x.com/intent/follow?screen_name=NaraBuildAI`);
898
904
  console.log("");
899
905
  return;
900
906
  }
package/src/cli/index.ts CHANGED
@@ -119,6 +119,26 @@ export function registerCommands(program: Command): void {
119
119
  }
120
120
  });
121
121
 
122
+ // Top-level: activity
123
+ program
124
+ .command("activity")
125
+ .description("Show current community activities and events (check daily for new rewards)")
126
+ .action(async () => {
127
+ try {
128
+ const res = await fetch("https://nara.build/activity.md");
129
+ if (!res.ok) {
130
+ printError(`Failed to fetch activity info (HTTP ${res.status})`);
131
+ process.exit(1);
132
+ }
133
+ const content = await res.text();
134
+ const stripped = content.replace(/^---[\s\S]*?---\n*/, "");
135
+ console.log(stripped);
136
+ } catch (error: any) {
137
+ printError(error.message);
138
+ process.exit(1);
139
+ }
140
+ });
141
+
122
142
  // Top-level: address
123
143
  program
124
144
  .command("address")