> For the complete documentation index, see [llms.txt](https://tampered-console.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tampered-console.js.org/usage/global-console.md).

# Global Console

Overriding the global console.

Tampered Console tampers the global console. This eases you from requiring the package in every script. Instead, require it once in your main script and call the override option `Console.globalConsole()`. You can then use the global console as you normally would and the console flavor will be applied.

In your main script, require the package once and call the `globalConsole` function then in any of your script, just use the global console.

#### Main Script (index.js)

```javascript
/* main script */
const Console = require('tampered-console');
Console.globalConsole(true);
```

#### Other Subsequent Script

```javascript
/* other script */
console.log('hello world');
// require('tampered-console'); is no longer needed
```
