When having code like this:
---
sidebar_position: 5
---
import CodePen from '@site/src/CodePen';
# Automation
There are few ways to automate the usage of the Terminal.
## Executing Commands
You can execute a command just like the user typed a command:
```javascript
const term = $('body').terminal({
echo(arg) {
this.echo(arg.toUpperCase());
}
});
term.exec('echo hello');
```
After $( JavaScript mode switches to LaTeX.