@tolinax/ayoune-cli 2026.11.0 → 2026.11.1

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/lib/api/login.js CHANGED
@@ -13,10 +13,14 @@ export const login = async () => {
13
13
  const token = randomAsciiString();
14
14
  const url = `${config.loginUrl}/ayoune?cli=${token}`;
15
15
  const clickable = terminalLink(chalk.cyan.underline(url), url);
16
- console.log();
17
- console.log(` ${chalk.dim("Open this URL to authenticate:")}`);
18
- console.log(` ${clickable}`);
19
- console.log();
16
+ // Print the auth URL to STDERR — the same stream the spinner uses — so we
17
+ // don't pollute stdout when a piped command triggers a re-login (e.g. 401
18
+ // refresh inside apiCallHandler). stdout is reserved for the data payload
19
+ // so `ay list contacts | jq` keeps working.
20
+ process.stderr.write("\n");
21
+ process.stderr.write(` ${chalk.dim("Open this URL to authenticate:")}\n`);
22
+ process.stderr.write(` ${clickable}\n`);
23
+ process.stderr.write("\n");
20
24
  const credentials = await waitForCredentials(token);
21
25
  return credentials;
22
26
  };
@@ -9,7 +9,16 @@ export function createJobsCommand(program) {
9
9
  const jobs = program
10
10
  .command("jobs")
11
11
  .alias("j")
12
- .description("Manage background jobs, automations, and triggers");
12
+ .description("Manage background jobs, automations, and triggers")
13
+ .addHelpText("after", `
14
+ Examples:
15
+ ay jobs list List queued + scheduled jobs
16
+ ay jobs list --status failed Show only failed jobs
17
+ ay jobs get <id> Inspect a single job
18
+ ay jobs retry <id> Retry a failed job
19
+ ay jobs cancel <id> Cancel a queued job
20
+ ay jobs triggers list List automation triggers
21
+ ay jobs notifications list List recent notifications`);
13
22
  // ay jobs list
14
23
  jobs
15
24
  .command("list")
@@ -9,6 +9,11 @@ export function createLoginCommand(program) {
9
9
  .command("login")
10
10
  .alias("auth")
11
11
  .description("Authenticate with your aYOUne account via browser or JWT token")
12
+ .addHelpText("after", `
13
+ Examples:
14
+ ay login Open browser to authenticate
15
+ ay login --token <jwt> Authenticate with an existing JWT
16
+ ay auth Alias of \`ay login\``)
12
17
  .action(async (_options, cmd) => {
13
18
  var _a, _b, _c, _d;
14
19
  try {
@@ -7,6 +7,10 @@ export function createLogoutCommand(program) {
7
7
  .command("logout")
8
8
  .alias("signout")
9
9
  .description("Clear stored credentials and log out")
10
+ .addHelpText("after", `
11
+ Examples:
12
+ ay logout Clear stored credentials
13
+ ay signout Alias of \`ay logout\``)
10
14
  .action(async (options) => {
11
15
  try {
12
16
  spinner.start({ text: "Clearing credentials" });
@@ -14,6 +14,10 @@ export function createStorageCommand(program) {
14
14
  .command("storage")
15
15
  .alias("s")
16
16
  .description("Display stored session data and preferences")
17
+ .addHelpText("after", `
18
+ Examples:
19
+ ay storage Show stored tokens (redacted) and config defaults
20
+ ay s Alias of \`ay storage\``)
17
21
  .action(async () => {
18
22
  var _a, _b;
19
23
  try {
@@ -9,7 +9,14 @@ export function createTemplateCommand(program) {
9
9
  const tmpl = program
10
10
  .command("templates")
11
11
  .alias("tmpl")
12
- .description("Manage platform templates (email, notification, report, store)");
12
+ .description("Manage platform templates (email, notification, report, store)")
13
+ .addHelpText("after", `
14
+ Examples:
15
+ ay templates email list List email templates
16
+ ay templates email get <id> Show one email template
17
+ ay templates notification list List notification templates
18
+ ay templates report list List report templates
19
+ ay templates store list List store templates`);
13
20
  // ── EMAIL TEMPLATES ────────────────────────────────────
14
21
  const email = tmpl
15
22
  .command("email")
@@ -9,7 +9,16 @@ import { parseInteger } from "../helpers/parseInt.js";
9
9
  export function createUsersCommand(program) {
10
10
  const users = program
11
11
  .command("users")
12
- .description("Manage users, teams, and roles");
12
+ .description("Manage users, teams, and roles")
13
+ .addHelpText("after", `
14
+ Examples:
15
+ ay users list List users (paginated)
16
+ ay users get <id> Show a single user
17
+ ay users create Create a user (interactive wizard)
18
+ ay users update <id> Update a user
19
+ ay users delete <id> Delete a user
20
+ ay users teams list List teams
21
+ ay users roles list List roles`);
13
22
  // ── USERS ──────────────────────────────────────────────
14
23
  // ay users list
15
24
  users
@@ -9,7 +9,15 @@ export function createWebhooksCommand(program) {
9
9
  const hooks = program
10
10
  .command("webhooks")
11
11
  .alias("hooks")
12
- .description("Manage webhooks and event subscriptions");
12
+ .description("Manage webhooks and event subscriptions")
13
+ .addHelpText("after", `
14
+ Examples:
15
+ ay webhooks list List registered webhooks
16
+ ay webhooks get <id> Show one webhook
17
+ ay webhooks create Create a webhook (interactive wizard)
18
+ ay webhooks delete <id> Delete a webhook
19
+ ay webhooks deliveries <id> List recent delivery attempts
20
+ ay webhooks redeliver <id> Re-fire a failed delivery`);
13
21
  // ay webhooks list
14
22
  hooks
15
23
  .command("list")
@@ -69,6 +69,10 @@ export function createWhoAmICommand(program) {
69
69
  .command("whoami")
70
70
  .alias("who")
71
71
  .description("Display the currently authenticated user")
72
+ .addHelpText("after", `
73
+ Examples:
74
+ ay whoami Show your current user info
75
+ ay who Alias of \`ay whoami\``)
72
76
  .action(async (options) => {
73
77
  try {
74
78
  const tokenPayload = decodeToken(secureStorage.getItem("token"));
@@ -19,7 +19,19 @@ export function createDeployCommand(program) {
19
19
  const deploy = program
20
20
  .command("deploy")
21
21
  .alias("dp")
22
- .description("Manage deployments, pods, clusters, pipelines, and plans via DevOps API");
22
+ .description("Manage deployments, pods, clusters, pipelines, and plans via DevOps API")
23
+ .addHelpText("after", `
24
+ Examples:
25
+ ay deploy deployments list List active deployments
26
+ ay deploy deployments rollback api-crm Rollback a deployment
27
+ ay deploy pods list api-crm List pods for a service
28
+ ay deploy pods logs <pod> Tail pod logs
29
+ ay deploy clusters list List clusters
30
+ ay deploy alerts list Show open alerts
31
+ ay deploy pipelines list Recent CI pipelines
32
+ ay deploy plans list Saved deployment plans
33
+ ay deploy repos list Repository status
34
+ ay deploy dashboard Live deployment dashboard`);
23
35
  addDeploymentsSubcommands(deploy, program);
24
36
  addPodsSubcommands(deploy, program);
25
37
  addClustersSubcommands(deploy, program);
@@ -1,4 +1,4 @@
1
- export function parseInteger(value, dummyPrevious) {
1
+ export function parseInteger(value, _dummyPrevious) {
2
2
  const parsedValue = parseInt(value, 10);
3
3
  if (isNaN(parsedValue)) {
4
4
  throw new Error("Not a number.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-cli",
3
- "version": "2026.11.0",
3
+ "version": "2026.11.1",
4
4
  "description": "CLI for the aYOUne Business-as-a-Service platform",
5
5
  "type": "module",
6
6
  "main": "./index.js",