# Toolkit Kullanımı

## Örnekler

### Distro

```php
use Liman\Toolkit\OS\Distro;
```

```php
Distro::debian('apt install nano -y')
    ->centos('yum install nano -y')
    ->runSudo();
```

```php
Distro::debian("echo 'debian'")
    ->centos("echo 'centos'")
    ->centos6("echo 'centos6'")
    ->centos7("echo 'centos7'")
    ->pardus19("echo 'pardus19'")
    ->pardus192("echo 'pardus19.2'")
    ->pardus193("echo 'pardus19.3'")
    ->ubuntu("echo 'ubuntu'")
    ->ubuntu1804("echo 'ubuntu18.04'")
    ->ubuntu2004("echo 'ubuntu20.04'")
    ->ubuntu2010("echo 'ubuntu20.10'")
    ->default("echo 'Hiçbiri değil'")
    ->run();
```

### Command

```php
use Liman\Toolkit\Shell\Command;
```

```php
echo Command::run('hostname');
```

```php
Command::runSudo('hostnamectl set-hostname @{:hostname}', [
    'hostname' => request('hostname')
]);
```

```php
use Liman\Toolkit\Shell\SSHEngine;
```

```php
SSHEngine::init(
    request('ipAddress'),
    request('username'),
    request('password')
);
Command::bindEngine(SSHEngine::class);
echo Command::run('hostname');
```

### Formatter

```php
use Liman\Toolkit\Formatter;
```

```php
echo Formatter::run('hostnamectl set-hostname @{:hostname}', [
    'hostname' => request('hostname')
]);

//output: hostnamectl set-hostname pardus
```

### Validation

[Dökümantasyon](https://laravel.com/docs/8.x/validation#available-validation-rules)

```php
validate([
    'hostname' => 'required|string'
]);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.liman.dev/eklenti-gelistirme/ileri-seviye/liman-toolkit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
