<div align=center>
<h1>I Am Root</h1>
<p>Display a message informing you whether this program is running as root or not</p>
<div>
<a href="https://codeberg.org/RachaelAva1024/iamroot"><img src="https://img.shields.io/badge/Repository-Codeberg-blue?style=flat&logo=codeberg"></img></a>
<a href="https://crates.io/crates/iamroot"><img src="https://img.shields.io/crates/v/iamroot?style=flat&logo=rust&color=orange"></img></a>
<a href="https://www.gnu.org/licenses/gpl-3.0.html"><img src="https://img.shields.io/badge/License-GPL--3.0--only-brightgreen?style=flat&logo=gnu"></img></a>
</div>
</div>
---
## Rationale
One of the most convenient features of `sudo` and `doas` is the ability to have authenticated sudo/doas sessions persist for a short period of time before you have to enter your password again.
But there are some commands/scriptlets that may require you to already have an authenticated session open, otherwise, it may fail or behave irratically. Take this one-liner for example:
```
$ watch sudo btrfs filesystem usage /
```
This will present you with detailed information about the root BTRFS filesystem every few seconds, but for more information, you have to run the `btrfs` command as root. The problem arises when you do not have an authenticated session open already, and the password prompt appears, but due to the `btrfs` program being wrapped inside of the `watch` command, you're basically unable to enter in your password in time before `watch` runs the `btrfs` command again.
Cue I Am Root: Prepend the `iamroot` command in front of the `watch` command to open an authenticated session before the `watch` command and any programs wrapped inside is run.
```
$ sudo iamroot && watch sudo btrfs filesystem usage /
```
This will now ensure that an authenticated session is opened, but if not, don't continue to the `watch` command.
This is only but one of many different use-cases for I Am Root.
> [!WARNING]
>
> I Am Root is currently in beta. (That means bugs are to be expected!)
---
<div align=center>
<p>Copyright © 2025 Rachael Ava</p>
</div>