@studiometa/forge-cli 0.2.5 → 0.3.0

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as createContext, c as colors, d as deleteToken, i as runCommand, l as setColorEnabled, m as setToken, n as exitWithValidationError, p as getToken, s as OutputFormatter, u as createConfigStore, v as ValidationError } from "./error-handler-BahHMt6t.js";
2
+ import { a as createContext, c as colors, d as deleteToken, i as runCommand, l as setColorEnabled, m as setToken, n as exitWithValidationError, p as getToken, s as OutputFormatter, u as createConfigStore, v as ValidationError } from "./error-handler-Byuujxh1.js";
3
3
  import { activateCertificate, createAuditLogger, createBackupConfig, createCommand, createDatabaseUser, createMonitor, createNginxTemplate, createRedirectRule, createScheduledJob, createSecurityRule, deleteBackupConfig, deleteDatabaseUser, deleteMonitor, deleteNginxTemplate, deleteRedirectRule, deleteScheduledJob, deleteSecurityRule, deploySiteAndWait, getBackupConfig, getCertificate, getCommand, getDaemon, getDatabase, getDatabaseUser, getEnv, getFirewallRule, getMonitor, getNginxConfig, getNginxTemplate, getRecipe, getRedirectRule, getScheduledJob, getSecurityRule, getServer, getSite, getSshKey, getUser, listBackupConfigs, listCertificates, listCommands, listDaemons, listDatabaseUsers, listDatabases, listDeployments, listFirewallRules, listMonitors, listNginxTemplates, listRecipes, listRedirectRules, listScheduledJobs, listSecurityRules, listServers, listSites, listSshKeys, matchByName, rebootServer, restartDaemon, runRecipe, updateEnv, updateNginxConfig, updateNginxTemplate } from "@studiometa/forge-core";
4
4
  import { mkdirSync, writeFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";
@@ -107,7 +107,7 @@ async function resolveSiteId(value, serverId, execCtx) {
107
107
  }
108
108
  async function backupsList(ctx) {
109
109
  const server = String(ctx.options.server ?? "");
110
- if (!server) exitWithValidationError("server_id", "forge-cli backups list --server <server_id>", ctx.formatter);
110
+ if (!server) exitWithValidationError("server_id", "forge backups list --server <server_id>", ctx.formatter);
111
111
  await runCommand(async () => {
112
112
  const token = ctx.getToken();
113
113
  const execCtx = ctx.createExecutorContext(token);
@@ -123,8 +123,8 @@ async function backupsList(ctx) {
123
123
  async function backupsGet(args, ctx) {
124
124
  const [id] = args;
125
125
  const server = String(ctx.options.server ?? "");
126
- if (!id) exitWithValidationError("backup_id", "forge-cli backups get <backup_id> --server <server_id>", ctx.formatter);
127
- if (!server) exitWithValidationError("server_id", "forge-cli backups get <backup_id> --server <server_id>", ctx.formatter);
126
+ if (!id) exitWithValidationError("backup_id", "forge backups get <backup_id> --server <server_id>", ctx.formatter);
127
+ if (!server) exitWithValidationError("server_id", "forge backups get <backup_id> --server <server_id>", ctx.formatter);
128
128
  await runCommand(async () => {
129
129
  const token = ctx.getToken();
130
130
  const execCtx = ctx.createExecutorContext(token);
@@ -149,9 +149,9 @@ async function backupsCreate(ctx) {
149
149
  const frequency = String(ctx.options.frequency ?? "");
150
150
  const databasesRaw = ctx.options.databases;
151
151
  const databases = Array.isArray(databasesRaw) ? databasesRaw.map(Number) : databasesRaw ? [Number(databasesRaw)] : [];
152
- if (!server) exitWithValidationError("server_id", "forge-cli backups create --server <server_id> --provider <provider> --frequency <frequency>", ctx.formatter);
153
- if (!provider) exitWithValidationError("provider", "forge-cli backups create --server <server_id> --provider <provider> --frequency <frequency>", ctx.formatter);
154
- if (!frequency) exitWithValidationError("frequency", "forge-cli backups create --server <server_id> --provider <provider> --frequency <frequency>", ctx.formatter);
152
+ if (!server) exitWithValidationError("server_id", "forge backups create --server <server_id> --provider <provider> --frequency <frequency>", ctx.formatter);
153
+ if (!provider) exitWithValidationError("provider", "forge backups create --server <server_id> --provider <provider> --frequency <frequency>", ctx.formatter);
154
+ if (!frequency) exitWithValidationError("frequency", "forge backups create --server <server_id> --provider <provider> --frequency <frequency>", ctx.formatter);
155
155
  await runCommand(async () => {
156
156
  const token = ctx.getToken();
157
157
  const execCtx = ctx.createExecutorContext(token);
@@ -175,8 +175,8 @@ async function backupsCreate(ctx) {
175
175
  async function backupsDelete(args, ctx) {
176
176
  const [id] = args;
177
177
  const server = String(ctx.options.server ?? "");
178
- if (!id) exitWithValidationError("backup_id", "forge-cli backups delete <backup_id> --server <server_id>", ctx.formatter);
179
- if (!server) exitWithValidationError("server_id", "forge-cli backups delete <backup_id> --server <server_id>", ctx.formatter);
178
+ if (!id) exitWithValidationError("backup_id", "forge backups delete <backup_id> --server <server_id>", ctx.formatter);
179
+ if (!server) exitWithValidationError("server_id", "forge backups delete <backup_id> --server <server_id>", ctx.formatter);
180
180
  await runCommand(async () => {
181
181
  const token = ctx.getToken();
182
182
  const execCtx = ctx.createExecutorContext(token);
@@ -200,26 +200,26 @@ const handleBackupsCommand = createCommandRouter({
200
200
  });
201
201
  function showBackupsHelp(subcommand) {
202
202
  if (subcommand === "list" || subcommand === "ls") console.log(`
203
- ${colors.bold("forge-cli backups list")} - List backup configurations on a server
203
+ ${colors.bold("forge backups list")} - List backup configurations on a server
204
204
 
205
205
  ${colors.bold("USAGE:")}
206
- forge-cli backups list --server <server_id> [options]
206
+ forge backups list --server <server_id> [options]
207
207
 
208
208
  ${colors.bold("OPTIONS:")}
209
209
  --server <id> Server ID (required)
210
210
  -f, --format <fmt> Output format: json, human, table
211
211
  `);
212
212
  else if (subcommand === "get") console.log(`
213
- ${colors.bold("forge-cli backups get")} - Get backup configuration details
213
+ ${colors.bold("forge backups get")} - Get backup configuration details
214
214
 
215
215
  ${colors.bold("USAGE:")}
216
- forge-cli backups get <backup_id> --server <server_id> [options]
216
+ forge backups get <backup_id> --server <server_id> [options]
217
217
  `);
218
218
  else if (subcommand === "create") console.log(`
219
- ${colors.bold("forge-cli backups create")} - Create a new backup configuration
219
+ ${colors.bold("forge backups create")} - Create a new backup configuration
220
220
 
221
221
  ${colors.bold("USAGE:")}
222
- forge-cli backups create --server <server_id> --provider <provider> --frequency <frequency> [options]
222
+ forge backups create --server <server_id> --provider <provider> --frequency <frequency> [options]
223
223
 
224
224
  ${colors.bold("OPTIONS:")}
225
225
  --server <id> Server ID (required)
@@ -229,16 +229,16 @@ ${colors.bold("OPTIONS:")}
229
229
  -f, --format <fmt> Output format: json, human, table
230
230
  `);
231
231
  else if (subcommand === "delete") console.log(`
232
- ${colors.bold("forge-cli backups delete")} - Delete a backup configuration
232
+ ${colors.bold("forge backups delete")} - Delete a backup configuration
233
233
 
234
234
  ${colors.bold("USAGE:")}
235
- forge-cli backups delete <backup_id> --server <server_id> [options]
235
+ forge backups delete <backup_id> --server <server_id> [options]
236
236
  `);
237
237
  else console.log(`
238
- ${colors.bold("forge-cli backups")} - Manage backup configurations
238
+ ${colors.bold("forge backups")} - Manage backup configurations
239
239
 
240
240
  ${colors.bold("USAGE:")}
241
- forge-cli backups <subcommand> [options]
241
+ forge backups <subcommand> [options]
242
242
 
243
243
  ${colors.bold("SUBCOMMANDS:")}
244
244
  list, ls List backup configurations
@@ -250,7 +250,7 @@ ${colors.bold("OPTIONS:")}
250
250
  --server <id> Server ID (required)
251
251
  -f, --format <fmt> Output format: json, human, table
252
252
 
253
- Run ${colors.cyan("forge-cli backups <subcommand> --help")} for details.
253
+ Run ${colors.cyan("forge backups <subcommand> --help")} for details.
254
254
  `);
255
255
  }
256
256
  /**
@@ -258,7 +258,7 @@ Run ${colors.cyan("forge-cli backups <subcommand> --help")} for details.
258
258
  */
259
259
  var BASH_COMPLETION = `#!/usr/bin/env bash
260
260
 
261
- _forge_cli_completions() {
261
+ _forge_completions() {
262
262
  local cur prev commands subcommands options
263
263
 
264
264
  COMPREPLY=()
@@ -398,11 +398,11 @@ _forge_cli_completions() {
398
398
  return 0
399
399
  }
400
400
 
401
- complete -F _forge_cli_completions forge-cli
401
+ complete -F _forge_completions forge
402
402
  `;
403
- var ZSH_COMPLETION = `#compdef forge-cli
403
+ var ZSH_COMPLETION = `#compdef forge
404
404
 
405
- _forge_cli() {
405
+ _forge() {
406
406
  local line state
407
407
 
408
408
  _arguments -C \\
@@ -700,198 +700,198 @@ _forge_cli() {
700
700
  esac
701
701
  }
702
702
 
703
- _forge_cli "$@"
703
+ _forge "$@"
704
704
  `;
705
- var FISH_COMPLETION = `# Completions for forge-cli
705
+ var FISH_COMPLETION = `# Completions for forge
706
706
 
707
707
  # Main commands
708
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "config" -d "Manage CLI configuration"
709
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "servers" -d "Manage servers"
710
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "s" -d "Manage servers (alias)"
711
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "sites" -d "Manage sites"
712
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "deployments" -d "Manage deployments"
713
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "d" -d "Manage deployments (alias)"
714
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "databases" -d "Manage databases"
715
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "db" -d "Manage databases (alias)"
716
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "database-users" -d "Manage database users"
717
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "daemons" -d "Manage daemons"
718
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "env" -d "Manage environment variables"
719
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "nginx" -d "Manage nginx configuration"
720
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "certificates" -d "Manage SSL certificates"
721
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "certs" -d "Manage SSL certificates (alias)"
722
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "firewall-rules" -d "Manage firewall rules"
723
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "fw" -d "Manage firewall rules (alias)"
724
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "ssh-keys" -d "Manage SSH keys"
725
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "backups" -d "Manage backup configurations"
726
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "commands" -d "Manage site commands"
727
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "scheduled-jobs" -d "Manage scheduled jobs"
728
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "user" -d "Display authenticated user profile"
729
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "monitors" -d "Manage server monitors"
730
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "nginx-templates" -d "Manage Nginx templates"
731
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "security-rules" -d "Manage site security rules"
732
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "redirect-rules" -d "Manage site redirect rules"
733
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "recipes" -d "Manage recipes"
734
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "completion" -d "Generate shell completion script"
735
- complete -c forge-cli -f -n "__fish_use_subcommand" -a "help" -d "Show help"
708
+ complete -c forge -f -n "__fish_use_subcommand" -a "config" -d "Manage CLI configuration"
709
+ complete -c forge -f -n "__fish_use_subcommand" -a "servers" -d "Manage servers"
710
+ complete -c forge -f -n "__fish_use_subcommand" -a "s" -d "Manage servers (alias)"
711
+ complete -c forge -f -n "__fish_use_subcommand" -a "sites" -d "Manage sites"
712
+ complete -c forge -f -n "__fish_use_subcommand" -a "deployments" -d "Manage deployments"
713
+ complete -c forge -f -n "__fish_use_subcommand" -a "d" -d "Manage deployments (alias)"
714
+ complete -c forge -f -n "__fish_use_subcommand" -a "databases" -d "Manage databases"
715
+ complete -c forge -f -n "__fish_use_subcommand" -a "db" -d "Manage databases (alias)"
716
+ complete -c forge -f -n "__fish_use_subcommand" -a "database-users" -d "Manage database users"
717
+ complete -c forge -f -n "__fish_use_subcommand" -a "daemons" -d "Manage daemons"
718
+ complete -c forge -f -n "__fish_use_subcommand" -a "env" -d "Manage environment variables"
719
+ complete -c forge -f -n "__fish_use_subcommand" -a "nginx" -d "Manage nginx configuration"
720
+ complete -c forge -f -n "__fish_use_subcommand" -a "certificates" -d "Manage SSL certificates"
721
+ complete -c forge -f -n "__fish_use_subcommand" -a "certs" -d "Manage SSL certificates (alias)"
722
+ complete -c forge -f -n "__fish_use_subcommand" -a "firewall-rules" -d "Manage firewall rules"
723
+ complete -c forge -f -n "__fish_use_subcommand" -a "fw" -d "Manage firewall rules (alias)"
724
+ complete -c forge -f -n "__fish_use_subcommand" -a "ssh-keys" -d "Manage SSH keys"
725
+ complete -c forge -f -n "__fish_use_subcommand" -a "backups" -d "Manage backup configurations"
726
+ complete -c forge -f -n "__fish_use_subcommand" -a "commands" -d "Manage site commands"
727
+ complete -c forge -f -n "__fish_use_subcommand" -a "scheduled-jobs" -d "Manage scheduled jobs"
728
+ complete -c forge -f -n "__fish_use_subcommand" -a "user" -d "Display authenticated user profile"
729
+ complete -c forge -f -n "__fish_use_subcommand" -a "monitors" -d "Manage server monitors"
730
+ complete -c forge -f -n "__fish_use_subcommand" -a "nginx-templates" -d "Manage Nginx templates"
731
+ complete -c forge -f -n "__fish_use_subcommand" -a "security-rules" -d "Manage site security rules"
732
+ complete -c forge -f -n "__fish_use_subcommand" -a "redirect-rules" -d "Manage site redirect rules"
733
+ complete -c forge -f -n "__fish_use_subcommand" -a "recipes" -d "Manage recipes"
734
+ complete -c forge -f -n "__fish_use_subcommand" -a "completion" -d "Generate shell completion script"
735
+ complete -c forge -f -n "__fish_use_subcommand" -a "help" -d "Show help"
736
736
 
737
737
  # config subcommands
738
- complete -c forge-cli -f -n "__fish_seen_subcommand_from config" -a "set" -d "Save API token"
739
- complete -c forge-cli -f -n "__fish_seen_subcommand_from config" -a "get" -d "Show current token"
740
- complete -c forge-cli -f -n "__fish_seen_subcommand_from config" -a "delete" -d "Delete stored token"
738
+ complete -c forge -f -n "__fish_seen_subcommand_from config" -a "set" -d "Save API token"
739
+ complete -c forge -f -n "__fish_seen_subcommand_from config" -a "get" -d "Show current token"
740
+ complete -c forge -f -n "__fish_seen_subcommand_from config" -a "delete" -d "Delete stored token"
741
741
 
742
742
  # servers subcommands
743
- complete -c forge-cli -f -n "__fish_seen_subcommand_from servers s" -a "list" -d "List all servers"
744
- complete -c forge-cli -f -n "__fish_seen_subcommand_from servers s" -a "ls" -d "List all servers (alias)"
745
- complete -c forge-cli -f -n "__fish_seen_subcommand_from servers s" -a "get" -d "Get server details"
746
- complete -c forge-cli -f -n "__fish_seen_subcommand_from servers s" -a "reboot" -d "Reboot a server"
743
+ complete -c forge -f -n "__fish_seen_subcommand_from servers s" -a "list" -d "List all servers"
744
+ complete -c forge -f -n "__fish_seen_subcommand_from servers s" -a "ls" -d "List all servers (alias)"
745
+ complete -c forge -f -n "__fish_seen_subcommand_from servers s" -a "get" -d "Get server details"
746
+ complete -c forge -f -n "__fish_seen_subcommand_from servers s" -a "reboot" -d "Reboot a server"
747
747
 
748
748
  # sites subcommands
749
- complete -c forge-cli -f -n "__fish_seen_subcommand_from sites" -a "list" -d "List sites"
750
- complete -c forge-cli -f -n "__fish_seen_subcommand_from sites" -a "ls" -d "List sites (alias)"
751
- complete -c forge-cli -f -n "__fish_seen_subcommand_from sites" -a "get" -d "Get site details"
749
+ complete -c forge -f -n "__fish_seen_subcommand_from sites" -a "list" -d "List sites"
750
+ complete -c forge -f -n "__fish_seen_subcommand_from sites" -a "ls" -d "List sites (alias)"
751
+ complete -c forge -f -n "__fish_seen_subcommand_from sites" -a "get" -d "Get site details"
752
752
 
753
753
  # deployments subcommands
754
- complete -c forge-cli -f -n "__fish_seen_subcommand_from deployments d" -a "list" -d "List deployments"
755
- complete -c forge-cli -f -n "__fish_seen_subcommand_from deployments d" -a "ls" -d "List deployments (alias)"
756
- complete -c forge-cli -f -n "__fish_seen_subcommand_from deployments d" -a "deploy" -d "Trigger a deployment"
754
+ complete -c forge -f -n "__fish_seen_subcommand_from deployments d" -a "list" -d "List deployments"
755
+ complete -c forge -f -n "__fish_seen_subcommand_from deployments d" -a "ls" -d "List deployments (alias)"
756
+ complete -c forge -f -n "__fish_seen_subcommand_from deployments d" -a "deploy" -d "Trigger a deployment"
757
757
 
758
758
  # databases subcommands
759
- complete -c forge-cli -f -n "__fish_seen_subcommand_from databases db" -a "list" -d "List databases"
760
- complete -c forge-cli -f -n "__fish_seen_subcommand_from databases db" -a "ls" -d "List databases (alias)"
761
- complete -c forge-cli -f -n "__fish_seen_subcommand_from databases db" -a "get" -d "Get database details"
759
+ complete -c forge -f -n "__fish_seen_subcommand_from databases db" -a "list" -d "List databases"
760
+ complete -c forge -f -n "__fish_seen_subcommand_from databases db" -a "ls" -d "List databases (alias)"
761
+ complete -c forge -f -n "__fish_seen_subcommand_from databases db" -a "get" -d "Get database details"
762
762
 
763
763
  # database-users subcommands
764
- complete -c forge-cli -f -n "__fish_seen_subcommand_from database-users" -a "list" -d "List database users"
765
- complete -c forge-cli -f -n "__fish_seen_subcommand_from database-users" -a "ls" -d "List database users (alias)"
766
- complete -c forge-cli -f -n "__fish_seen_subcommand_from database-users" -a "get" -d "Get database user details"
767
- complete -c forge-cli -f -n "__fish_seen_subcommand_from database-users" -a "create" -d "Create a database user"
768
- complete -c forge-cli -f -n "__fish_seen_subcommand_from database-users" -a "delete" -d "Delete a database user"
764
+ complete -c forge -f -n "__fish_seen_subcommand_from database-users" -a "list" -d "List database users"
765
+ complete -c forge -f -n "__fish_seen_subcommand_from database-users" -a "ls" -d "List database users (alias)"
766
+ complete -c forge -f -n "__fish_seen_subcommand_from database-users" -a "get" -d "Get database user details"
767
+ complete -c forge -f -n "__fish_seen_subcommand_from database-users" -a "create" -d "Create a database user"
768
+ complete -c forge -f -n "__fish_seen_subcommand_from database-users" -a "delete" -d "Delete a database user"
769
769
 
770
770
  # daemons subcommands
771
- complete -c forge-cli -f -n "__fish_seen_subcommand_from daemons" -a "list" -d "List daemons"
772
- complete -c forge-cli -f -n "__fish_seen_subcommand_from daemons" -a "ls" -d "List daemons (alias)"
773
- complete -c forge-cli -f -n "__fish_seen_subcommand_from daemons" -a "get" -d "Get daemon details"
774
- complete -c forge-cli -f -n "__fish_seen_subcommand_from daemons" -a "restart" -d "Restart a daemon"
771
+ complete -c forge -f -n "__fish_seen_subcommand_from daemons" -a "list" -d "List daemons"
772
+ complete -c forge -f -n "__fish_seen_subcommand_from daemons" -a "ls" -d "List daemons (alias)"
773
+ complete -c forge -f -n "__fish_seen_subcommand_from daemons" -a "get" -d "Get daemon details"
774
+ complete -c forge -f -n "__fish_seen_subcommand_from daemons" -a "restart" -d "Restart a daemon"
775
775
 
776
776
  # env subcommands
777
- complete -c forge-cli -f -n "__fish_seen_subcommand_from env" -a "get" -d "Get env variables"
778
- complete -c forge-cli -f -n "__fish_seen_subcommand_from env" -a "update" -d "Update env variables"
777
+ complete -c forge -f -n "__fish_seen_subcommand_from env" -a "get" -d "Get env variables"
778
+ complete -c forge -f -n "__fish_seen_subcommand_from env" -a "update" -d "Update env variables"
779
779
 
780
780
  # nginx subcommands
781
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx" -a "get" -d "Get nginx config"
782
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx" -a "update" -d "Update nginx config"
781
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx" -a "get" -d "Get nginx config"
782
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx" -a "update" -d "Update nginx config"
783
783
 
784
784
  # certificates subcommands
785
- complete -c forge-cli -f -n "__fish_seen_subcommand_from certificates certs" -a "list" -d "List certificates"
786
- complete -c forge-cli -f -n "__fish_seen_subcommand_from certificates certs" -a "ls" -d "List certificates (alias)"
787
- complete -c forge-cli -f -n "__fish_seen_subcommand_from certificates certs" -a "get" -d "Get certificate details"
788
- complete -c forge-cli -f -n "__fish_seen_subcommand_from certificates certs" -a "activate" -d "Activate a certificate"
785
+ complete -c forge -f -n "__fish_seen_subcommand_from certificates certs" -a "list" -d "List certificates"
786
+ complete -c forge -f -n "__fish_seen_subcommand_from certificates certs" -a "ls" -d "List certificates (alias)"
787
+ complete -c forge -f -n "__fish_seen_subcommand_from certificates certs" -a "get" -d "Get certificate details"
788
+ complete -c forge -f -n "__fish_seen_subcommand_from certificates certs" -a "activate" -d "Activate a certificate"
789
789
 
790
790
  # firewall-rules subcommands
791
- complete -c forge-cli -f -n "__fish_seen_subcommand_from firewall-rules fw" -a "list" -d "List firewall rules"
792
- complete -c forge-cli -f -n "__fish_seen_subcommand_from firewall-rules fw" -a "ls" -d "List firewall rules (alias)"
793
- complete -c forge-cli -f -n "__fish_seen_subcommand_from firewall-rules fw" -a "get" -d "Get firewall rule details"
791
+ complete -c forge -f -n "__fish_seen_subcommand_from firewall-rules fw" -a "list" -d "List firewall rules"
792
+ complete -c forge -f -n "__fish_seen_subcommand_from firewall-rules fw" -a "ls" -d "List firewall rules (alias)"
793
+ complete -c forge -f -n "__fish_seen_subcommand_from firewall-rules fw" -a "get" -d "Get firewall rule details"
794
794
 
795
795
  # ssh-keys subcommands
796
- complete -c forge-cli -f -n "__fish_seen_subcommand_from ssh-keys" -a "list" -d "List SSH keys"
797
- complete -c forge-cli -f -n "__fish_seen_subcommand_from ssh-keys" -a "ls" -d "List SSH keys (alias)"
798
- complete -c forge-cli -f -n "__fish_seen_subcommand_from ssh-keys" -a "get" -d "Get SSH key details"
796
+ complete -c forge -f -n "__fish_seen_subcommand_from ssh-keys" -a "list" -d "List SSH keys"
797
+ complete -c forge -f -n "__fish_seen_subcommand_from ssh-keys" -a "ls" -d "List SSH keys (alias)"
798
+ complete -c forge -f -n "__fish_seen_subcommand_from ssh-keys" -a "get" -d "Get SSH key details"
799
799
 
800
800
  # backups subcommands
801
- complete -c forge-cli -f -n "__fish_seen_subcommand_from backups" -a "list" -d "List backup configurations"
802
- complete -c forge-cli -f -n "__fish_seen_subcommand_from backups" -a "ls" -d "List backup configurations (alias)"
803
- complete -c forge-cli -f -n "__fish_seen_subcommand_from backups" -a "get" -d "Get backup configuration details"
804
- complete -c forge-cli -f -n "__fish_seen_subcommand_from backups" -a "create" -d "Create a backup configuration"
805
- complete -c forge-cli -f -n "__fish_seen_subcommand_from backups" -a "delete" -d "Delete a backup configuration"
801
+ complete -c forge -f -n "__fish_seen_subcommand_from backups" -a "list" -d "List backup configurations"
802
+ complete -c forge -f -n "__fish_seen_subcommand_from backups" -a "ls" -d "List backup configurations (alias)"
803
+ complete -c forge -f -n "__fish_seen_subcommand_from backups" -a "get" -d "Get backup configuration details"
804
+ complete -c forge -f -n "__fish_seen_subcommand_from backups" -a "create" -d "Create a backup configuration"
805
+ complete -c forge -f -n "__fish_seen_subcommand_from backups" -a "delete" -d "Delete a backup configuration"
806
806
 
807
807
  # commands subcommands
808
- complete -c forge-cli -f -n "__fish_seen_subcommand_from commands" -a "list" -d "List commands"
809
- complete -c forge-cli -f -n "__fish_seen_subcommand_from commands" -a "ls" -d "List commands (alias)"
810
- complete -c forge-cli -f -n "__fish_seen_subcommand_from commands" -a "get" -d "Get command details"
811
- complete -c forge-cli -f -n "__fish_seen_subcommand_from commands" -a "create" -d "Execute a command"
808
+ complete -c forge -f -n "__fish_seen_subcommand_from commands" -a "list" -d "List commands"
809
+ complete -c forge -f -n "__fish_seen_subcommand_from commands" -a "ls" -d "List commands (alias)"
810
+ complete -c forge -f -n "__fish_seen_subcommand_from commands" -a "get" -d "Get command details"
811
+ complete -c forge -f -n "__fish_seen_subcommand_from commands" -a "create" -d "Execute a command"
812
812
 
813
813
  # scheduled-jobs subcommands
814
- complete -c forge-cli -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "list" -d "List scheduled jobs"
815
- complete -c forge-cli -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "ls" -d "List scheduled jobs (alias)"
816
- complete -c forge-cli -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "get" -d "Get scheduled job details"
817
- complete -c forge-cli -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "create" -d "Create a scheduled job"
818
- complete -c forge-cli -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "delete" -d "Delete a scheduled job"
814
+ complete -c forge -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "list" -d "List scheduled jobs"
815
+ complete -c forge -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "ls" -d "List scheduled jobs (alias)"
816
+ complete -c forge -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "get" -d "Get scheduled job details"
817
+ complete -c forge -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "create" -d "Create a scheduled job"
818
+ complete -c forge -f -n "__fish_seen_subcommand_from scheduled-jobs" -a "delete" -d "Delete a scheduled job"
819
819
 
820
820
  # user subcommands
821
- complete -c forge-cli -f -n "__fish_seen_subcommand_from user" -a "get" -d "Get the authenticated user profile"
821
+ complete -c forge -f -n "__fish_seen_subcommand_from user" -a "get" -d "Get the authenticated user profile"
822
822
 
823
823
  # monitors subcommands
824
- complete -c forge-cli -f -n "__fish_seen_subcommand_from monitors" -a "list" -d "List monitors"
825
- complete -c forge-cli -f -n "__fish_seen_subcommand_from monitors" -a "ls" -d "List monitors (alias)"
826
- complete -c forge-cli -f -n "__fish_seen_subcommand_from monitors" -a "get" -d "Get monitor details"
827
- complete -c forge-cli -f -n "__fish_seen_subcommand_from monitors" -a "create" -d "Create a monitor"
828
- complete -c forge-cli -f -n "__fish_seen_subcommand_from monitors" -a "delete" -d "Delete a monitor"
824
+ complete -c forge -f -n "__fish_seen_subcommand_from monitors" -a "list" -d "List monitors"
825
+ complete -c forge -f -n "__fish_seen_subcommand_from monitors" -a "ls" -d "List monitors (alias)"
826
+ complete -c forge -f -n "__fish_seen_subcommand_from monitors" -a "get" -d "Get monitor details"
827
+ complete -c forge -f -n "__fish_seen_subcommand_from monitors" -a "create" -d "Create a monitor"
828
+ complete -c forge -f -n "__fish_seen_subcommand_from monitors" -a "delete" -d "Delete a monitor"
829
829
 
830
830
  # nginx-templates subcommands
831
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx-templates" -a "list" -d "List Nginx templates"
832
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx-templates" -a "ls" -d "List Nginx templates (alias)"
833
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx-templates" -a "get" -d "Get Nginx template details"
834
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx-templates" -a "create" -d "Create a Nginx template"
835
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx-templates" -a "update" -d "Update a Nginx template"
836
- complete -c forge-cli -f -n "__fish_seen_subcommand_from nginx-templates" -a "delete" -d "Delete a Nginx template"
831
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx-templates" -a "list" -d "List Nginx templates"
832
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx-templates" -a "ls" -d "List Nginx templates (alias)"
833
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx-templates" -a "get" -d "Get Nginx template details"
834
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx-templates" -a "create" -d "Create a Nginx template"
835
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx-templates" -a "update" -d "Update a Nginx template"
836
+ complete -c forge -f -n "__fish_seen_subcommand_from nginx-templates" -a "delete" -d "Delete a Nginx template"
837
837
 
838
838
  # security-rules subcommands
839
- complete -c forge-cli -f -n "__fish_seen_subcommand_from security-rules" -a "list" -d "List security rules"
840
- complete -c forge-cli -f -n "__fish_seen_subcommand_from security-rules" -a "ls" -d "List security rules (alias)"
841
- complete -c forge-cli -f -n "__fish_seen_subcommand_from security-rules" -a "get" -d "Get security rule details"
842
- complete -c forge-cli -f -n "__fish_seen_subcommand_from security-rules" -a "create" -d "Create a security rule"
843
- complete -c forge-cli -f -n "__fish_seen_subcommand_from security-rules" -a "delete" -d "Delete a security rule"
839
+ complete -c forge -f -n "__fish_seen_subcommand_from security-rules" -a "list" -d "List security rules"
840
+ complete -c forge -f -n "__fish_seen_subcommand_from security-rules" -a "ls" -d "List security rules (alias)"
841
+ complete -c forge -f -n "__fish_seen_subcommand_from security-rules" -a "get" -d "Get security rule details"
842
+ complete -c forge -f -n "__fish_seen_subcommand_from security-rules" -a "create" -d "Create a security rule"
843
+ complete -c forge -f -n "__fish_seen_subcommand_from security-rules" -a "delete" -d "Delete a security rule"
844
844
 
845
845
  # redirect-rules subcommands
846
- complete -c forge-cli -f -n "__fish_seen_subcommand_from redirect-rules" -a "list" -d "List redirect rules"
847
- complete -c forge-cli -f -n "__fish_seen_subcommand_from redirect-rules" -a "ls" -d "List redirect rules (alias)"
848
- complete -c forge-cli -f -n "__fish_seen_subcommand_from redirect-rules" -a "get" -d "Get redirect rule details"
849
- complete -c forge-cli -f -n "__fish_seen_subcommand_from redirect-rules" -a "create" -d "Create a redirect rule"
850
- complete -c forge-cli -f -n "__fish_seen_subcommand_from redirect-rules" -a "delete" -d "Delete a redirect rule"
846
+ complete -c forge -f -n "__fish_seen_subcommand_from redirect-rules" -a "list" -d "List redirect rules"
847
+ complete -c forge -f -n "__fish_seen_subcommand_from redirect-rules" -a "ls" -d "List redirect rules (alias)"
848
+ complete -c forge -f -n "__fish_seen_subcommand_from redirect-rules" -a "get" -d "Get redirect rule details"
849
+ complete -c forge -f -n "__fish_seen_subcommand_from redirect-rules" -a "create" -d "Create a redirect rule"
850
+ complete -c forge -f -n "__fish_seen_subcommand_from redirect-rules" -a "delete" -d "Delete a redirect rule"
851
851
 
852
852
  # recipes subcommands
853
- complete -c forge-cli -f -n "__fish_seen_subcommand_from recipes" -a "list" -d "List all recipes"
854
- complete -c forge-cli -f -n "__fish_seen_subcommand_from recipes" -a "ls" -d "List all recipes (alias)"
855
- complete -c forge-cli -f -n "__fish_seen_subcommand_from recipes" -a "get" -d "Get recipe details"
856
- complete -c forge-cli -f -n "__fish_seen_subcommand_from recipes" -a "run" -d "Run a recipe"
853
+ complete -c forge -f -n "__fish_seen_subcommand_from recipes" -a "list" -d "List all recipes"
854
+ complete -c forge -f -n "__fish_seen_subcommand_from recipes" -a "ls" -d "List all recipes (alias)"
855
+ complete -c forge -f -n "__fish_seen_subcommand_from recipes" -a "get" -d "Get recipe details"
856
+ complete -c forge -f -n "__fish_seen_subcommand_from recipes" -a "run" -d "Run a recipe"
857
857
 
858
858
  # completion subcommands
859
- complete -c forge-cli -f -n "__fish_seen_subcommand_from completion" -a "bash" -d "Install Bash completion"
860
- complete -c forge-cli -f -n "__fish_seen_subcommand_from completion" -a "zsh" -d "Install Zsh completion"
861
- complete -c forge-cli -f -n "__fish_seen_subcommand_from completion" -a "fish" -d "Install Fish completion"
859
+ complete -c forge -f -n "__fish_seen_subcommand_from completion" -a "bash" -d "Install Bash completion"
860
+ complete -c forge -f -n "__fish_seen_subcommand_from completion" -a "zsh" -d "Install Zsh completion"
861
+ complete -c forge -f -n "__fish_seen_subcommand_from completion" -a "fish" -d "Install Fish completion"
862
862
 
863
863
  # Global options
864
- complete -c forge-cli -l token -d "API token" -r
865
- complete -c forge-cli -l server -d "Server ID" -r
866
- complete -c forge-cli -l site -d "Site ID" -r
867
- complete -c forge-cli -s f -l format -d "Output format" -xa "json human table"
868
- complete -c forge-cli -l no-color -d "Disable colored output"
869
- complete -c forge-cli -s h -l help -d "Show help"
870
- complete -c forge-cli -s v -l version -d "Show version"
871
- complete -c forge-cli -l name -d "Name" -r
872
- complete -c forge-cli -l command -d "Command" -r
873
- complete -c forge-cli -l content -d "Content" -r
874
- complete -c forge-cli -l from -d "From" -r
875
- complete -c forge-cli -l to -d "To" -r
876
- complete -c forge-cli -l provider -d "Provider" -r
877
- complete -c forge-cli -l frequency -d "Frequency" -r
878
- complete -c forge-cli -l type -d "Type" -r
879
- complete -c forge-cli -l operator -d "Operator" -r
880
- complete -c forge-cli -l threshold -d "Threshold" -r
881
- complete -c forge-cli -l minutes -d "Minutes" -r
882
- complete -c forge-cli -l key -d "Key" -r
883
- complete -c forge-cli -l port -d "Port" -r
884
- complete -c forge-cli -l ip-address -d "IP address" -r
885
- complete -c forge-cli -l user -d "User" -r
886
- complete -c forge-cli -l script -d "Script" -r
887
- complete -c forge-cli -l servers -d "Servers" -r
888
- complete -c forge-cli -l domain -d "Domain" -r
889
- complete -c forge-cli -l password -d "Password" -r
890
- complete -c forge-cli -l credential-id -d "Credential ID" -r
891
- complete -c forge-cli -l region -d "Region" -r
892
- complete -c forge-cli -l size -d "Size" -r
893
- complete -c forge-cli -l project-type -d "Project type" -r
894
- complete -c forge-cli -l directory -d "Directory" -r
864
+ complete -c forge -l token -d "API token" -r
865
+ complete -c forge -l server -d "Server ID" -r
866
+ complete -c forge -l site -d "Site ID" -r
867
+ complete -c forge -s f -l format -d "Output format" -xa "json human table"
868
+ complete -c forge -l no-color -d "Disable colored output"
869
+ complete -c forge -s h -l help -d "Show help"
870
+ complete -c forge -s v -l version -d "Show version"
871
+ complete -c forge -l name -d "Name" -r
872
+ complete -c forge -l command -d "Command" -r
873
+ complete -c forge -l content -d "Content" -r
874
+ complete -c forge -l from -d "From" -r
875
+ complete -c forge -l to -d "To" -r
876
+ complete -c forge -l provider -d "Provider" -r
877
+ complete -c forge -l frequency -d "Frequency" -r
878
+ complete -c forge -l type -d "Type" -r
879
+ complete -c forge -l operator -d "Operator" -r
880
+ complete -c forge -l threshold -d "Threshold" -r
881
+ complete -c forge -l minutes -d "Minutes" -r
882
+ complete -c forge -l key -d "Key" -r
883
+ complete -c forge -l port -d "Port" -r
884
+ complete -c forge -l ip-address -d "IP address" -r
885
+ complete -c forge -l user -d "User" -r
886
+ complete -c forge -l script -d "Script" -r
887
+ complete -c forge -l servers -d "Servers" -r
888
+ complete -c forge -l domain -d "Domain" -r
889
+ complete -c forge -l password -d "Password" -r
890
+ complete -c forge -l credential-id -d "Credential ID" -r
891
+ complete -c forge -l region -d "Region" -r
892
+ complete -c forge -l size -d "Size" -r
893
+ complete -c forge -l project-type -d "Project type" -r
894
+ complete -c forge -l directory -d "Directory" -r
895
895
  `;
896
896
  /**
897
897
  * Get the appropriate completion file path for the shell
@@ -899,18 +899,18 @@ complete -c forge-cli -l directory -d "Directory" -r
899
899
  function getCompletionPath(shell) {
900
900
  const home = homedir();
901
901
  switch (shell) {
902
- case "bash": return join(home, ".local/share/bash-completion/completions/forge-cli");
903
- case "zsh": return join(home, ".zfunc/_forge-cli");
904
- case "fish": return join(process.env["XDG_CONFIG_HOME"] ?? join(home, ".config"), "fish/completions/forge-cli.fish");
902
+ case "bash": return join(home, ".local/share/bash-completion/completions/forge");
903
+ case "zsh": return join(home, ".zfunc/_forge");
904
+ case "fish": return join(process.env["XDG_CONFIG_HOME"] ?? join(home, ".config"), "fish/completions/forge.fish");
905
905
  default: throw new Error(`Unknown shell: ${shell}`);
906
906
  }
907
907
  }
908
908
  function showCompletionHelp() {
909
909
  console.log(`
910
- ${colors.bold("forge-cli completion")} - Install shell completion
910
+ ${colors.bold("forge completion")} - Install shell completion
911
911
 
912
912
  ${colors.bold("USAGE:")}
913
- forge-cli completion <shell> [--print]
913
+ forge completion <shell> [--print]
914
914
 
915
915
  ${colors.bold("SHELLS:")}
916
916
  bash Install Bash completion
@@ -926,27 +926,27 @@ ${colors.bold("INSTALLATION:")}
926
926
  shell to activate completions.
927
927
 
928
928
  ${colors.bold("Bash:")}
929
- forge-cli completion bash
930
- # Installs to: ~/.local/share/bash-completion/completions/forge-cli
929
+ forge completion bash
930
+ # Installs to: ~/.local/share/bash-completion/completions/forge
931
931
  # Then run: exec bash
932
932
 
933
933
  ${colors.bold("Zsh:")}
934
- forge-cli completion zsh
935
- # Installs to: ~/.zfunc/_forge-cli
934
+ forge completion zsh
935
+ # Installs to: ~/.zfunc/_forge
936
936
  # Ensure fpath includes ~/.zfunc (add to ~/.zshrc before compinit):
937
937
  # fpath=(~/.zfunc $fpath)
938
938
  # Then run: exec zsh
939
939
 
940
940
  ${colors.bold("Fish:")}
941
- forge-cli completion fish
942
- # Installs to: ~/.config/fish/completions/forge-cli.fish
941
+ forge completion fish
942
+ # Installs to: ~/.config/fish/completions/forge.fish
943
943
  # Completions are loaded automatically
944
944
 
945
945
  ${colors.bold("PRINT ONLY:")}
946
946
  Use --print to output the script without installing:
947
947
 
948
- forge-cli completion bash --print > my-completion.sh
949
- forge-cli completion zsh --print | less
948
+ forge completion bash --print > my-completion.sh
949
+ forge completion zsh --print | less
950
950
  `);
951
951
  }
952
952
  function handleCompletionCommand(shell, options = {}) {
@@ -965,7 +965,7 @@ function handleCompletionCommand(shell, options = {}) {
965
965
  break;
966
966
  default:
967
967
  console.error(`${colors.red("✗")} Unknown shell: ${shell}. Supported shells: bash, zsh, fish`);
968
- console.error(`Run ${colors.cyan("forge-cli completion --help")} for usage information.`);
968
+ console.error(`Run ${colors.cyan("forge completion --help")} for usage information.`);
969
969
  process.exit(1);
970
970
  return;
971
971
  }
@@ -1011,7 +1011,7 @@ function requireServerAndSiteRaw$3(ctx, usage) {
1011
1011
  };
1012
1012
  }
1013
1013
  async function certificatesList(ctx) {
1014
- const { server, site } = requireServerAndSiteRaw$3(ctx, "forge-cli certificates list --server <server_id> --site <site_id>");
1014
+ const { server, site } = requireServerAndSiteRaw$3(ctx, "forge certificates list --server <server_id> --site <site_id>");
1015
1015
  await runCommand(async () => {
1016
1016
  const token = ctx.getToken();
1017
1017
  const execCtx = ctx.createExecutorContext(token);
@@ -1031,7 +1031,7 @@ async function certificatesList(ctx) {
1031
1031
  }
1032
1032
  async function certificatesGet(args, ctx) {
1033
1033
  const [id] = args;
1034
- const usage = "forge-cli certificates get <cert_id> --server <server_id> --site <site_id>";
1034
+ const usage = "forge certificates get <cert_id> --server <server_id> --site <site_id>";
1035
1035
  if (!id) exitWithValidationError("certificate_id", usage, ctx.formatter);
1036
1036
  const { server, site } = requireServerAndSiteRaw$3(ctx, usage);
1037
1037
  await runCommand(async () => {
@@ -1057,7 +1057,7 @@ async function certificatesGet(args, ctx) {
1057
1057
  }
1058
1058
  async function certificatesActivate(args, ctx) {
1059
1059
  const [id] = args;
1060
- const usage = "forge-cli certificates activate <cert_id> --server <server_id> --site <site_id>";
1060
+ const usage = "forge certificates activate <cert_id> --server <server_id> --site <site_id>";
1061
1061
  if (!id) exitWithValidationError("certificate_id", usage, ctx.formatter);
1062
1062
  const { server, site } = requireServerAndSiteRaw$3(ctx, usage);
1063
1063
  await runCommand(async () => {
@@ -1084,31 +1084,31 @@ const handleCertificatesCommand = createCommandRouter({
1084
1084
  });
1085
1085
  function showCertificatesHelp(subcommand) {
1086
1086
  if (subcommand === "list" || subcommand === "ls") console.log(`
1087
- ${colors.bold("forge-cli certificates list")} - List certificates for a site
1087
+ ${colors.bold("forge certificates list")} - List certificates for a site
1088
1088
 
1089
1089
  ${colors.bold("USAGE:")}
1090
- forge-cli certificates list --server <server_id> --site <site_id> [options]
1090
+ forge certificates list --server <server_id> --site <site_id> [options]
1091
1091
  `);
1092
1092
  else if (subcommand === "get") console.log(`
1093
- ${colors.bold("forge-cli certificates get")} - Get certificate details
1093
+ ${colors.bold("forge certificates get")} - Get certificate details
1094
1094
 
1095
1095
  ${colors.bold("USAGE:")}
1096
- forge-cli certificates get <cert_id> --server <server_id> --site <site_id>
1096
+ forge certificates get <cert_id> --server <server_id> --site <site_id>
1097
1097
  `);
1098
1098
  else if (subcommand === "activate") console.log(`
1099
- ${colors.bold("forge-cli certificates activate")} - Activate a certificate
1099
+ ${colors.bold("forge certificates activate")} - Activate a certificate
1100
1100
 
1101
1101
  ${colors.bold("USAGE:")}
1102
- forge-cli certificates activate <cert_id> --server <server_id> --site <site_id>
1102
+ forge certificates activate <cert_id> --server <server_id> --site <site_id>
1103
1103
  `);
1104
1104
  else console.log(`
1105
- ${colors.bold("forge-cli certificates")} - Manage SSL certificates
1105
+ ${colors.bold("forge certificates")} - Manage SSL certificates
1106
1106
 
1107
1107
  ${colors.bold("USAGE:")}
1108
- forge-cli certificates <subcommand> [options]
1108
+ forge certificates <subcommand> [options]
1109
1109
 
1110
1110
  ${colors.bold("ALIASES:")}
1111
- forge-cli certs
1111
+ forge certs
1112
1112
 
1113
1113
  ${colors.bold("SUBCOMMANDS:")}
1114
1114
  list, ls List certificates
@@ -1120,7 +1120,7 @@ ${colors.bold("OPTIONS:")}
1120
1120
  --site <id> Site ID (required)
1121
1121
  -f, --format <fmt> Output format: json, human, table
1122
1122
 
1123
- Run ${colors.cyan("forge-cli certificates <subcommand> --help")} for details.
1123
+ Run ${colors.cyan("forge certificates <subcommand> --help")} for details.
1124
1124
  `);
1125
1125
  }
1126
1126
  function requireServerAndSiteRaw$2(ctx, usage) {
@@ -1134,7 +1134,7 @@ function requireServerAndSiteRaw$2(ctx, usage) {
1134
1134
  };
1135
1135
  }
1136
1136
  async function commandsList(ctx) {
1137
- const { server, site } = requireServerAndSiteRaw$2(ctx, "forge-cli commands list --server <server_id> --site <site_id>");
1137
+ const { server, site } = requireServerAndSiteRaw$2(ctx, "forge commands list --server <server_id> --site <site_id>");
1138
1138
  await runCommand(async () => {
1139
1139
  const token = ctx.getToken();
1140
1140
  const execCtx = ctx.createExecutorContext(token);
@@ -1153,7 +1153,7 @@ async function commandsList(ctx) {
1153
1153
  }
1154
1154
  async function commandsGet(args, ctx) {
1155
1155
  const [id] = args;
1156
- const usage = "forge-cli commands get <command_id> --server <server_id> --site <site_id>";
1156
+ const usage = "forge commands get <command_id> --server <server_id> --site <site_id>";
1157
1157
  if (!id) exitWithValidationError("command_id", usage, ctx.formatter);
1158
1158
  const { server, site } = requireServerAndSiteRaw$2(ctx, usage);
1159
1159
  await runCommand(async () => {
@@ -1175,7 +1175,7 @@ async function commandsGet(args, ctx) {
1175
1175
  }, ctx.formatter);
1176
1176
  }
1177
1177
  async function commandsCreate(ctx) {
1178
- const usage = "forge-cli commands create --server <server_id> --site <site_id> --command <command>";
1178
+ const usage = "forge commands create --server <server_id> --site <site_id> --command <command>";
1179
1179
  const { server, site } = requireServerAndSiteRaw$2(ctx, usage);
1180
1180
  const command = String(ctx.options.command ?? "");
1181
1181
  if (!command) exitWithValidationError("command", usage, ctx.formatter);
@@ -1208,10 +1208,10 @@ const handleCommandsCommand = createCommandRouter({
1208
1208
  });
1209
1209
  function showCommandsHelp(subcommand) {
1210
1210
  if (subcommand === "list" || subcommand === "ls") console.log(`
1211
- ${colors.bold("forge-cli commands list")} - List commands executed on a site
1211
+ ${colors.bold("forge commands list")} - List commands executed on a site
1212
1212
 
1213
1213
  ${colors.bold("USAGE:")}
1214
- forge-cli commands list --server <server_id> --site <site_id> [options]
1214
+ forge commands list --server <server_id> --site <site_id> [options]
1215
1215
 
1216
1216
  ${colors.bold("OPTIONS:")}
1217
1217
  --server <id> Server ID (required)
@@ -1219,16 +1219,16 @@ ${colors.bold("OPTIONS:")}
1219
1219
  -f, --format <fmt> Output format: json, human, table
1220
1220
  `);
1221
1221
  else if (subcommand === "get") console.log(`
1222
- ${colors.bold("forge-cli commands get")} - Get command details
1222
+ ${colors.bold("forge commands get")} - Get command details
1223
1223
 
1224
1224
  ${colors.bold("USAGE:")}
1225
- forge-cli commands get <command_id> --server <server_id> --site <site_id> [options]
1225
+ forge commands get <command_id> --server <server_id> --site <site_id> [options]
1226
1226
  `);
1227
1227
  else if (subcommand === "create") console.log(`
1228
- ${colors.bold("forge-cli commands create")} - Execute a command on a site
1228
+ ${colors.bold("forge commands create")} - Execute a command on a site
1229
1229
 
1230
1230
  ${colors.bold("USAGE:")}
1231
- forge-cli commands create --server <server_id> --site <site_id> --command <command> [options]
1231
+ forge commands create --server <server_id> --site <site_id> --command <command> [options]
1232
1232
 
1233
1233
  ${colors.bold("OPTIONS:")}
1234
1234
  --server <id> Server ID (required)
@@ -1237,10 +1237,10 @@ ${colors.bold("OPTIONS:")}
1237
1237
  -f, --format <fmt> Output format: json, human, table
1238
1238
  `);
1239
1239
  else console.log(`
1240
- ${colors.bold("forge-cli commands")} - Manage site commands
1240
+ ${colors.bold("forge commands")} - Manage site commands
1241
1241
 
1242
1242
  ${colors.bold("USAGE:")}
1243
- forge-cli commands <subcommand> [options]
1243
+ forge commands <subcommand> [options]
1244
1244
 
1245
1245
  ${colors.bold("SUBCOMMANDS:")}
1246
1246
  list, ls List commands
@@ -1252,18 +1252,18 @@ ${colors.bold("OPTIONS:")}
1252
1252
  --site <id> Site ID (required)
1253
1253
  -f, --format <fmt> Output format: json, human, table
1254
1254
 
1255
- Run ${colors.cyan("forge-cli commands <subcommand> --help")} for details.
1255
+ Run ${colors.cyan("forge commands <subcommand> --help")} for details.
1256
1256
  `);
1257
1257
  }
1258
1258
  /**
1259
- * Config command — manage forge-cli configuration
1259
+ * Config command — manage forge configuration
1260
1260
  */
1261
1261
  function showConfigHelp() {
1262
1262
  console.log(`
1263
- ${colors.bold("forge-cli config")} - Manage CLI configuration
1263
+ ${colors.bold("forge config")} - Manage CLI configuration
1264
1264
 
1265
1265
  ${colors.bold("USAGE:")}
1266
- forge-cli config <subcommand> [options]
1266
+ forge config <subcommand> [options]
1267
1267
 
1268
1268
  ${colors.bold("SUBCOMMANDS:")}
1269
1269
  set <token> Save API token to config file
@@ -1271,9 +1271,9 @@ ${colors.bold("SUBCOMMANDS:")}
1271
1271
  delete Delete stored API token
1272
1272
 
1273
1273
  ${colors.bold("EXAMPLES:")}
1274
- forge-cli config set YOUR_FORGE_TOKEN
1275
- forge-cli config get
1276
- forge-cli config delete
1274
+ forge config set YOUR_FORGE_TOKEN
1275
+ forge config get
1276
+ forge config delete
1277
1277
  `);
1278
1278
  }
1279
1279
  function handleConfigCommand(subcommand, args, options) {
@@ -1284,7 +1284,7 @@ function handleConfigCommand(subcommand, args, options) {
1284
1284
  case "set": {
1285
1285
  const [token] = args;
1286
1286
  if (!token) {
1287
- formatter.error("Token is required. Usage: forge-cli config set <token>");
1287
+ formatter.error("Token is required. Usage: forge config set <token>");
1288
1288
  process.exit(1);
1289
1289
  return;
1290
1290
  }
@@ -1296,7 +1296,7 @@ function handleConfigCommand(subcommand, args, options) {
1296
1296
  const token = getToken(store);
1297
1297
  if (!token) {
1298
1298
  formatter.warning("No API token configured.");
1299
- formatter.info("Run: forge-cli config set <token>");
1299
+ formatter.info("Run: forge config set <token>");
1300
1300
  } else {
1301
1301
  const masked = token.length > 8 ? `${token.slice(0, 4)}${"*".repeat(token.length - 8)}${token.slice(-4)}` : "****";
1302
1302
  if (format === "json") formatter.output({ apiToken: masked });
@@ -1315,7 +1315,7 @@ function handleConfigCommand(subcommand, args, options) {
1315
1315
  }
1316
1316
  async function daemonsList(ctx) {
1317
1317
  const server = String(ctx.options.server ?? "");
1318
- if (!server) exitWithValidationError("server_id", "forge-cli daemons list --server <server_id>", ctx.formatter);
1318
+ if (!server) exitWithValidationError("server_id", "forge daemons list --server <server_id>", ctx.formatter);
1319
1319
  await runCommand(async () => {
1320
1320
  const token = ctx.getToken();
1321
1321
  const execCtx = ctx.createExecutorContext(token);
@@ -1331,8 +1331,8 @@ async function daemonsList(ctx) {
1331
1331
  async function daemonsGet(args, ctx) {
1332
1332
  const [id] = args;
1333
1333
  const server = String(ctx.options.server ?? "");
1334
- if (!id) exitWithValidationError("daemon_id", "forge-cli daemons get <daemon_id> --server <server_id>", ctx.formatter);
1335
- if (!server) exitWithValidationError("server_id", "forge-cli daemons get <daemon_id> --server <server_id>", ctx.formatter);
1334
+ if (!id) exitWithValidationError("daemon_id", "forge daemons get <daemon_id> --server <server_id>", ctx.formatter);
1335
+ if (!server) exitWithValidationError("server_id", "forge daemons get <daemon_id> --server <server_id>", ctx.formatter);
1336
1336
  await runCommand(async () => {
1337
1337
  const token = ctx.getToken();
1338
1338
  const execCtx = ctx.createExecutorContext(token);
@@ -1354,8 +1354,8 @@ async function daemonsGet(args, ctx) {
1354
1354
  async function daemonsRestart(args, ctx) {
1355
1355
  const [id] = args;
1356
1356
  const server = String(ctx.options.server ?? "");
1357
- if (!id) exitWithValidationError("daemon_id", "forge-cli daemons restart <daemon_id> --server <server_id>", ctx.formatter);
1358
- if (!server) exitWithValidationError("server_id", "forge-cli daemons restart <daemon_id> --server <server_id>", ctx.formatter);
1357
+ if (!id) exitWithValidationError("daemon_id", "forge daemons restart <daemon_id> --server <server_id>", ctx.formatter);
1358
+ if (!server) exitWithValidationError("server_id", "forge daemons restart <daemon_id> --server <server_id>", ctx.formatter);
1359
1359
  await runCommand(async () => {
1360
1360
  const token = ctx.getToken();
1361
1361
  const execCtx = ctx.createExecutorContext(token);
@@ -1378,28 +1378,28 @@ const handleDaemonsCommand = createCommandRouter({
1378
1378
  });
1379
1379
  function showDaemonsHelp(subcommand) {
1380
1380
  if (subcommand === "list" || subcommand === "ls") console.log(`
1381
- ${colors.bold("forge-cli daemons list")} - List daemons on a server
1381
+ ${colors.bold("forge daemons list")} - List daemons on a server
1382
1382
 
1383
1383
  ${colors.bold("USAGE:")}
1384
- forge-cli daemons list --server <server_id> [options]
1384
+ forge daemons list --server <server_id> [options]
1385
1385
  `);
1386
1386
  else if (subcommand === "get") console.log(`
1387
- ${colors.bold("forge-cli daemons get")} - Get daemon details
1387
+ ${colors.bold("forge daemons get")} - Get daemon details
1388
1388
 
1389
1389
  ${colors.bold("USAGE:")}
1390
- forge-cli daemons get <daemon_id> --server <server_id>
1390
+ forge daemons get <daemon_id> --server <server_id>
1391
1391
  `);
1392
1392
  else if (subcommand === "restart") console.log(`
1393
- ${colors.bold("forge-cli daemons restart")} - Restart a daemon
1393
+ ${colors.bold("forge daemons restart")} - Restart a daemon
1394
1394
 
1395
1395
  ${colors.bold("USAGE:")}
1396
- forge-cli daemons restart <daemon_id> --server <server_id>
1396
+ forge daemons restart <daemon_id> --server <server_id>
1397
1397
  `);
1398
1398
  else console.log(`
1399
- ${colors.bold("forge-cli daemons")} - Manage daemons
1399
+ ${colors.bold("forge daemons")} - Manage daemons
1400
1400
 
1401
1401
  ${colors.bold("USAGE:")}
1402
- forge-cli daemons <subcommand> [options]
1402
+ forge daemons <subcommand> [options]
1403
1403
 
1404
1404
  ${colors.bold("SUBCOMMANDS:")}
1405
1405
  list, ls List daemons
@@ -1410,12 +1410,12 @@ ${colors.bold("OPTIONS:")}
1410
1410
  --server <id> Server ID (required)
1411
1411
  -f, --format <fmt> Output format: json, human, table
1412
1412
 
1413
- Run ${colors.cyan("forge-cli daemons <subcommand> --help")} for details.
1413
+ Run ${colors.cyan("forge daemons <subcommand> --help")} for details.
1414
1414
  `);
1415
1415
  }
1416
1416
  async function databasesList(ctx) {
1417
1417
  const server = String(ctx.options.server ?? "");
1418
- if (!server) exitWithValidationError("server_id", "forge-cli databases list --server <server_id>", ctx.formatter);
1418
+ if (!server) exitWithValidationError("server_id", "forge databases list --server <server_id>", ctx.formatter);
1419
1419
  await runCommand(async () => {
1420
1420
  const token = ctx.getToken();
1421
1421
  const execCtx = ctx.createExecutorContext(token);
@@ -1430,8 +1430,8 @@ async function databasesList(ctx) {
1430
1430
  async function databasesGet(args, ctx) {
1431
1431
  const [id] = args;
1432
1432
  const server = String(ctx.options.server ?? "");
1433
- if (!id) exitWithValidationError("database_id", "forge-cli databases get <database_id> --server <server_id>", ctx.formatter);
1434
- if (!server) exitWithValidationError("server_id", "forge-cli databases get <database_id> --server <server_id>", ctx.formatter);
1433
+ if (!id) exitWithValidationError("database_id", "forge databases get <database_id> --server <server_id>", ctx.formatter);
1434
+ if (!server) exitWithValidationError("server_id", "forge databases get <database_id> --server <server_id>", ctx.formatter);
1435
1435
  await runCommand(async () => {
1436
1436
  const token = ctx.getToken();
1437
1437
  const execCtx = ctx.createExecutorContext(token);
@@ -1457,29 +1457,29 @@ const handleDatabasesCommand = createCommandRouter({
1457
1457
  });
1458
1458
  function showDatabasesHelp(subcommand) {
1459
1459
  if (subcommand === "list" || subcommand === "ls") console.log(`
1460
- ${colors.bold("forge-cli databases list")} - List databases on a server
1460
+ ${colors.bold("forge databases list")} - List databases on a server
1461
1461
 
1462
1462
  ${colors.bold("USAGE:")}
1463
- forge-cli databases list --server <server_id> [options]
1463
+ forge databases list --server <server_id> [options]
1464
1464
 
1465
1465
  ${colors.bold("OPTIONS:")}
1466
1466
  --server <id> Server ID (required)
1467
1467
  -f, --format <fmt> Output format: json, human, table
1468
1468
  `);
1469
1469
  else if (subcommand === "get") console.log(`
1470
- ${colors.bold("forge-cli databases get")} - Get database details
1470
+ ${colors.bold("forge databases get")} - Get database details
1471
1471
 
1472
1472
  ${colors.bold("USAGE:")}
1473
- forge-cli databases get <database_id> --server <server_id> [options]
1473
+ forge databases get <database_id> --server <server_id> [options]
1474
1474
  `);
1475
1475
  else console.log(`
1476
- ${colors.bold("forge-cli databases")} - Manage databases
1476
+ ${colors.bold("forge databases")} - Manage databases
1477
1477
 
1478
1478
  ${colors.bold("USAGE:")}
1479
- forge-cli databases <subcommand> [options]
1479
+ forge databases <subcommand> [options]
1480
1480
 
1481
1481
  ${colors.bold("ALIASES:")}
1482
- forge-cli db
1482
+ forge db
1483
1483
 
1484
1484
  ${colors.bold("SUBCOMMANDS:")}
1485
1485
  list, ls List databases
@@ -1489,12 +1489,12 @@ ${colors.bold("OPTIONS:")}
1489
1489
  --server <id> Server ID (required)
1490
1490
  -f, --format <fmt> Output format: json, human, table
1491
1491
 
1492
- Run ${colors.cyan("forge-cli databases <subcommand> --help")} for details.
1492
+ Run ${colors.cyan("forge databases <subcommand> --help")} for details.
1493
1493
  `);
1494
1494
  }
1495
1495
  async function databaseUsersList(ctx) {
1496
1496
  const server = String(ctx.options.server ?? "");
1497
- if (!server) exitWithValidationError("server_id", "forge-cli database-users list --server <server_id>", ctx.formatter);
1497
+ if (!server) exitWithValidationError("server_id", "forge database-users list --server <server_id>", ctx.formatter);
1498
1498
  await runCommand(async () => {
1499
1499
  const token = ctx.getToken();
1500
1500
  const execCtx = ctx.createExecutorContext(token);
@@ -1509,8 +1509,8 @@ async function databaseUsersList(ctx) {
1509
1509
  async function databaseUsersGet(args, ctx) {
1510
1510
  const [id] = args;
1511
1511
  const server = String(ctx.options.server ?? "");
1512
- if (!id) exitWithValidationError("user_id", "forge-cli database-users get <user_id> --server <server_id>", ctx.formatter);
1513
- if (!server) exitWithValidationError("server_id", "forge-cli database-users get <user_id> --server <server_id>", ctx.formatter);
1512
+ if (!id) exitWithValidationError("user_id", "forge database-users get <user_id> --server <server_id>", ctx.formatter);
1513
+ if (!server) exitWithValidationError("server_id", "forge database-users get <user_id> --server <server_id>", ctx.formatter);
1514
1514
  await runCommand(async () => {
1515
1515
  const token = ctx.getToken();
1516
1516
  const execCtx = ctx.createExecutorContext(token);
@@ -1533,9 +1533,9 @@ async function databaseUsersCreate(ctx) {
1533
1533
  const password = String(ctx.options.password ?? "");
1534
1534
  const databasesRaw = ctx.options.databases;
1535
1535
  const databases = Array.isArray(databasesRaw) ? databasesRaw.map(Number) : databasesRaw ? [Number(databasesRaw)] : void 0;
1536
- if (!server) exitWithValidationError("server_id", "forge-cli database-users create --server <server_id> --name <name> --password <password>", ctx.formatter);
1537
- if (!name) exitWithValidationError("name", "forge-cli database-users create --server <server_id> --name <name> --password <password>", ctx.formatter);
1538
- if (!password) exitWithValidationError("password", "forge-cli database-users create --server <server_id> --name <name> --password <password>", ctx.formatter);
1536
+ if (!server) exitWithValidationError("server_id", "forge database-users create --server <server_id> --name <name> --password <password>", ctx.formatter);
1537
+ if (!name) exitWithValidationError("name", "forge database-users create --server <server_id> --name <name> --password <password>", ctx.formatter);
1538
+ if (!password) exitWithValidationError("password", "forge database-users create --server <server_id> --name <name> --password <password>", ctx.formatter);
1539
1539
  await runCommand(async () => {
1540
1540
  const token = ctx.getToken();
1541
1541
  const execCtx = ctx.createExecutorContext(token);
@@ -1557,8 +1557,8 @@ async function databaseUsersCreate(ctx) {
1557
1557
  async function databaseUsersDelete(args, ctx) {
1558
1558
  const [id] = args;
1559
1559
  const server = String(ctx.options.server ?? "");
1560
- if (!id) exitWithValidationError("user_id", "forge-cli database-users delete <user_id> --server <server_id>", ctx.formatter);
1561
- if (!server) exitWithValidationError("server_id", "forge-cli database-users delete <user_id> --server <server_id>", ctx.formatter);
1560
+ if (!id) exitWithValidationError("user_id", "forge database-users delete <user_id> --server <server_id>", ctx.formatter);
1561
+ if (!server) exitWithValidationError("server_id", "forge database-users delete <user_id> --server <server_id>", ctx.formatter);
1562
1562
  await runCommand(async () => {
1563
1563
  const token = ctx.getToken();
1564
1564
  const execCtx = ctx.createExecutorContext(token);
@@ -1582,26 +1582,26 @@ const handleDatabaseUsersCommand = createCommandRouter({
1582
1582
  });
1583
1583
  function showDatabaseUsersHelp(subcommand) {
1584
1584
  if (subcommand === "list" || subcommand === "ls") console.log(`
1585
- ${colors.bold("forge-cli database-users list")} - List database users on a server
1585
+ ${colors.bold("forge database-users list")} - List database users on a server
1586
1586
 
1587
1587
  ${colors.bold("USAGE:")}
1588
- forge-cli database-users list --server <server_id> [options]
1588
+ forge database-users list --server <server_id> [options]
1589
1589
 
1590
1590
  ${colors.bold("OPTIONS:")}
1591
1591
  --server <id> Server ID (required)
1592
1592
  -f, --format <fmt> Output format: json, human, table
1593
1593
  `);
1594
1594
  else if (subcommand === "get") console.log(`
1595
- ${colors.bold("forge-cli database-users get")} - Get database user details
1595
+ ${colors.bold("forge database-users get")} - Get database user details
1596
1596
 
1597
1597
  ${colors.bold("USAGE:")}
1598
- forge-cli database-users get <user_id> --server <server_id> [options]
1598
+ forge database-users get <user_id> --server <server_id> [options]
1599
1599
  `);
1600
1600
  else if (subcommand === "create") console.log(`
1601
- ${colors.bold("forge-cli database-users create")} - Create a new database user
1601
+ ${colors.bold("forge database-users create")} - Create a new database user
1602
1602
 
1603
1603
  ${colors.bold("USAGE:")}
1604
- forge-cli database-users create --server <server_id> --name <name> --password <password> [options]
1604
+ forge database-users create --server <server_id> --name <name> --password <password> [options]
1605
1605
 
1606
1606
  ${colors.bold("OPTIONS:")}
1607
1607
  --server <id> Server ID (required)
@@ -1611,16 +1611,16 @@ ${colors.bold("OPTIONS:")}
1611
1611
  -f, --format <fmt> Output format: json, human, table
1612
1612
  `);
1613
1613
  else if (subcommand === "delete") console.log(`
1614
- ${colors.bold("forge-cli database-users delete")} - Delete a database user
1614
+ ${colors.bold("forge database-users delete")} - Delete a database user
1615
1615
 
1616
1616
  ${colors.bold("USAGE:")}
1617
- forge-cli database-users delete <user_id> --server <server_id> [options]
1617
+ forge database-users delete <user_id> --server <server_id> [options]
1618
1618
  `);
1619
1619
  else console.log(`
1620
- ${colors.bold("forge-cli database-users")} - Manage database users
1620
+ ${colors.bold("forge database-users")} - Manage database users
1621
1621
 
1622
1622
  ${colors.bold("USAGE:")}
1623
- forge-cli database-users <subcommand> [options]
1623
+ forge database-users <subcommand> [options]
1624
1624
 
1625
1625
  ${colors.bold("SUBCOMMANDS:")}
1626
1626
  list, ls List database users
@@ -1632,14 +1632,14 @@ ${colors.bold("OPTIONS:")}
1632
1632
  --server <id> Server ID (required)
1633
1633
  -f, --format <fmt> Output format: json, human, table
1634
1634
 
1635
- Run ${colors.cyan("forge-cli database-users <subcommand> --help")} for details.
1635
+ Run ${colors.cyan("forge database-users <subcommand> --help")} for details.
1636
1636
  `);
1637
1637
  }
1638
1638
  async function deploymentsList(ctx) {
1639
1639
  const server = String(ctx.options.server ?? "");
1640
1640
  const site = String(ctx.options.site ?? "");
1641
- if (!server) exitWithValidationError("server_id", "forge-cli deployments list --server <server_id> --site <site_id>", ctx.formatter);
1642
- if (!site) exitWithValidationError("site_id", "forge-cli deployments list --server <server_id> --site <site_id>", ctx.formatter);
1641
+ if (!server) exitWithValidationError("server_id", "forge deployments list --server <server_id> --site <site_id>", ctx.formatter);
1642
+ if (!site) exitWithValidationError("site_id", "forge deployments list --server <server_id> --site <site_id>", ctx.formatter);
1643
1643
  await runCommand(async () => {
1644
1644
  const token = ctx.getToken();
1645
1645
  const execCtx = ctx.createExecutorContext(token);
@@ -1659,8 +1659,8 @@ async function deploymentsList(ctx) {
1659
1659
  async function deploymentsDeploy(ctx) {
1660
1660
  const server = String(ctx.options.server ?? "");
1661
1661
  const site = String(ctx.options.site ?? "");
1662
- if (!server) exitWithValidationError("server_id", "forge-cli deployments deploy --server <server_id> --site <site_id>", ctx.formatter);
1663
- if (!site) exitWithValidationError("site_id", "forge-cli deployments deploy --server <server_id> --site <site_id>", ctx.formatter);
1662
+ if (!server) exitWithValidationError("server_id", "forge deployments deploy --server <server_id> --site <site_id>", ctx.formatter);
1663
+ if (!site) exitWithValidationError("site_id", "forge deployments deploy --server <server_id> --site <site_id>", ctx.formatter);
1664
1664
  await runCommand(async () => {
1665
1665
  const token = ctx.getToken();
1666
1666
  const execCtx = ctx.createExecutorContext(token);
@@ -1691,10 +1691,10 @@ const handleDeploymentsCommand = createCommandRouter({
1691
1691
  });
1692
1692
  function showDeploymentsHelp(subcommand) {
1693
1693
  if (subcommand === "list" || subcommand === "ls") console.log(`
1694
- ${colors.bold("forge-cli deployments list")} - List deployments for a site
1694
+ ${colors.bold("forge deployments list")} - List deployments for a site
1695
1695
 
1696
1696
  ${colors.bold("USAGE:")}
1697
- forge-cli deployments list --server <server_id> --site <site_id> [options]
1697
+ forge deployments list --server <server_id> --site <site_id> [options]
1698
1698
 
1699
1699
  ${colors.bold("OPTIONS:")}
1700
1700
  --server <id> Server ID (required)
@@ -1702,19 +1702,19 @@ ${colors.bold("OPTIONS:")}
1702
1702
  -f, --format <fmt> Output format: json, human, table
1703
1703
  `);
1704
1704
  else if (subcommand === "deploy") console.log(`
1705
- ${colors.bold("forge-cli deployments deploy")} - Trigger a deployment
1705
+ ${colors.bold("forge deployments deploy")} - Trigger a deployment
1706
1706
 
1707
1707
  ${colors.bold("USAGE:")}
1708
- forge-cli deployments deploy --server <server_id> --site <site_id>
1708
+ forge deployments deploy --server <server_id> --site <site_id>
1709
1709
  `);
1710
1710
  else console.log(`
1711
- ${colors.bold("forge-cli deployments")} - Manage deployments
1711
+ ${colors.bold("forge deployments")} - Manage deployments
1712
1712
 
1713
1713
  ${colors.bold("USAGE:")}
1714
- forge-cli deployments <subcommand> [options]
1714
+ forge deployments <subcommand> [options]
1715
1715
 
1716
1716
  ${colors.bold("ALIASES:")}
1717
- forge-cli d
1717
+ forge d
1718
1718
 
1719
1719
  ${colors.bold("SUBCOMMANDS:")}
1720
1720
  list, ls List deployments for a site
@@ -1725,14 +1725,14 @@ ${colors.bold("OPTIONS:")}
1725
1725
  --site <id> Site ID (required)
1726
1726
  -f, --format <fmt> Output format: json, human, table
1727
1727
 
1728
- Run ${colors.cyan("forge-cli deployments <subcommand> --help")} for details.
1728
+ Run ${colors.cyan("forge deployments <subcommand> --help")} for details.
1729
1729
  `);
1730
1730
  }
1731
1731
  async function envGet(ctx) {
1732
1732
  const server = String(ctx.options.server ?? "");
1733
1733
  const site = String(ctx.options.site ?? "");
1734
- if (!server) exitWithValidationError("server_id", "forge-cli env get --server <server_id> --site <site_id>", ctx.formatter);
1735
- if (!site) exitWithValidationError("site_id", "forge-cli env get --server <server_id> --site <site_id>", ctx.formatter);
1734
+ if (!server) exitWithValidationError("server_id", "forge env get --server <server_id> --site <site_id>", ctx.formatter);
1735
+ if (!site) exitWithValidationError("site_id", "forge env get --server <server_id> --site <site_id>", ctx.formatter);
1736
1736
  await runCommand(async () => {
1737
1737
  const token = ctx.getToken();
1738
1738
  const execCtx = ctx.createExecutorContext(token);
@@ -1749,9 +1749,9 @@ async function envUpdate(ctx) {
1749
1749
  const server = String(ctx.options.server ?? "");
1750
1750
  const site = String(ctx.options.site ?? "");
1751
1751
  const content = String(ctx.options.content ?? "");
1752
- if (!server) exitWithValidationError("server_id", "forge-cli env update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
1753
- if (!site) exitWithValidationError("site_id", "forge-cli env update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
1754
- if (!content) exitWithValidationError("content", "forge-cli env update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
1752
+ if (!server) exitWithValidationError("server_id", "forge env update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
1753
+ if (!site) exitWithValidationError("site_id", "forge env update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
1754
+ if (!content) exitWithValidationError("content", "forge env update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
1755
1755
  await runCommand(async () => {
1756
1756
  const token = ctx.getToken();
1757
1757
  const execCtx = ctx.createExecutorContext(token);
@@ -1774,22 +1774,22 @@ const handleEnvCommand = createCommandRouter({
1774
1774
  });
1775
1775
  function showEnvHelp(subcommand) {
1776
1776
  if (subcommand === "get") console.log(`
1777
- ${colors.bold("forge-cli env get")} - Get environment variables
1777
+ ${colors.bold("forge env get")} - Get environment variables
1778
1778
 
1779
1779
  ${colors.bold("USAGE:")}
1780
- forge-cli env get --server <server_id> --site <site_id>
1780
+ forge env get --server <server_id> --site <site_id>
1781
1781
  `);
1782
1782
  else if (subcommand === "update") console.log(`
1783
- ${colors.bold("forge-cli env update")} - Update environment variables
1783
+ ${colors.bold("forge env update")} - Update environment variables
1784
1784
 
1785
1785
  ${colors.bold("USAGE:")}
1786
- forge-cli env update --server <server_id> --site <site_id> --content <env_content>
1786
+ forge env update --server <server_id> --site <site_id> --content <env_content>
1787
1787
  `);
1788
1788
  else console.log(`
1789
- ${colors.bold("forge-cli env")} - Manage environment variables
1789
+ ${colors.bold("forge env")} - Manage environment variables
1790
1790
 
1791
1791
  ${colors.bold("USAGE:")}
1792
- forge-cli env <subcommand> [options]
1792
+ forge env <subcommand> [options]
1793
1793
 
1794
1794
  ${colors.bold("SUBCOMMANDS:")}
1795
1795
  get Get environment variables
@@ -1801,12 +1801,12 @@ ${colors.bold("OPTIONS:")}
1801
1801
  --content <str> New env content (for update)
1802
1802
  -f, --format <fmt> Output format: json, human
1803
1803
 
1804
- Run ${colors.cyan("forge-cli env <subcommand> --help")} for details.
1804
+ Run ${colors.cyan("forge env <subcommand> --help")} for details.
1805
1805
  `);
1806
1806
  }
1807
1807
  async function firewallRulesList(ctx) {
1808
1808
  const server = String(ctx.options.server ?? "");
1809
- if (!server) exitWithValidationError("server_id", "forge-cli firewall-rules list --server <server_id>", ctx.formatter);
1809
+ if (!server) exitWithValidationError("server_id", "forge firewall-rules list --server <server_id>", ctx.formatter);
1810
1810
  await runCommand(async () => {
1811
1811
  const token = ctx.getToken();
1812
1812
  const execCtx = ctx.createExecutorContext(token);
@@ -1824,8 +1824,8 @@ async function firewallRulesList(ctx) {
1824
1824
  async function firewallRulesGet(args, ctx) {
1825
1825
  const [id] = args;
1826
1826
  const server = String(ctx.options.server ?? "");
1827
- if (!id) exitWithValidationError("firewall_rule_id", "forge-cli firewall-rules get <rule_id> --server <server_id>", ctx.formatter);
1828
- if (!server) exitWithValidationError("server_id", "forge-cli firewall-rules get <rule_id> --server <server_id>", ctx.formatter);
1827
+ if (!id) exitWithValidationError("firewall_rule_id", "forge firewall-rules get <rule_id> --server <server_id>", ctx.formatter);
1828
+ if (!server) exitWithValidationError("server_id", "forge firewall-rules get <rule_id> --server <server_id>", ctx.formatter);
1829
1829
  await runCommand(async () => {
1830
1830
  const token = ctx.getToken();
1831
1831
  const execCtx = ctx.createExecutorContext(token);
@@ -1854,25 +1854,25 @@ const handleFirewallRulesCommand = createCommandRouter({
1854
1854
  });
1855
1855
  function showFirewallRulesHelp(subcommand) {
1856
1856
  if (subcommand === "list" || subcommand === "ls") console.log(`
1857
- ${colors.bold("forge-cli firewall-rules list")} - List firewall rules on a server
1857
+ ${colors.bold("forge firewall-rules list")} - List firewall rules on a server
1858
1858
 
1859
1859
  ${colors.bold("USAGE:")}
1860
- forge-cli firewall-rules list --server <server_id> [options]
1860
+ forge firewall-rules list --server <server_id> [options]
1861
1861
  `);
1862
1862
  else if (subcommand === "get") console.log(`
1863
- ${colors.bold("forge-cli firewall-rules get")} - Get firewall rule details
1863
+ ${colors.bold("forge firewall-rules get")} - Get firewall rule details
1864
1864
 
1865
1865
  ${colors.bold("USAGE:")}
1866
- forge-cli firewall-rules get <rule_id> --server <server_id>
1866
+ forge firewall-rules get <rule_id> --server <server_id>
1867
1867
  `);
1868
1868
  else console.log(`
1869
- ${colors.bold("forge-cli firewall-rules")} - Manage firewall rules
1869
+ ${colors.bold("forge firewall-rules")} - Manage firewall rules
1870
1870
 
1871
1871
  ${colors.bold("USAGE:")}
1872
- forge-cli firewall-rules <subcommand> [options]
1872
+ forge firewall-rules <subcommand> [options]
1873
1873
 
1874
1874
  ${colors.bold("ALIASES:")}
1875
- forge-cli fw
1875
+ forge fw
1876
1876
 
1877
1877
  ${colors.bold("SUBCOMMANDS:")}
1878
1878
  list, ls List firewall rules
@@ -1882,12 +1882,12 @@ ${colors.bold("OPTIONS:")}
1882
1882
  --server <id> Server ID (required)
1883
1883
  -f, --format <fmt> Output format: json, human, table
1884
1884
 
1885
- Run ${colors.cyan("forge-cli firewall-rules <subcommand> --help")} for details.
1885
+ Run ${colors.cyan("forge firewall-rules <subcommand> --help")} for details.
1886
1886
  `);
1887
1887
  }
1888
1888
  async function monitorsList(ctx) {
1889
1889
  const server = String(ctx.options.server ?? "");
1890
- if (!server) exitWithValidationError("server_id", "forge-cli monitors list --server <server_id>", ctx.formatter);
1890
+ if (!server) exitWithValidationError("server_id", "forge monitors list --server <server_id>", ctx.formatter);
1891
1891
  await runCommand(async () => {
1892
1892
  const token = ctx.getToken();
1893
1893
  const execCtx = ctx.createExecutorContext(token);
@@ -1904,8 +1904,8 @@ async function monitorsList(ctx) {
1904
1904
  async function monitorsGet(args, ctx) {
1905
1905
  const [id] = args;
1906
1906
  const server = String(ctx.options.server ?? "");
1907
- if (!id) exitWithValidationError("monitor_id", "forge-cli monitors get <monitor_id> --server <server_id>", ctx.formatter);
1908
- if (!server) exitWithValidationError("server_id", "forge-cli monitors get <monitor_id> --server <server_id>", ctx.formatter);
1907
+ if (!id) exitWithValidationError("monitor_id", "forge monitors get <monitor_id> --server <server_id>", ctx.formatter);
1908
+ if (!server) exitWithValidationError("server_id", "forge monitors get <monitor_id> --server <server_id>", ctx.formatter);
1909
1909
  await runCommand(async () => {
1910
1910
  const token = ctx.getToken();
1911
1911
  const execCtx = ctx.createExecutorContext(token);
@@ -1930,9 +1930,9 @@ async function monitorsCreate(ctx) {
1930
1930
  const operator = String(ctx.options.operator ?? "");
1931
1931
  const threshold = Number(ctx.options.threshold ?? 0);
1932
1932
  const minutes = Number(ctx.options.minutes ?? 0);
1933
- if (!server) exitWithValidationError("server_id", "forge-cli monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes>", ctx.formatter);
1934
- if (!type) exitWithValidationError("type", "forge-cli monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes>", ctx.formatter);
1935
- if (!operator) exitWithValidationError("operator", "forge-cli monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes>", ctx.formatter);
1933
+ if (!server) exitWithValidationError("server_id", "forge monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes>", ctx.formatter);
1934
+ if (!type) exitWithValidationError("type", "forge monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes>", ctx.formatter);
1935
+ if (!operator) exitWithValidationError("operator", "forge monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes>", ctx.formatter);
1936
1936
  await runCommand(async () => {
1937
1937
  const token = ctx.getToken();
1938
1938
  const execCtx = ctx.createExecutorContext(token);
@@ -1956,8 +1956,8 @@ async function monitorsCreate(ctx) {
1956
1956
  async function monitorsDelete(args, ctx) {
1957
1957
  const [id] = args;
1958
1958
  const server = String(ctx.options.server ?? "");
1959
- if (!id) exitWithValidationError("monitor_id", "forge-cli monitors delete <monitor_id> --server <server_id>", ctx.formatter);
1960
- if (!server) exitWithValidationError("server_id", "forge-cli monitors delete <monitor_id> --server <server_id>", ctx.formatter);
1959
+ if (!id) exitWithValidationError("monitor_id", "forge monitors delete <monitor_id> --server <server_id>", ctx.formatter);
1960
+ if (!server) exitWithValidationError("server_id", "forge monitors delete <monitor_id> --server <server_id>", ctx.formatter);
1961
1961
  await runCommand(async () => {
1962
1962
  const token = ctx.getToken();
1963
1963
  const execCtx = ctx.createExecutorContext(token);
@@ -1981,26 +1981,26 @@ const handleMonitorsCommand = createCommandRouter({
1981
1981
  });
1982
1982
  function showMonitorsHelp(subcommand) {
1983
1983
  if (subcommand === "list" || subcommand === "ls") console.log(`
1984
- ${colors.bold("forge-cli monitors list")} - List monitors on a server
1984
+ ${colors.bold("forge monitors list")} - List monitors on a server
1985
1985
 
1986
1986
  ${colors.bold("USAGE:")}
1987
- forge-cli monitors list --server <server_id> [options]
1987
+ forge monitors list --server <server_id> [options]
1988
1988
 
1989
1989
  ${colors.bold("OPTIONS:")}
1990
1990
  --server <id> Server ID (required)
1991
1991
  -f, --format <fmt> Output format: json, human, table
1992
1992
  `);
1993
1993
  else if (subcommand === "get") console.log(`
1994
- ${colors.bold("forge-cli monitors get")} - Get monitor details
1994
+ ${colors.bold("forge monitors get")} - Get monitor details
1995
1995
 
1996
1996
  ${colors.bold("USAGE:")}
1997
- forge-cli monitors get <monitor_id> --server <server_id> [options]
1997
+ forge monitors get <monitor_id> --server <server_id> [options]
1998
1998
  `);
1999
1999
  else if (subcommand === "create") console.log(`
2000
- ${colors.bold("forge-cli monitors create")} - Create a new monitor
2000
+ ${colors.bold("forge monitors create")} - Create a new monitor
2001
2001
 
2002
2002
  ${colors.bold("USAGE:")}
2003
- forge-cli monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes> [options]
2003
+ forge monitors create --server <server_id> --type <type> --operator <operator> --threshold <threshold> --minutes <minutes> [options]
2004
2004
 
2005
2005
  ${colors.bold("OPTIONS:")}
2006
2006
  --server <id> Server ID (required)
@@ -2011,16 +2011,16 @@ ${colors.bold("OPTIONS:")}
2011
2011
  -f, --format <fmt> Output format: json, human, table
2012
2012
  `);
2013
2013
  else if (subcommand === "delete") console.log(`
2014
- ${colors.bold("forge-cli monitors delete")} - Delete a monitor
2014
+ ${colors.bold("forge monitors delete")} - Delete a monitor
2015
2015
 
2016
2016
  ${colors.bold("USAGE:")}
2017
- forge-cli monitors delete <monitor_id> --server <server_id> [options]
2017
+ forge monitors delete <monitor_id> --server <server_id> [options]
2018
2018
  `);
2019
2019
  else console.log(`
2020
- ${colors.bold("forge-cli monitors")} - Manage server monitors
2020
+ ${colors.bold("forge monitors")} - Manage server monitors
2021
2021
 
2022
2022
  ${colors.bold("USAGE:")}
2023
- forge-cli monitors <subcommand> [options]
2023
+ forge monitors <subcommand> [options]
2024
2024
 
2025
2025
  ${colors.bold("SUBCOMMANDS:")}
2026
2026
  list, ls List monitors
@@ -2032,14 +2032,14 @@ ${colors.bold("OPTIONS:")}
2032
2032
  --server <id> Server ID (required)
2033
2033
  -f, --format <fmt> Output format: json, human, table
2034
2034
 
2035
- Run ${colors.cyan("forge-cli monitors <subcommand> --help")} for details.
2035
+ Run ${colors.cyan("forge monitors <subcommand> --help")} for details.
2036
2036
  `);
2037
2037
  }
2038
2038
  async function nginxGet(ctx) {
2039
2039
  const server = String(ctx.options.server ?? "");
2040
2040
  const site = String(ctx.options.site ?? "");
2041
- if (!server) exitWithValidationError("server_id", "forge-cli nginx get --server <server_id> --site <site_id>", ctx.formatter);
2042
- if (!site) exitWithValidationError("site_id", "forge-cli nginx get --server <server_id> --site <site_id>", ctx.formatter);
2041
+ if (!server) exitWithValidationError("server_id", "forge nginx get --server <server_id> --site <site_id>", ctx.formatter);
2042
+ if (!site) exitWithValidationError("site_id", "forge nginx get --server <server_id> --site <site_id>", ctx.formatter);
2043
2043
  await runCommand(async () => {
2044
2044
  const token = ctx.getToken();
2045
2045
  const execCtx = ctx.createExecutorContext(token);
@@ -2056,9 +2056,9 @@ async function nginxUpdate(ctx) {
2056
2056
  const server = String(ctx.options.server ?? "");
2057
2057
  const site = String(ctx.options.site ?? "");
2058
2058
  const content = String(ctx.options.content ?? "");
2059
- if (!server) exitWithValidationError("server_id", "forge-cli nginx update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
2060
- if (!site) exitWithValidationError("site_id", "forge-cli nginx update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
2061
- if (!content) exitWithValidationError("content", "forge-cli nginx update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
2059
+ if (!server) exitWithValidationError("server_id", "forge nginx update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
2060
+ if (!site) exitWithValidationError("site_id", "forge nginx update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
2061
+ if (!content) exitWithValidationError("content", "forge nginx update --server <server_id> --site <site_id> --content <content>", ctx.formatter);
2062
2062
  await runCommand(async () => {
2063
2063
  const token = ctx.getToken();
2064
2064
  const execCtx = ctx.createExecutorContext(token);
@@ -2081,22 +2081,22 @@ const handleNginxCommand = createCommandRouter({
2081
2081
  });
2082
2082
  function showNginxHelp(subcommand) {
2083
2083
  if (subcommand === "get") console.log(`
2084
- ${colors.bold("forge-cli nginx get")} - Get nginx configuration
2084
+ ${colors.bold("forge nginx get")} - Get nginx configuration
2085
2085
 
2086
2086
  ${colors.bold("USAGE:")}
2087
- forge-cli nginx get --server <server_id> --site <site_id>
2087
+ forge nginx get --server <server_id> --site <site_id>
2088
2088
  `);
2089
2089
  else if (subcommand === "update") console.log(`
2090
- ${colors.bold("forge-cli nginx update")} - Update nginx configuration
2090
+ ${colors.bold("forge nginx update")} - Update nginx configuration
2091
2091
 
2092
2092
  ${colors.bold("USAGE:")}
2093
- forge-cli nginx update --server <server_id> --site <site_id> --content <nginx_config>
2093
+ forge nginx update --server <server_id> --site <site_id> --content <nginx_config>
2094
2094
  `);
2095
2095
  else console.log(`
2096
- ${colors.bold("forge-cli nginx")} - Manage nginx configuration
2096
+ ${colors.bold("forge nginx")} - Manage nginx configuration
2097
2097
 
2098
2098
  ${colors.bold("USAGE:")}
2099
- forge-cli nginx <subcommand> [options]
2099
+ forge nginx <subcommand> [options]
2100
2100
 
2101
2101
  ${colors.bold("SUBCOMMANDS:")}
2102
2102
  get Get nginx configuration
@@ -2107,12 +2107,12 @@ ${colors.bold("OPTIONS:")}
2107
2107
  --site <id> Site ID (required)
2108
2108
  --content <str> New nginx config (for update)
2109
2109
 
2110
- Run ${colors.cyan("forge-cli nginx <subcommand> --help")} for details.
2110
+ Run ${colors.cyan("forge nginx <subcommand> --help")} for details.
2111
2111
  `);
2112
2112
  }
2113
2113
  async function nginxTemplatesList(ctx) {
2114
2114
  const server = String(ctx.options.server ?? "");
2115
- if (!server) exitWithValidationError("server_id", "forge-cli nginx-templates list --server <server_id>", ctx.formatter);
2115
+ if (!server) exitWithValidationError("server_id", "forge nginx-templates list --server <server_id>", ctx.formatter);
2116
2116
  await runCommand(async () => {
2117
2117
  const token = ctx.getToken();
2118
2118
  const execCtx = ctx.createExecutorContext(token);
@@ -2127,8 +2127,8 @@ async function nginxTemplatesList(ctx) {
2127
2127
  async function nginxTemplatesGet(args, ctx) {
2128
2128
  const [id] = args;
2129
2129
  const server = String(ctx.options.server ?? "");
2130
- if (!id) exitWithValidationError("template_id", "forge-cli nginx-templates get <template_id> --server <server_id>", ctx.formatter);
2131
- if (!server) exitWithValidationError("server_id", "forge-cli nginx-templates get <template_id> --server <server_id>", ctx.formatter);
2130
+ if (!id) exitWithValidationError("template_id", "forge nginx-templates get <template_id> --server <server_id>", ctx.formatter);
2131
+ if (!server) exitWithValidationError("server_id", "forge nginx-templates get <template_id> --server <server_id>", ctx.formatter);
2132
2132
  await runCommand(async () => {
2133
2133
  const token = ctx.getToken();
2134
2134
  const execCtx = ctx.createExecutorContext(token);
@@ -2148,9 +2148,9 @@ async function nginxTemplatesCreate(ctx) {
2148
2148
  const server = String(ctx.options.server ?? "");
2149
2149
  const name = String(ctx.options.name ?? "");
2150
2150
  const content = String(ctx.options.content ?? "");
2151
- if (!server) exitWithValidationError("server_id", "forge-cli nginx-templates create --server <server_id> --name <name> --content <content>", ctx.formatter);
2152
- if (!name) exitWithValidationError("name", "forge-cli nginx-templates create --server <server_id> --name <name> --content <content>", ctx.formatter);
2153
- if (!content) exitWithValidationError("content", "forge-cli nginx-templates create --server <server_id> --name <name> --content <content>", ctx.formatter);
2151
+ if (!server) exitWithValidationError("server_id", "forge nginx-templates create --server <server_id> --name <name> --content <content>", ctx.formatter);
2152
+ if (!name) exitWithValidationError("name", "forge nginx-templates create --server <server_id> --name <name> --content <content>", ctx.formatter);
2153
+ if (!content) exitWithValidationError("content", "forge nginx-templates create --server <server_id> --name <name> --content <content>", ctx.formatter);
2154
2154
  await runCommand(async () => {
2155
2155
  const token = ctx.getToken();
2156
2156
  const execCtx = ctx.createExecutorContext(token);
@@ -2169,8 +2169,8 @@ async function nginxTemplatesCreate(ctx) {
2169
2169
  async function nginxTemplatesUpdate(args, ctx) {
2170
2170
  const [id] = args;
2171
2171
  const server = String(ctx.options.server ?? "");
2172
- if (!id) exitWithValidationError("template_id", "forge-cli nginx-templates update <template_id> --server <server_id>", ctx.formatter);
2173
- if (!server) exitWithValidationError("server_id", "forge-cli nginx-templates update <template_id> --server <server_id>", ctx.formatter);
2172
+ if (!id) exitWithValidationError("template_id", "forge nginx-templates update <template_id> --server <server_id>", ctx.formatter);
2173
+ if (!server) exitWithValidationError("server_id", "forge nginx-templates update <template_id> --server <server_id>", ctx.formatter);
2174
2174
  await runCommand(async () => {
2175
2175
  const token = ctx.getToken();
2176
2176
  const execCtx = ctx.createExecutorContext(token);
@@ -2190,8 +2190,8 @@ async function nginxTemplatesUpdate(args, ctx) {
2190
2190
  async function nginxTemplatesDelete(args, ctx) {
2191
2191
  const [id] = args;
2192
2192
  const server = String(ctx.options.server ?? "");
2193
- if (!id) exitWithValidationError("template_id", "forge-cli nginx-templates delete <template_id> --server <server_id>", ctx.formatter);
2194
- if (!server) exitWithValidationError("server_id", "forge-cli nginx-templates delete <template_id> --server <server_id>", ctx.formatter);
2193
+ if (!id) exitWithValidationError("template_id", "forge nginx-templates delete <template_id> --server <server_id>", ctx.formatter);
2194
+ if (!server) exitWithValidationError("server_id", "forge nginx-templates delete <template_id> --server <server_id>", ctx.formatter);
2195
2195
  await runCommand(async () => {
2196
2196
  const token = ctx.getToken();
2197
2197
  const execCtx = ctx.createExecutorContext(token);
@@ -2220,26 +2220,26 @@ const handleNginxTemplatesCommand = createCommandRouter({
2220
2220
  });
2221
2221
  function showNginxTemplatesHelp(subcommand) {
2222
2222
  if (subcommand === "list" || subcommand === "ls") console.log(`
2223
- ${colors.bold("forge-cli nginx-templates list")} - List Nginx templates on a server
2223
+ ${colors.bold("forge nginx-templates list")} - List Nginx templates on a server
2224
2224
 
2225
2225
  ${colors.bold("USAGE:")}
2226
- forge-cli nginx-templates list --server <server_id> [options]
2226
+ forge nginx-templates list --server <server_id> [options]
2227
2227
 
2228
2228
  ${colors.bold("OPTIONS:")}
2229
2229
  --server <id> Server ID (required)
2230
2230
  -f, --format <fmt> Output format: json, human, table
2231
2231
  `);
2232
2232
  else if (subcommand === "get") console.log(`
2233
- ${colors.bold("forge-cli nginx-templates get")} - Get Nginx template details
2233
+ ${colors.bold("forge nginx-templates get")} - Get Nginx template details
2234
2234
 
2235
2235
  ${colors.bold("USAGE:")}
2236
- forge-cli nginx-templates get <template_id> --server <server_id> [options]
2236
+ forge nginx-templates get <template_id> --server <server_id> [options]
2237
2237
  `);
2238
2238
  else if (subcommand === "create") console.log(`
2239
- ${colors.bold("forge-cli nginx-templates create")} - Create a new Nginx template
2239
+ ${colors.bold("forge nginx-templates create")} - Create a new Nginx template
2240
2240
 
2241
2241
  ${colors.bold("USAGE:")}
2242
- forge-cli nginx-templates create --server <server_id> --name <name> --content <content> [options]
2242
+ forge nginx-templates create --server <server_id> --name <name> --content <content> [options]
2243
2243
 
2244
2244
  ${colors.bold("OPTIONS:")}
2245
2245
  --server <id> Server ID (required)
@@ -2248,10 +2248,10 @@ ${colors.bold("OPTIONS:")}
2248
2248
  -f, --format <fmt> Output format: json, human, table
2249
2249
  `);
2250
2250
  else if (subcommand === "update") console.log(`
2251
- ${colors.bold("forge-cli nginx-templates update")} - Update an Nginx template
2251
+ ${colors.bold("forge nginx-templates update")} - Update an Nginx template
2252
2252
 
2253
2253
  ${colors.bold("USAGE:")}
2254
- forge-cli nginx-templates update <template_id> --server <server_id> [options]
2254
+ forge nginx-templates update <template_id> --server <server_id> [options]
2255
2255
 
2256
2256
  ${colors.bold("OPTIONS:")}
2257
2257
  --server <id> Server ID (required)
@@ -2260,16 +2260,16 @@ ${colors.bold("OPTIONS:")}
2260
2260
  -f, --format <fmt> Output format: json, human, table
2261
2261
  `);
2262
2262
  else if (subcommand === "delete") console.log(`
2263
- ${colors.bold("forge-cli nginx-templates delete")} - Delete an Nginx template
2263
+ ${colors.bold("forge nginx-templates delete")} - Delete an Nginx template
2264
2264
 
2265
2265
  ${colors.bold("USAGE:")}
2266
- forge-cli nginx-templates delete <template_id> --server <server_id> [options]
2266
+ forge nginx-templates delete <template_id> --server <server_id> [options]
2267
2267
  `);
2268
2268
  else console.log(`
2269
- ${colors.bold("forge-cli nginx-templates")} - Manage Nginx templates
2269
+ ${colors.bold("forge nginx-templates")} - Manage Nginx templates
2270
2270
 
2271
2271
  ${colors.bold("USAGE:")}
2272
- forge-cli nginx-templates <subcommand> [options]
2272
+ forge nginx-templates <subcommand> [options]
2273
2273
 
2274
2274
  ${colors.bold("SUBCOMMANDS:")}
2275
2275
  list, ls List Nginx templates
@@ -2282,7 +2282,7 @@ ${colors.bold("OPTIONS:")}
2282
2282
  --server <id> Server ID (required)
2283
2283
  -f, --format <fmt> Output format: json, human, table
2284
2284
 
2285
- Run ${colors.cyan("forge-cli nginx-templates <subcommand> --help")} for details.
2285
+ Run ${colors.cyan("forge nginx-templates <subcommand> --help")} for details.
2286
2286
  `);
2287
2287
  }
2288
2288
  async function recipesList(ctx) {
@@ -2299,7 +2299,7 @@ async function recipesList(ctx) {
2299
2299
  }
2300
2300
  async function recipesGet(args, ctx) {
2301
2301
  const [id] = args;
2302
- if (!id) exitWithValidationError("id", "forge-cli recipes get <recipe_id>", ctx.formatter);
2302
+ if (!id) exitWithValidationError("id", "forge recipes get <recipe_id>", ctx.formatter);
2303
2303
  await runCommand(async () => {
2304
2304
  const token = ctx.getToken();
2305
2305
  const execCtx = ctx.createExecutorContext(token);
@@ -2316,8 +2316,8 @@ async function recipesGet(args, ctx) {
2316
2316
  async function recipesRun(args, ctx) {
2317
2317
  const [id] = args;
2318
2318
  const serversRaw = String(ctx.options.servers ?? "");
2319
- if (!id) exitWithValidationError("id", "forge-cli recipes run <recipe_id> --servers <ids>", ctx.formatter);
2320
- if (!serversRaw) exitWithValidationError("servers", "forge-cli recipes run <recipe_id> --servers <server_id1,server_id2,...>", ctx.formatter);
2319
+ if (!id) exitWithValidationError("id", "forge recipes run <recipe_id> --servers <ids>", ctx.formatter);
2320
+ if (!serversRaw) exitWithValidationError("servers", "forge recipes run <recipe_id> --servers <server_id1,server_id2,...>", ctx.formatter);
2321
2321
  const servers = serversRaw.split(",").map((s) => Number(s.trim())).filter((n) => !isNaN(n));
2322
2322
  await runCommand(async () => {
2323
2323
  const token = ctx.getToken();
@@ -2341,31 +2341,31 @@ const handleRecipesCommand = createCommandRouter({
2341
2341
  });
2342
2342
  function showRecipesHelp(subcommand) {
2343
2343
  if (subcommand === "list" || subcommand === "ls") console.log(`
2344
- ${colors.bold("forge-cli recipes list")} - List all recipes
2344
+ ${colors.bold("forge recipes list")} - List all recipes
2345
2345
 
2346
2346
  ${colors.bold("USAGE:")}
2347
- forge-cli recipes list [options]
2347
+ forge recipes list [options]
2348
2348
  `);
2349
2349
  else if (subcommand === "get") console.log(`
2350
- ${colors.bold("forge-cli recipes get")} - Get recipe details
2350
+ ${colors.bold("forge recipes get")} - Get recipe details
2351
2351
 
2352
2352
  ${colors.bold("USAGE:")}
2353
- forge-cli recipes get <recipe_id>
2353
+ forge recipes get <recipe_id>
2354
2354
  `);
2355
2355
  else if (subcommand === "run") console.log(`
2356
- ${colors.bold("forge-cli recipes run")} - Run a recipe on servers
2356
+ ${colors.bold("forge recipes run")} - Run a recipe on servers
2357
2357
 
2358
2358
  ${colors.bold("USAGE:")}
2359
- forge-cli recipes run <recipe_id> --servers <server_id1,server_id2,...>
2359
+ forge recipes run <recipe_id> --servers <server_id1,server_id2,...>
2360
2360
 
2361
2361
  ${colors.bold("OPTIONS:")}
2362
2362
  --servers <ids> Comma-separated server IDs to run recipe on
2363
2363
  `);
2364
2364
  else console.log(`
2365
- ${colors.bold("forge-cli recipes")} - Manage recipes
2365
+ ${colors.bold("forge recipes")} - Manage recipes
2366
2366
 
2367
2367
  ${colors.bold("USAGE:")}
2368
- forge-cli recipes <subcommand> [options]
2368
+ forge recipes <subcommand> [options]
2369
2369
 
2370
2370
  ${colors.bold("SUBCOMMANDS:")}
2371
2371
  list, ls List all recipes
@@ -2375,7 +2375,7 @@ ${colors.bold("SUBCOMMANDS:")}
2375
2375
  ${colors.bold("OPTIONS:")}
2376
2376
  -f, --format <fmt> Output format: json, human, table
2377
2377
 
2378
- Run ${colors.cyan("forge-cli recipes <subcommand> --help")} for details.
2378
+ Run ${colors.cyan("forge recipes <subcommand> --help")} for details.
2379
2379
  `);
2380
2380
  }
2381
2381
  function requireServerAndSiteRaw$1(ctx, usage) {
@@ -2389,7 +2389,7 @@ function requireServerAndSiteRaw$1(ctx, usage) {
2389
2389
  };
2390
2390
  }
2391
2391
  async function redirectRulesList(ctx) {
2392
- const { server, site } = requireServerAndSiteRaw$1(ctx, "forge-cli redirect-rules list --server <server_id> --site <site_id>");
2392
+ const { server, site } = requireServerAndSiteRaw$1(ctx, "forge redirect-rules list --server <server_id> --site <site_id>");
2393
2393
  await runCommand(async () => {
2394
2394
  const token = ctx.getToken();
2395
2395
  const execCtx = ctx.createExecutorContext(token);
@@ -2408,7 +2408,7 @@ async function redirectRulesList(ctx) {
2408
2408
  }
2409
2409
  async function redirectRulesGet(args, ctx) {
2410
2410
  const [id] = args;
2411
- const usage = "forge-cli redirect-rules get <rule_id> --server <server_id> --site <site_id>";
2411
+ const usage = "forge redirect-rules get <rule_id> --server <server_id> --site <site_id>";
2412
2412
  if (!id) exitWithValidationError("rule_id", usage, ctx.formatter);
2413
2413
  const { server, site } = requireServerAndSiteRaw$1(ctx, usage);
2414
2414
  await runCommand(async () => {
@@ -2430,7 +2430,7 @@ async function redirectRulesGet(args, ctx) {
2430
2430
  }, ctx.formatter);
2431
2431
  }
2432
2432
  async function redirectRulesCreate(ctx) {
2433
- const usage = "forge-cli redirect-rules create --server <server_id> --site <site_id> --from <from> --to <to>";
2433
+ const usage = "forge redirect-rules create --server <server_id> --site <site_id> --from <from> --to <to>";
2434
2434
  const { server, site } = requireServerAndSiteRaw$1(ctx, usage);
2435
2435
  const from = String(ctx.options.from ?? "");
2436
2436
  const to = String(ctx.options.to ?? "");
@@ -2457,7 +2457,7 @@ async function redirectRulesCreate(ctx) {
2457
2457
  }
2458
2458
  async function redirectRulesDelete(args, ctx) {
2459
2459
  const [id] = args;
2460
- const usage = "forge-cli redirect-rules delete <rule_id> --server <server_id> --site <site_id>";
2460
+ const usage = "forge redirect-rules delete <rule_id> --server <server_id> --site <site_id>";
2461
2461
  if (!id) exitWithValidationError("rule_id", usage, ctx.formatter);
2462
2462
  const { server, site } = requireServerAndSiteRaw$1(ctx, usage);
2463
2463
  await runCommand(async () => {
@@ -2485,10 +2485,10 @@ const handleRedirectRulesCommand = createCommandRouter({
2485
2485
  });
2486
2486
  function showRedirectRulesHelp(subcommand) {
2487
2487
  if (subcommand === "list" || subcommand === "ls") console.log(`
2488
- ${colors.bold("forge-cli redirect-rules list")} - List redirect rules for a site
2488
+ ${colors.bold("forge redirect-rules list")} - List redirect rules for a site
2489
2489
 
2490
2490
  ${colors.bold("USAGE:")}
2491
- forge-cli redirect-rules list --server <server_id> --site <site_id> [options]
2491
+ forge redirect-rules list --server <server_id> --site <site_id> [options]
2492
2492
 
2493
2493
  ${colors.bold("OPTIONS:")}
2494
2494
  --server <id> Server ID (required)
@@ -2496,16 +2496,16 @@ ${colors.bold("OPTIONS:")}
2496
2496
  -f, --format <fmt> Output format: json, human, table
2497
2497
  `);
2498
2498
  else if (subcommand === "get") console.log(`
2499
- ${colors.bold("forge-cli redirect-rules get")} - Get redirect rule details
2499
+ ${colors.bold("forge redirect-rules get")} - Get redirect rule details
2500
2500
 
2501
2501
  ${colors.bold("USAGE:")}
2502
- forge-cli redirect-rules get <rule_id> --server <server_id> --site <site_id> [options]
2502
+ forge redirect-rules get <rule_id> --server <server_id> --site <site_id> [options]
2503
2503
  `);
2504
2504
  else if (subcommand === "create") console.log(`
2505
- ${colors.bold("forge-cli redirect-rules create")} - Create a new redirect rule
2505
+ ${colors.bold("forge redirect-rules create")} - Create a new redirect rule
2506
2506
 
2507
2507
  ${colors.bold("USAGE:")}
2508
- forge-cli redirect-rules create --server <server_id> --site <site_id> --from <from> --to <to> [options]
2508
+ forge redirect-rules create --server <server_id> --site <site_id> --from <from> --to <to> [options]
2509
2509
 
2510
2510
  ${colors.bold("OPTIONS:")}
2511
2511
  --server <id> Server ID (required)
@@ -2515,16 +2515,16 @@ ${colors.bold("OPTIONS:")}
2515
2515
  -f, --format <fmt> Output format: json, human, table
2516
2516
  `);
2517
2517
  else if (subcommand === "delete") console.log(`
2518
- ${colors.bold("forge-cli redirect-rules delete")} - Delete a redirect rule
2518
+ ${colors.bold("forge redirect-rules delete")} - Delete a redirect rule
2519
2519
 
2520
2520
  ${colors.bold("USAGE:")}
2521
- forge-cli redirect-rules delete <rule_id> --server <server_id> --site <site_id> [options]
2521
+ forge redirect-rules delete <rule_id> --server <server_id> --site <site_id> [options]
2522
2522
  `);
2523
2523
  else console.log(`
2524
- ${colors.bold("forge-cli redirect-rules")} - Manage site redirect rules
2524
+ ${colors.bold("forge redirect-rules")} - Manage site redirect rules
2525
2525
 
2526
2526
  ${colors.bold("USAGE:")}
2527
- forge-cli redirect-rules <subcommand> [options]
2527
+ forge redirect-rules <subcommand> [options]
2528
2528
 
2529
2529
  ${colors.bold("SUBCOMMANDS:")}
2530
2530
  list, ls List redirect rules
@@ -2537,12 +2537,12 @@ ${colors.bold("OPTIONS:")}
2537
2537
  --site <id> Site ID (required)
2538
2538
  -f, --format <fmt> Output format: json, human, table
2539
2539
 
2540
- Run ${colors.cyan("forge-cli redirect-rules <subcommand> --help")} for details.
2540
+ Run ${colors.cyan("forge redirect-rules <subcommand> --help")} for details.
2541
2541
  `);
2542
2542
  }
2543
2543
  async function scheduledJobsList(ctx) {
2544
2544
  const server = String(ctx.options.server ?? "");
2545
- if (!server) exitWithValidationError("server_id", "forge-cli scheduled-jobs list --server <server_id>", ctx.formatter);
2545
+ if (!server) exitWithValidationError("server_id", "forge scheduled-jobs list --server <server_id>", ctx.formatter);
2546
2546
  await runCommand(async () => {
2547
2547
  const token = ctx.getToken();
2548
2548
  const execCtx = ctx.createExecutorContext(token);
@@ -2558,8 +2558,8 @@ async function scheduledJobsList(ctx) {
2558
2558
  async function scheduledJobsGet(args, ctx) {
2559
2559
  const [id] = args;
2560
2560
  const server = String(ctx.options.server ?? "");
2561
- if (!id) exitWithValidationError("job_id", "forge-cli scheduled-jobs get <job_id> --server <server_id>", ctx.formatter);
2562
- if (!server) exitWithValidationError("server_id", "forge-cli scheduled-jobs get <job_id> --server <server_id>", ctx.formatter);
2561
+ if (!id) exitWithValidationError("job_id", "forge scheduled-jobs get <job_id> --server <server_id>", ctx.formatter);
2562
+ if (!server) exitWithValidationError("server_id", "forge scheduled-jobs get <job_id> --server <server_id>", ctx.formatter);
2563
2563
  await runCommand(async () => {
2564
2564
  const token = ctx.getToken();
2565
2565
  const execCtx = ctx.createExecutorContext(token);
@@ -2581,8 +2581,8 @@ async function scheduledJobsGet(args, ctx) {
2581
2581
  async function scheduledJobsCreate(ctx) {
2582
2582
  const server = String(ctx.options.server ?? "");
2583
2583
  const command = String(ctx.options.command ?? "");
2584
- if (!server) exitWithValidationError("server_id", "forge-cli scheduled-jobs create --server <server_id> --command <command>", ctx.formatter);
2585
- if (!command) exitWithValidationError("command", "forge-cli scheduled-jobs create --server <server_id> --command <command>", ctx.formatter);
2584
+ if (!server) exitWithValidationError("server_id", "forge scheduled-jobs create --server <server_id> --command <command>", ctx.formatter);
2585
+ if (!command) exitWithValidationError("command", "forge scheduled-jobs create --server <server_id> --command <command>", ctx.formatter);
2586
2586
  await runCommand(async () => {
2587
2587
  const token = ctx.getToken();
2588
2588
  const execCtx = ctx.createExecutorContext(token);
@@ -2604,8 +2604,8 @@ async function scheduledJobsCreate(ctx) {
2604
2604
  async function scheduledJobsDelete(args, ctx) {
2605
2605
  const [id] = args;
2606
2606
  const server = String(ctx.options.server ?? "");
2607
- if (!id) exitWithValidationError("job_id", "forge-cli scheduled-jobs delete <job_id> --server <server_id>", ctx.formatter);
2608
- if (!server) exitWithValidationError("server_id", "forge-cli scheduled-jobs delete <job_id> --server <server_id>", ctx.formatter);
2607
+ if (!id) exitWithValidationError("job_id", "forge scheduled-jobs delete <job_id> --server <server_id>", ctx.formatter);
2608
+ if (!server) exitWithValidationError("server_id", "forge scheduled-jobs delete <job_id> --server <server_id>", ctx.formatter);
2609
2609
  await runCommand(async () => {
2610
2610
  const token = ctx.getToken();
2611
2611
  const execCtx = ctx.createExecutorContext(token);
@@ -2629,26 +2629,26 @@ const handleScheduledJobsCommand = createCommandRouter({
2629
2629
  });
2630
2630
  function showScheduledJobsHelp(subcommand) {
2631
2631
  if (subcommand === "list" || subcommand === "ls") console.log(`
2632
- ${colors.bold("forge-cli scheduled-jobs list")} - List scheduled jobs on a server
2632
+ ${colors.bold("forge scheduled-jobs list")} - List scheduled jobs on a server
2633
2633
 
2634
2634
  ${colors.bold("USAGE:")}
2635
- forge-cli scheduled-jobs list --server <server_id> [options]
2635
+ forge scheduled-jobs list --server <server_id> [options]
2636
2636
 
2637
2637
  ${colors.bold("OPTIONS:")}
2638
2638
  --server <id> Server ID (required)
2639
2639
  -f, --format <fmt> Output format: json, human, table
2640
2640
  `);
2641
2641
  else if (subcommand === "get") console.log(`
2642
- ${colors.bold("forge-cli scheduled-jobs get")} - Get scheduled job details
2642
+ ${colors.bold("forge scheduled-jobs get")} - Get scheduled job details
2643
2643
 
2644
2644
  ${colors.bold("USAGE:")}
2645
- forge-cli scheduled-jobs get <job_id> --server <server_id> [options]
2645
+ forge scheduled-jobs get <job_id> --server <server_id> [options]
2646
2646
  `);
2647
2647
  else if (subcommand === "create") console.log(`
2648
- ${colors.bold("forge-cli scheduled-jobs create")} - Create a new scheduled job
2648
+ ${colors.bold("forge scheduled-jobs create")} - Create a new scheduled job
2649
2649
 
2650
2650
  ${colors.bold("USAGE:")}
2651
- forge-cli scheduled-jobs create --server <server_id> --command <command> [options]
2651
+ forge scheduled-jobs create --server <server_id> --command <command> [options]
2652
2652
 
2653
2653
  ${colors.bold("OPTIONS:")}
2654
2654
  --server <id> Server ID (required)
@@ -2656,16 +2656,16 @@ ${colors.bold("OPTIONS:")}
2656
2656
  -f, --format <fmt> Output format: json, human, table
2657
2657
  `);
2658
2658
  else if (subcommand === "delete") console.log(`
2659
- ${colors.bold("forge-cli scheduled-jobs delete")} - Delete a scheduled job
2659
+ ${colors.bold("forge scheduled-jobs delete")} - Delete a scheduled job
2660
2660
 
2661
2661
  ${colors.bold("USAGE:")}
2662
- forge-cli scheduled-jobs delete <job_id> --server <server_id> [options]
2662
+ forge scheduled-jobs delete <job_id> --server <server_id> [options]
2663
2663
  `);
2664
2664
  else console.log(`
2665
- ${colors.bold("forge-cli scheduled-jobs")} - Manage scheduled jobs (cron)
2665
+ ${colors.bold("forge scheduled-jobs")} - Manage scheduled jobs (cron)
2666
2666
 
2667
2667
  ${colors.bold("USAGE:")}
2668
- forge-cli scheduled-jobs <subcommand> [options]
2668
+ forge scheduled-jobs <subcommand> [options]
2669
2669
 
2670
2670
  ${colors.bold("SUBCOMMANDS:")}
2671
2671
  list, ls List scheduled jobs
@@ -2677,7 +2677,7 @@ ${colors.bold("OPTIONS:")}
2677
2677
  --server <id> Server ID (required)
2678
2678
  -f, --format <fmt> Output format: json, human, table
2679
2679
 
2680
- Run ${colors.cyan("forge-cli scheduled-jobs <subcommand> --help")} for details.
2680
+ Run ${colors.cyan("forge scheduled-jobs <subcommand> --help")} for details.
2681
2681
  `);
2682
2682
  }
2683
2683
  function requireServerAndSiteRaw(ctx, usage) {
@@ -2691,7 +2691,7 @@ function requireServerAndSiteRaw(ctx, usage) {
2691
2691
  };
2692
2692
  }
2693
2693
  async function securityRulesList(ctx) {
2694
- const { server, site } = requireServerAndSiteRaw(ctx, "forge-cli security-rules list --server <server_id> --site <site_id>");
2694
+ const { server, site } = requireServerAndSiteRaw(ctx, "forge security-rules list --server <server_id> --site <site_id>");
2695
2695
  await runCommand(async () => {
2696
2696
  const token = ctx.getToken();
2697
2697
  const execCtx = ctx.createExecutorContext(token);
@@ -2709,7 +2709,7 @@ async function securityRulesList(ctx) {
2709
2709
  }
2710
2710
  async function securityRulesGet(args, ctx) {
2711
2711
  const [id] = args;
2712
- const usage = "forge-cli security-rules get <rule_id> --server <server_id> --site <site_id>";
2712
+ const usage = "forge security-rules get <rule_id> --server <server_id> --site <site_id>";
2713
2713
  if (!id) exitWithValidationError("rule_id", usage, ctx.formatter);
2714
2714
  const { server, site } = requireServerAndSiteRaw(ctx, usage);
2715
2715
  await runCommand(async () => {
@@ -2731,7 +2731,7 @@ async function securityRulesGet(args, ctx) {
2731
2731
  }, ctx.formatter);
2732
2732
  }
2733
2733
  async function securityRulesCreate(ctx) {
2734
- const usage = "forge-cli security-rules create --server <server_id> --site <site_id> --name <name>";
2734
+ const usage = "forge security-rules create --server <server_id> --site <site_id> --name <name>";
2735
2735
  const { server, site } = requireServerAndSiteRaw(ctx, usage);
2736
2736
  const name = String(ctx.options.name ?? "");
2737
2737
  if (!name) exitWithValidationError("name", usage, ctx.formatter);
@@ -2755,7 +2755,7 @@ async function securityRulesCreate(ctx) {
2755
2755
  }
2756
2756
  async function securityRulesDelete(args, ctx) {
2757
2757
  const [id] = args;
2758
- const usage = "forge-cli security-rules delete <rule_id> --server <server_id> --site <site_id>";
2758
+ const usage = "forge security-rules delete <rule_id> --server <server_id> --site <site_id>";
2759
2759
  if (!id) exitWithValidationError("rule_id", usage, ctx.formatter);
2760
2760
  const { server, site } = requireServerAndSiteRaw(ctx, usage);
2761
2761
  await runCommand(async () => {
@@ -2783,10 +2783,10 @@ const handleSecurityRulesCommand = createCommandRouter({
2783
2783
  });
2784
2784
  function showSecurityRulesHelp(subcommand) {
2785
2785
  if (subcommand === "list" || subcommand === "ls") console.log(`
2786
- ${colors.bold("forge-cli security-rules list")} - List security rules for a site
2786
+ ${colors.bold("forge security-rules list")} - List security rules for a site
2787
2787
 
2788
2788
  ${colors.bold("USAGE:")}
2789
- forge-cli security-rules list --server <server_id> --site <site_id> [options]
2789
+ forge security-rules list --server <server_id> --site <site_id> [options]
2790
2790
 
2791
2791
  ${colors.bold("OPTIONS:")}
2792
2792
  --server <id> Server ID (required)
@@ -2794,16 +2794,16 @@ ${colors.bold("OPTIONS:")}
2794
2794
  -f, --format <fmt> Output format: json, human, table
2795
2795
  `);
2796
2796
  else if (subcommand === "get") console.log(`
2797
- ${colors.bold("forge-cli security-rules get")} - Get security rule details
2797
+ ${colors.bold("forge security-rules get")} - Get security rule details
2798
2798
 
2799
2799
  ${colors.bold("USAGE:")}
2800
- forge-cli security-rules get <rule_id> --server <server_id> --site <site_id> [options]
2800
+ forge security-rules get <rule_id> --server <server_id> --site <site_id> [options]
2801
2801
  `);
2802
2802
  else if (subcommand === "create") console.log(`
2803
- ${colors.bold("forge-cli security-rules create")} - Create a new security rule
2803
+ ${colors.bold("forge security-rules create")} - Create a new security rule
2804
2804
 
2805
2805
  ${colors.bold("USAGE:")}
2806
- forge-cli security-rules create --server <server_id> --site <site_id> --name <name> [options]
2806
+ forge security-rules create --server <server_id> --site <site_id> --name <name> [options]
2807
2807
 
2808
2808
  ${colors.bold("OPTIONS:")}
2809
2809
  --server <id> Server ID (required)
@@ -2812,16 +2812,16 @@ ${colors.bold("OPTIONS:")}
2812
2812
  -f, --format <fmt> Output format: json, human, table
2813
2813
  `);
2814
2814
  else if (subcommand === "delete") console.log(`
2815
- ${colors.bold("forge-cli security-rules delete")} - Delete a security rule
2815
+ ${colors.bold("forge security-rules delete")} - Delete a security rule
2816
2816
 
2817
2817
  ${colors.bold("USAGE:")}
2818
- forge-cli security-rules delete <rule_id> --server <server_id> --site <site_id> [options]
2818
+ forge security-rules delete <rule_id> --server <server_id> --site <site_id> [options]
2819
2819
  `);
2820
2820
  else console.log(`
2821
- ${colors.bold("forge-cli security-rules")} - Manage site security rules
2821
+ ${colors.bold("forge security-rules")} - Manage site security rules
2822
2822
 
2823
2823
  ${colors.bold("USAGE:")}
2824
- forge-cli security-rules <subcommand> [options]
2824
+ forge security-rules <subcommand> [options]
2825
2825
 
2826
2826
  ${colors.bold("SUBCOMMANDS:")}
2827
2827
  list, ls List security rules
@@ -2834,7 +2834,7 @@ ${colors.bold("OPTIONS:")}
2834
2834
  --site <id> Site ID (required)
2835
2835
  -f, --format <fmt> Output format: json, human, table
2836
2836
 
2837
- Run ${colors.cyan("forge-cli security-rules <subcommand> --help")} for details.
2837
+ Run ${colors.cyan("forge security-rules <subcommand> --help")} for details.
2838
2838
  `);
2839
2839
  }
2840
2840
  /**
@@ -2864,7 +2864,7 @@ async function serversList(ctx) {
2864
2864
  */
2865
2865
  async function serversGet(args, ctx) {
2866
2866
  const [server] = args;
2867
- if (!server) exitWithValidationError("server_id", "forge-cli servers get <server_id>", ctx.formatter);
2867
+ if (!server) exitWithValidationError("server_id", "forge servers get <server_id>", ctx.formatter);
2868
2868
  await runCommand(async () => {
2869
2869
  const token = ctx.getToken();
2870
2870
  const execCtx = ctx.createExecutorContext(token);
@@ -2877,7 +2877,7 @@ async function serversGet(args, ctx) {
2877
2877
  */
2878
2878
  async function serversReboot(args, ctx) {
2879
2879
  const [server] = args;
2880
- if (!server) exitWithValidationError("server_id", "forge-cli servers reboot <server_id>", ctx.formatter);
2880
+ if (!server) exitWithValidationError("server_id", "forge servers reboot <server_id>", ctx.formatter);
2881
2881
  await runCommand(async () => {
2882
2882
  const token = ctx.getToken();
2883
2883
  const execCtx = ctx.createExecutorContext(token);
@@ -2898,10 +2898,10 @@ const handleServersCommand = createCommandRouter({
2898
2898
  });
2899
2899
  function showServersHelp(subcommand) {
2900
2900
  if (subcommand === "list" || subcommand === "ls") console.log(`
2901
- ${colors.bold("forge-cli servers list")} - List all servers
2901
+ ${colors.bold("forge servers list")} - List all servers
2902
2902
 
2903
2903
  ${colors.bold("USAGE:")}
2904
- forge-cli servers list [options]
2904
+ forge servers list [options]
2905
2905
 
2906
2906
  ${colors.bold("OPTIONS:")}
2907
2907
  --token <token> Forge API token
@@ -2910,14 +2910,14 @@ ${colors.bold("OPTIONS:")}
2910
2910
  -h, --help Show this help
2911
2911
 
2912
2912
  ${colors.bold("EXAMPLES:")}
2913
- forge-cli servers list
2914
- forge-cli servers list --format json
2913
+ forge servers list
2914
+ forge servers list --format json
2915
2915
  `);
2916
2916
  else if (subcommand === "get") console.log(`
2917
- ${colors.bold("forge-cli servers get")} - Get server details
2917
+ ${colors.bold("forge servers get")} - Get server details
2918
2918
 
2919
2919
  ${colors.bold("USAGE:")}
2920
- forge-cli servers get <server_id> [options]
2920
+ forge servers get <server_id> [options]
2921
2921
 
2922
2922
  ${colors.bold("ARGUMENTS:")}
2923
2923
  <server_id> Server ID (required)
@@ -2926,29 +2926,29 @@ ${colors.bold("OPTIONS:")}
2926
2926
  -f, --format <fmt> Output format: json, human, table
2927
2927
 
2928
2928
  ${colors.bold("EXAMPLES:")}
2929
- forge-cli servers get 123
2930
- forge-cli servers get 123 --format json
2929
+ forge servers get 123
2930
+ forge servers get 123 --format json
2931
2931
  `);
2932
2932
  else if (subcommand === "reboot") console.log(`
2933
- ${colors.bold("forge-cli servers reboot")} - Reboot a server
2933
+ ${colors.bold("forge servers reboot")} - Reboot a server
2934
2934
 
2935
2935
  ${colors.bold("USAGE:")}
2936
- forge-cli servers reboot <server_id> [options]
2936
+ forge servers reboot <server_id> [options]
2937
2937
 
2938
2938
  ${colors.bold("ARGUMENTS:")}
2939
2939
  <server_id> Server ID (required)
2940
2940
 
2941
2941
  ${colors.bold("EXAMPLES:")}
2942
- forge-cli servers reboot 123
2942
+ forge servers reboot 123
2943
2943
  `);
2944
2944
  else console.log(`
2945
- ${colors.bold("forge-cli servers")} - Manage servers
2945
+ ${colors.bold("forge servers")} - Manage servers
2946
2946
 
2947
2947
  ${colors.bold("USAGE:")}
2948
- forge-cli servers <subcommand> [options]
2948
+ forge servers <subcommand> [options]
2949
2949
 
2950
2950
  ${colors.bold("ALIASES:")}
2951
- forge-cli s
2951
+ forge s
2952
2952
 
2953
2953
  ${colors.bold("SUBCOMMANDS:")}
2954
2954
  list, ls List all servers
@@ -2960,15 +2960,15 @@ ${colors.bold("OPTIONS:")}
2960
2960
  -h, --help Show help for a subcommand
2961
2961
 
2962
2962
  ${colors.bold("EXAMPLES:")}
2963
- forge-cli servers list
2964
- forge-cli servers get 123
2963
+ forge servers list
2964
+ forge servers get 123
2965
2965
 
2966
- Run ${colors.cyan("forge-cli servers <subcommand> --help")} for subcommand details.
2966
+ Run ${colors.cyan("forge servers <subcommand> --help")} for subcommand details.
2967
2967
  `);
2968
2968
  }
2969
2969
  async function sitesList(ctx) {
2970
2970
  const server = String(ctx.options.server ?? "");
2971
- if (!server) exitWithValidationError("server_id", "forge-cli sites list --server <server_id>", ctx.formatter);
2971
+ if (!server) exitWithValidationError("server_id", "forge sites list --server <server_id>", ctx.formatter);
2972
2972
  await runCommand(async () => {
2973
2973
  const token = ctx.getToken();
2974
2974
  const execCtx = ctx.createExecutorContext(token);
@@ -2984,8 +2984,8 @@ async function sitesList(ctx) {
2984
2984
  async function sitesGet(args, ctx) {
2985
2985
  const [site_id] = args;
2986
2986
  const server = String(ctx.options.server ?? "");
2987
- if (!site_id) exitWithValidationError("site_id", "forge-cli sites get <site_id> --server <server_id>", ctx.formatter);
2988
- if (!server) exitWithValidationError("server_id", "forge-cli sites get <site_id> --server <server_id>", ctx.formatter);
2987
+ if (!site_id) exitWithValidationError("site_id", "forge sites get <site_id> --server <server_id>", ctx.formatter);
2988
+ if (!server) exitWithValidationError("server_id", "forge sites get <site_id> --server <server_id>", ctx.formatter);
2989
2989
  await runCommand(async () => {
2990
2990
  const token = ctx.getToken();
2991
2991
  const execCtx = ctx.createExecutorContext(token);
@@ -3018,24 +3018,24 @@ const handleSitesCommand = createCommandRouter({
3018
3018
  });
3019
3019
  function showSitesHelp(subcommand) {
3020
3020
  if (subcommand === "list" || subcommand === "ls") console.log(`
3021
- ${colors.bold("forge-cli sites list")} - List sites on a server
3021
+ ${colors.bold("forge sites list")} - List sites on a server
3022
3022
 
3023
3023
  ${colors.bold("USAGE:")}
3024
- forge-cli sites list --server <server_id> [options]
3024
+ forge sites list --server <server_id> [options]
3025
3025
 
3026
3026
  ${colors.bold("OPTIONS:")}
3027
3027
  --server <id> Server ID (required)
3028
3028
  -f, --format <fmt> Output format: json, human, table
3029
3029
 
3030
3030
  ${colors.bold("EXAMPLES:")}
3031
- forge-cli sites list --server 123
3032
- forge-cli sites list --server 123 --format json
3031
+ forge sites list --server 123
3032
+ forge sites list --server 123 --format json
3033
3033
  `);
3034
3034
  else if (subcommand === "get") console.log(`
3035
- ${colors.bold("forge-cli sites get")} - Get site details
3035
+ ${colors.bold("forge sites get")} - Get site details
3036
3036
 
3037
3037
  ${colors.bold("USAGE:")}
3038
- forge-cli sites get <site_id> --server <server_id> [options]
3038
+ forge sites get <site_id> --server <server_id> [options]
3039
3039
 
3040
3040
  ${colors.bold("ARGUMENTS:")}
3041
3041
  <site_id> Site ID (required)
@@ -3045,10 +3045,10 @@ ${colors.bold("OPTIONS:")}
3045
3045
  -f, --format <fmt> Output format: json, human, table
3046
3046
  `);
3047
3047
  else console.log(`
3048
- ${colors.bold("forge-cli sites")} - Manage sites
3048
+ ${colors.bold("forge sites")} - Manage sites
3049
3049
 
3050
3050
  ${colors.bold("USAGE:")}
3051
- forge-cli sites <subcommand> [options]
3051
+ forge sites <subcommand> [options]
3052
3052
 
3053
3053
  ${colors.bold("SUBCOMMANDS:")}
3054
3054
  list, ls List sites on a server
@@ -3060,15 +3060,15 @@ ${colors.bold("OPTIONS:")}
3060
3060
  -h, --help Show help for a subcommand
3061
3061
 
3062
3062
  ${colors.bold("EXAMPLES:")}
3063
- forge-cli sites list --server 123
3064
- forge-cli sites get 456 --server 123
3063
+ forge sites list --server 123
3064
+ forge sites get 456 --server 123
3065
3065
 
3066
- Run ${colors.cyan("forge-cli sites <subcommand> --help")} for subcommand details.
3066
+ Run ${colors.cyan("forge sites <subcommand> --help")} for subcommand details.
3067
3067
  `);
3068
3068
  }
3069
3069
  async function sshKeysList(ctx) {
3070
3070
  const server = String(ctx.options.server ?? "");
3071
- if (!server) exitWithValidationError("server_id", "forge-cli ssh-keys list --server <server_id>", ctx.formatter);
3071
+ if (!server) exitWithValidationError("server_id", "forge ssh-keys list --server <server_id>", ctx.formatter);
3072
3072
  await runCommand(async () => {
3073
3073
  const token = ctx.getToken();
3074
3074
  const execCtx = ctx.createExecutorContext(token);
@@ -3083,8 +3083,8 @@ async function sshKeysList(ctx) {
3083
3083
  async function sshKeysGet(args, ctx) {
3084
3084
  const [id] = args;
3085
3085
  const server = String(ctx.options.server ?? "");
3086
- if (!id) exitWithValidationError("ssh_key_id", "forge-cli ssh-keys get <key_id> --server <server_id>", ctx.formatter);
3087
- if (!server) exitWithValidationError("server_id", "forge-cli ssh-keys get <key_id> --server <server_id>", ctx.formatter);
3086
+ if (!id) exitWithValidationError("ssh_key_id", "forge ssh-keys get <key_id> --server <server_id>", ctx.formatter);
3087
+ if (!server) exitWithValidationError("server_id", "forge ssh-keys get <key_id> --server <server_id>", ctx.formatter);
3088
3088
  await runCommand(async () => {
3089
3089
  const token = ctx.getToken();
3090
3090
  const execCtx = ctx.createExecutorContext(token);
@@ -3110,22 +3110,22 @@ const handleSshKeysCommand = createCommandRouter({
3110
3110
  });
3111
3111
  function showSshKeysHelp(subcommand) {
3112
3112
  if (subcommand === "list" || subcommand === "ls") console.log(`
3113
- ${colors.bold("forge-cli ssh-keys list")} - List SSH keys on a server
3113
+ ${colors.bold("forge ssh-keys list")} - List SSH keys on a server
3114
3114
 
3115
3115
  ${colors.bold("USAGE:")}
3116
- forge-cli ssh-keys list --server <server_id> [options]
3116
+ forge ssh-keys list --server <server_id> [options]
3117
3117
  `);
3118
3118
  else if (subcommand === "get") console.log(`
3119
- ${colors.bold("forge-cli ssh-keys get")} - Get SSH key details
3119
+ ${colors.bold("forge ssh-keys get")} - Get SSH key details
3120
3120
 
3121
3121
  ${colors.bold("USAGE:")}
3122
- forge-cli ssh-keys get <key_id> --server <server_id>
3122
+ forge ssh-keys get <key_id> --server <server_id>
3123
3123
  `);
3124
3124
  else console.log(`
3125
- ${colors.bold("forge-cli ssh-keys")} - Manage SSH keys
3125
+ ${colors.bold("forge ssh-keys")} - Manage SSH keys
3126
3126
 
3127
3127
  ${colors.bold("USAGE:")}
3128
- forge-cli ssh-keys <subcommand> [options]
3128
+ forge ssh-keys <subcommand> [options]
3129
3129
 
3130
3130
  ${colors.bold("SUBCOMMANDS:")}
3131
3131
  list, ls List SSH keys
@@ -3135,7 +3135,7 @@ ${colors.bold("OPTIONS:")}
3135
3135
  --server <id> Server ID (required)
3136
3136
  -f, --format <fmt> Output format: json, human, table
3137
3137
 
3138
- Run ${colors.cyan("forge-cli ssh-keys <subcommand> --help")} for details.
3138
+ Run ${colors.cyan("forge ssh-keys <subcommand> --help")} for details.
3139
3139
  `);
3140
3140
  }
3141
3141
  async function userGet(ctx) {
@@ -3151,19 +3151,19 @@ const handleUserCommand = createCommandRouter({
3151
3151
  });
3152
3152
  function showUserHelp(subcommand) {
3153
3153
  if (subcommand === "get") console.log(`
3154
- ${colors.bold("forge-cli user get")} - Get the authenticated user profile
3154
+ ${colors.bold("forge user get")} - Get the authenticated user profile
3155
3155
 
3156
3156
  ${colors.bold("USAGE:")}
3157
- forge-cli user get [options]
3157
+ forge user get [options]
3158
3158
 
3159
3159
  ${colors.bold("OPTIONS:")}
3160
3160
  -f, --format <fmt> Output format: json, human, table
3161
3161
  `);
3162
3162
  else console.log(`
3163
- ${colors.bold("forge-cli user")} - Display authenticated user profile
3163
+ ${colors.bold("forge user")} - Display authenticated user profile
3164
3164
 
3165
3165
  ${colors.bold("USAGE:")}
3166
- forge-cli user [subcommand] [options]
3166
+ forge user [subcommand] [options]
3167
3167
 
3168
3168
  ${colors.bold("SUBCOMMANDS:")}
3169
3169
  get Get the authenticated user profile
@@ -3171,7 +3171,7 @@ ${colors.bold("SUBCOMMANDS:")}
3171
3171
  ${colors.bold("OPTIONS:")}
3172
3172
  -f, --format <fmt> Output format: json, human, table
3173
3173
 
3174
- Run ${colors.cyan("forge-cli user <subcommand> --help")} for details.
3174
+ Run ${colors.cyan("forge user <subcommand> --help")} for details.
3175
3175
  `);
3176
3176
  }
3177
3177
  function parseArgs(argv = process.argv.slice(2)) {
@@ -3210,13 +3210,13 @@ function parseArgs(argv = process.argv.slice(2)) {
3210
3210
  positional
3211
3211
  };
3212
3212
  }
3213
- var VERSION = "0.2.5";
3213
+ var VERSION = "0.3.0";
3214
3214
  function showHelp() {
3215
3215
  console.log(`
3216
- ${colors.bold("forge-cli")} v${VERSION}
3216
+ ${colors.bold("forge")} v${VERSION}
3217
3217
 
3218
3218
  ${colors.bold("USAGE:")}
3219
- forge-cli <command> [subcommand] [options]
3219
+ forge <command> [subcommand] [options]
3220
3220
 
3221
3221
  ${colors.bold("COMMANDS:")}
3222
3222
  config Manage CLI configuration
@@ -3339,22 +3339,22 @@ ${colors.bold("OPTIONS:")}
3339
3339
 
3340
3340
  ${colors.bold("EXAMPLES:")}
3341
3341
  # Configure API token
3342
- forge-cli config set YOUR_TOKEN
3342
+ forge config set YOUR_TOKEN
3343
3343
 
3344
3344
  # Or pass token directly
3345
- forge-cli servers list --token YOUR_TOKEN
3345
+ forge servers list --token YOUR_TOKEN
3346
3346
 
3347
3347
  # List all servers
3348
- forge-cli servers list
3348
+ forge servers list
3349
3349
 
3350
3350
  # List sites on a server
3351
- forge-cli sites list --server 123
3351
+ forge sites list --server 123
3352
3352
 
3353
3353
  # Deploy a site
3354
- forge-cli deployments deploy --server 123 --site 456
3354
+ forge deployments deploy --server 123 --site 456
3355
3355
 
3356
3356
  # Get JSON output (for AI agents)
3357
- forge-cli servers list --format json
3357
+ forge servers list --format json
3358
3358
 
3359
3359
  ${colors.bold("CREDENTIAL PRIORITY:")}
3360
3360
  1. CLI argument (--token)
@@ -3547,7 +3547,7 @@ async function main() {
3547
3547
  break;
3548
3548
  default:
3549
3549
  console.error(colors.red(`Unknown command: ${mainCommand}`));
3550
- console.log(`Run ${colors.cyan("forge-cli --help")} for usage information`);
3550
+ console.log(`Run ${colors.cyan("forge --help")} for usage information`);
3551
3551
  process.exit(1);
3552
3552
  }
3553
3553
  } catch (error) {