naracli 1.0.77 → 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.
- package/dist/nara-cli-bundle.cjs +24 -7
- package/package.json +1 -1
- package/src/cli/commands/agent.ts +8 -6
- package/src/cli/index.ts +20 -0
package/dist/nara-cli-bundle.cjs
CHANGED
|
@@ -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
|
|
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
|
}
|
|
@@ -173312,14 +173313,15 @@ Example:
|
|
|
173312
173313
|
}
|
|
173313
173314
|
} catch {
|
|
173314
173315
|
}
|
|
173315
|
-
const tweetText = `Claiming my AI agent ${agentId} on #NaraChain @NaraBuildAI`;
|
|
173316
|
-
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")}`;
|
|
173317
173318
|
console.log("");
|
|
173318
|
-
console.log(` Bind your Twitter to
|
|
173319
|
+
console.log(` Bind your Twitter to earn 20 NARA + stake-free PoMI mining credits!`);
|
|
173319
173320
|
console.log(` 1. Post a tweet with this content:`);
|
|
173320
173321
|
console.log(` ${tweetText}`);
|
|
173321
173322
|
console.log(` Link: ${tweetIntent}`);
|
|
173322
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`);
|
|
173323
173325
|
console.log("");
|
|
173324
173326
|
return;
|
|
173325
173327
|
}
|
|
@@ -173508,6 +173510,21 @@ function registerCommands(program3) {
|
|
|
173508
173510
|
process.exit(1);
|
|
173509
173511
|
}
|
|
173510
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
|
+
});
|
|
173511
173528
|
program3.command("address").description("Show wallet public address (run this first to check if a wallet exists)").action(async () => {
|
|
173512
173529
|
const opts = program3.opts();
|
|
173513
173530
|
try {
|
|
@@ -173634,7 +173651,7 @@ function registerCommands(program3) {
|
|
|
173634
173651
|
}
|
|
173635
173652
|
|
|
173636
173653
|
// bin/nara-cli.ts
|
|
173637
|
-
var version2 = true ? "1.0.
|
|
173654
|
+
var version2 = true ? "1.0.78" : "dev";
|
|
173638
173655
|
var program2 = new Command();
|
|
173639
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);
|
|
173640
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
|
@@ -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
|
|
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
|
}
|
|
@@ -891,14 +892,15 @@ Example:
|
|
|
891
892
|
} catch {
|
|
892
893
|
// No binding found
|
|
893
894
|
}
|
|
894
|
-
const tweetText = `Claiming my AI agent ${agentId} on #NaraChain @NaraBuildAI`;
|
|
895
|
-
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")}`;
|
|
896
897
|
console.log("");
|
|
897
|
-
console.log(` Bind your Twitter to
|
|
898
|
+
console.log(` Bind your Twitter to earn 20 NARA + stake-free PoMI mining credits!`);
|
|
898
899
|
console.log(` 1. Post a tweet with this content:`);
|
|
899
900
|
console.log(` ${tweetText}`);
|
|
900
901
|
console.log(` Link: ${tweetIntent}`);
|
|
901
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`);
|
|
902
904
|
console.log("");
|
|
903
905
|
return;
|
|
904
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")
|