# Commands

Sidekick provides built-in commands and dynamically registers commands from imported OpenAPI specs.

## Built-in commands

| Command                  | Description                 |
| ------------------------ | --------------------------- |
| `sdkck commands`         | List all available commands |
| `sdkck help [COMMAND]`   | Display help for a command  |
| `sdkck search QUERY`     | Search for commands         |
| `sdkck version`          | Show version info           |
| `sdkck update [CHANNEL]` | Update the CLI              |

## API commands

| Command                           | Description                                                   |
| --------------------------------- | ------------------------------------------------------------- |
| `sdkck api import SOURCE`         | Import an OpenAPI spec, Postman collection, or GraphQL schema |
| `sdkck api list [NAME]`           | List imported specs and operations                            |
| `sdkck api call NAME OPERATIONID` | Call an imported operation                                    |
| `sdkck api auth NAME`             | Configure authentication for a spec                           |
| `sdkck api config NAME`           | Update spec configuration                                     |
| `sdkck api remove NAME`           | Remove an imported spec                                       |

## Permission commands

| Command                             | Description                |
| ----------------------------------- | -------------------------- |
| `sdkck permission allow PATTERN`    | Allow a command pattern    |
| `sdkck permission disallow PATTERN` | Disallow a command pattern |
| `sdkck permission list`             | List all permission rules  |
| `sdkck permission export FILE`      | Export rules to JSON       |
| `sdkck permission import FILE`      | Import rules from JSON     |
| `sdkck permission reset`            | Reset all rules            |

## Plugin commands

| Command                         | Description                   |
| ------------------------------- | ----------------------------- |
| `sdkck plugins`                 | List installed plugins        |
| `sdkck plugins install PLUGIN`  | Install a plugin              |
| `sdkck plugins remove [PLUGIN]` | Remove a plugin               |
| `sdkck plugins link PATH`       | Link a plugin for development |

## MCP commands

| Command           | Description          |
| ----------------- | -------------------- |
| `sdkck mcp start` | Start the MCP server |

## Dynamic commands

When you import an OpenAPI spec, every operation becomes a command under the spec name:

```bash
# After importing a spec named "petstore"
sdkck petstore listPets
sdkck petstore getPetById --param petId=42
sdkck petstore createPet --body name=Fido
```

These dynamic commands appear in `sdkck help` and `sdkck commands` just like built-in commands.

## Getting help

```bash
sdkck --help              # General help
sdkck api --help          # Topic help
sdkck api import --help   # Command-specific help
```
