share-discord command.
Quick Start
Configure your first Discord webhook:Interactive Configuration
The--configure flag provides a menu-driven interface with the following options:
View Webhooks
Displays all configured webhooks with their names and URLs. The default webhook (if set) is marked with “(default)”.Add Webhook
Prompts you to enter:- Webhook name: A friendly identifier (e.g., “production”, “team-alerts”)
- Webhook URL: The full Discord webhook URL from your Discord channel settings
- Set as default: Whether to make this the default webhook
Webhook URLs must start with
https://discord.com/api/webhooks/ to be valid.Remove Webhook
Allows you to select one or more webhooks to remove. If you remove the default webhook, the default setting is automatically cleared.Set Default
Choose which webhook should be used by default when runningahh share-discord without specifying a webhook. You can also clear the default setting.
Webhook Configuration Structure
Webhooks are stored in theahh.config.json file using this structure:
DISCORD_WEBHOOKS Array
Each webhook object contains:A unique identifier for the webhook. Used to select the webhook when sharing content.
The complete Discord webhook URL. Must start with
https://discord.com/api/webhooks/.DEFAULT_DISCORD_WEBHOOK
The name of the webhook to use by default. Must match one of the names in the
DISCORD_WEBHOOKS array.Getting a Discord Webhook URL
To create a webhook URL in Discord:- Open Discord and navigate to the channel where you want to receive messages
- Click the gear icon next to the channel name (Edit Channel)
- Select “Integrations” from the left sidebar
- Click “Create Webhook” or “View Webhooks”
- Click “New Webhook” if needed
- Give your webhook a name and optionally customize its avatar
- Click “Copy Webhook URL”
- Use this URL when configuring Ahh CLI
Example: Discord Server Settings
Example: Discord Server Settings
Usage Examples
Example: Configure Multiple Webhooks
Example: Configure Multiple Webhooks
- Add webhook named “production” → Enter production webhook URL → Set as default: Yes
- Add webhook named “development” → Enter development webhook URL → Set as default: No
- Add webhook named “personal” → Enter personal webhook URL → Set as default: No
Example: Share Content to Default Webhook
Example: Share Content to Default Webhook
Example: Share to Specific Webhook
Example: Share to Specific Webhook
Manual Configuration
You can also manually edit the config file at~/.ahh/ahh.config.json:
After manually editing the config file, test your webhooks by running
ahh share-discord to ensure they work correctly.Error Handling
No Webhooks Configured
If you try to useshare-discord without any configured webhooks:
ahh share-discord --configure to add at least one webhook.
Invalid Webhook URL
When adding a webhook, the URL must start withhttps://discord.com/api/webhooks/:
Failed to Send
If sending to Discord fails:- The webhook was deleted in Discord
- The webhook URL is incorrect
- Network connectivity issues
Related Commands
- share-discord - Share content to Discord
- Configuration File - Learn about the config file structure
