View Categories

Advanced Help Metadata

2 min read

The Cointacted Social Terminal includes a powerful metadata system that controls how commands appear in:

  • help
  • help <group>
  • help search <keyword>
  • command grouping
  • guest access filtering
  • command sorting

This article explains every metadata property available and how to use them to organize professional-grade command packs and add-ons.


πŸ”Ή 1. Where Metadata Lives #

Metadata is stored in:

CointactedSocialTerminalTerminal.commands_meta

Each command gets a metadata object:

CointactedSocialTerminalTerminal.commands_meta.mycmd = {
    group: "TOOLS",
    description: "Describe what this command does.",
    alias: ["m", "my"],
    public: true,
    hidden: false,
};

Metadata can be added after command registration.


πŸ”Ή 2. The group Property (Required for categorization) #

Controls which group the command appears under in help.

Example:

group: "WALLET"

Available groups can be:

  • CORE
  • USER
  • SITE
  • WALLET
  • NETWORK
  • CLIENT
  • FUN
  • ADMIN
  • (custom) β€” your add-ons can create new groups

Creating new groups #

Just assign a group name. If it doesn’t exist, it is automatically created.

Example:

group: "SOCIAL"

Now:

help social

will list commands in that group.


πŸ”Ή 3. The description Property (Shown in help system) #

This appears in:

  • help
  • help <group>
  • search results

Example:

description: "Shows your Social Mining reward balance."

Good descriptions:

  • start with an action verb
  • are short
  • tell you what the command does

πŸ”Ή 4. The alias Property #

Aliases are additional triggers for your command.

Example:

alias: ["rw", "rewards"]

User can then run:

socialrewards
rw

Aliases:

  • appear in help
  • appear in search
  • must be unique
  • should be lowercase

πŸ”Ή 5. The hidden Property (Hide from help) #

If you want a command to exist but not show up in help, set:

hidden: true

Reasons to hide:

  • internal diagnostic tools
  • developer-only commands
  • system functions
  • experimental features
  • onboarding flows

Example:

CointactedSocialTerminalTerminal.commands_meta.debugtrace = {
    group: "ADMIN",
    description: "Developer trace tool.",
    hidden: true,
};

Hidden commands still:

  • load normally
  • run normally
  • support aliases

But:

  • do not appear in help
  • do not appear in group lists
  • do not appear in search results

πŸ”Ή 6. The public Property (Guest Mode Control) #

When guest mode is enabled in settings, only safe, explicitly-marked commands can be used by non-logged-in users.

To allow a command for guests:

public: true

If omitted, default behavior = private.

Guest-safe commands must:

  • not expose user data
  • not require permissions
  • not use private REST routes
  • not show wallet information
  • not expose dangerous system info
  • not allow actions

Safe examples:

  • ping
  • browser info
  • links
  • site info
  • social links
  • info pages

Unsafe examples for guests:

  • wallet
  • user profile
  • admin tools
  • anything with sensitive data

πŸ”Ή 7. Full Example of Metadata #

CointactedSocialTerminalTerminal.commands_meta.rewards = {
    group: "SOCIAL",
    description: "Show your Social Mining rewards.",
    alias: ["rw", "myrewards"],
    public: false,
    hidden: false,
};

πŸ”Ή 8. Adding Metadata in Add-On Scripts #

Add-ons should attach metadata after registering the command:

CointactedSocialTerminalTerminal.registry.mycmd = function(input) {
    // code
};

CointactedSocialTerminalTerminal.commands_meta.mycmd = {
    group: "ADDON",
    description: "My custom command.",
    alias: ["mc"],
    public: true,
};

πŸ”Ή 9. Metadata-Driven Command Sorting #

Your help system sorts commands automatically:

  1. by group name
  2. then alphabetically within group
  3. aliases listed after main command

This ensures clean documentation even with many add-ons installed.

No developer work required β€” sorting is automatic.


πŸ”Ή 10. Metadata for Overridden Commands #

If you override a built-in command, you may also override its metadata:

CointactedSocialTerminalTerminal.commands_meta.wallet.description =
    "Extended wallet info (add-on enhanced)";

Or replace metadata entirely:

CointactedSocialTerminalTerminal.commands_meta.wallet = {
    group: "WALLET",
    description: "My custom wallet handler.",
    alias: ["w"],
    public: false,
};

πŸ”Ή 11. Adding Command Groups Programmatically #

You don’t manually create groups β€”
a group is created automatically when metadata references it.

Example:

group: "CHAINTOOLKIT"

Will appear in help:

Available command groups:
  CHAINTOOLKIT - X commands

Works instantly.


πŸ”Ή 12. Metadata for Search Enhancement #

Your help search:

help search gas

Matches:

  • command name
  • alias
  • group name
  • description text

This allows devs to optimize searchability by using good keywords inside descriptions.


🎯 Summary #

Metadata is the backbone of your help system. It controls:

βœ” grouping #

βœ” visibility #

βœ” descriptions #

βœ” aliases #

βœ” guest permissions #

βœ” search indexing #

βœ” overall structure #

Using metadata properly ensures a clean, scalable command ecosystem β€” especially once dozens of official and third-party add-ons exist.

Leave a Reply

Your email address will not be published. Required fields are marked *