---
title: attr category
categories: |
core
version: 0.104.0
core: |
Attribute for adding a category to custom commands.
usage: |
Attribute for adding a category to custom commands.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
# `attr category` for [core](/commands/categories/core.md)
<div class='command-title'>Attribute for adding a category to custom commands.</div>
## Signature
```> attr category {flags} (category)```
## Parameters
- `category`: Category of the custom command.
## Input/output types:
| input | output |
| ------- | ------------ |
| nothing | list\<string\> |
## Examples
Add a category to a custom command
```nu
> # Double numbers
@category math
def double []: [number -> number] { $in * 2 }
```