Skip to main content

forgeloop commands

Usage

forgeloop commands list [--dir ./project]
forgeloop commands diff [--guild|--global] [--dir ./project]
forgeloop commands deploy [--guild|--global] [--dir ./project]

commands is available for modular and advanced projects only.

Basic preset error:

This ForgeLoop project uses the "basic" shape, so slash command tooling is only available for "modular" or "advanced" projects.

Invalid subcommand:

Usage: forgeloop commands deploy|list|diff [--guild|--global] [--dir <path>]

list

  • Loads command modules from your project src/commands.
  • Prints the local application command names (slash commands and context menus).
  • If none are found, prints a warning.

deploy

  • Builds application command payload from local modules and sends a PUT request to Discord.
  • --guild forces guild-scoped deploy (requires GUILD_ID).
  • --global forces global deploy.
  • If neither is set: production -> global, otherwise guild.
  • Requires .env values: DISCORD_TOKEN, CLIENT_ID, and GUILD_ID for guild deploy.

diff

  • Builds the local application command payload the same way as deploy.
  • Fetches the current Discord command set for the selected target.
  • Reports commands that are local-only, remote-only, or changed by name.
  • Uses the same target rules and required .env values as deploy.

Flags

FlagTypeDefaultDescription
--dirstringcwdProject root containing ForgeLoop config.
--guildbooleanDeploy to a guild application command scope.
--globalbooleanDeploy to global application command scope.