---
name: triggercmd
description: Control TRIGGERcmd computers remotely by listing and running commands via the TRIGGERcmd REST API.
homepage: https://www.triggercmd.com
---

# TRIGGERcmd Skill

Use this skill to inspect and run TRIGGERcmd commands on any computer registered with the user's TRIGGERcmd account.

TRIGGERcmd lets users remotely trigger commands on their computers via a REST API. You can list available commands across all registered computers and run them by name.

## Authentication

Before making API calls, obtain the token:

1. **Environment variable** (preferred): Read from `TRIGGERCMD_TOKEN`
2. **Token file** (fallback): Read from `~/.TRIGGERcmdData/token.tkn`

If neither is found, instruct the user to set `TRIGGERCMD_TOKEN` or create the token file. They can get their token from https://www.triggercmd.com under their profile/settings page.

**Never print, log, or expose the token value in outputs.**

## API Reference

**Base URL:** `https://www.triggercmd.com/api`

All requests require the header: `Authorization: Bearer <token>`

### List Commands

**GET** `/command/list`

Returns all commands across all computers. Each record includes:
- `computer.name` — the computer the command belongs to
- `name` — the command name
- `voice` — the voice trigger phrase (if set)
- `allowParams` — whether the command accepts parameters
- `id` — the command ID
- `mcpToolDescription` — description of what the command does

### Run a Command

**POST** `/run/trigger`

**Content-Type:** `application/json`

**Body:**
```json
{
  "computer": "<computer name>",
  "command": "<command name>",
  "params": "<optional parameters>"
}
```

- Omit `params` when the command does not accept parameters.
- Use exact computer and command names as returned by the list endpoint.

## Behavior Guidelines

- When listing commands, group them by computer name for readability.
- Include `allowParams` info when suggesting commands so the user knows if parameters are accepted.
- Always list commands first to verify computer/command names before running anything.
- Confirm with the user before running commands with side effects unless they explicitly requested it.
- If a computer or command name is not found, show the available options.

## Error Handling

- **No token found**: Tell the user to set `TRIGGERCMD_TOKEN` or create `~/.TRIGGERcmdData/token.tkn`.
- **401/403 (invalid token)**: Ask the user to verify or regenerate their token at https://www.triggercmd.com.
- **Computer not found**: Show available computer names from the list endpoint.
- **Command not found**: List the commands for the requested computer.
- **Network/API errors**: Include the HTTP status and response body to help debug.
