> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

The most common Trunk Actions are provided out of the box with trunk, and are triggered to invisibly autoformat (`trunk fmt`) your commits every time you `git commit`, and run `trunk check` when you `git push`.

### Triggers

There are several different types of Trunk Actions, based on when they are triggered:

| Trigger                 | Description                                                          |
| ----------------------- | -------------------------------------------------------------------- |
| time-based              | run on a schedule (once per hour, once per day, once per week)       |
| file modification       | run whenever a file or directory in your repo changes.               |
| [githooks](./git-hooks) | run whenever a listed githook event fires (e.g. pre-commit, on-push) |
| manual                  | `trunk run <action-name>`                                            |

### **Command line**

| trunk actions \<command> | Description                                                                |
| ------------------------ | -------------------------------------------------------------------------- |
| `list`                   | list all available actions in the repository                               |
| `history <action-name>`  | print the history for execution of the provided action                     |
| `enable <action-name>`   | enable the provided action                                                 |
| `disable <action-name>`  | disable the provided action                                                |
| `run <action-name>`      | manually trigger the provided action<br />alias: `trunk run <action-name>` |

### Discovering actions

The trunk [plugins](https://github.com/trunk-io/plugins) repo ships with a collection of actions that can help supercharge your repository and provide examples of how to write your own actions. To see a list of actions that you can enable in your repo run:

```bash theme={null}
trunk actions list
```

<Frame caption="List of actions reported by trunk actions list">
  <img src="https://mintcdn.com/trunk-4cab4936/WAR0qJ1WO0rtUlqz/assets/code-quality/overview/getting-started/actions/image_(16).png?fit=max&auto=format&n=WAR0qJ1WO0rtUlqz&q=85&s=2ff91c792785467d70f83b6153489f5d" alt="" width="863" height="297" data-path="assets/code-quality/overview/getting-started/actions/image_(16).png" />
</Frame>

### Enable/Disable actions

Trunk only runs actions listed in the `enabled` section of your `trunk.yaml`. Some built-in actions are enabled by default and can be disabled explicitly by adding them to the disabled list. You can always run `trunk actions list` to check the enabled status of an action.

```yaml theme={null}
actions:
  enabled:
    - trunk-announce
    - git-lfs
    - trunk-check-pre-push
    - trunk-fmt-pre-commit
    - trunk-cache-prune
    - trunk-upgrade-available
```
