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

# CLI Commands

> Complete CatOps CLI command reference

## Metrics Commands

### status

Display current system metrics.

```bash theme={null}
catops status
```

Shows:

* CPU usage (total and per-core)
* Memory usage (used/total)
* Disk usage (per mount)
* Network traffic
* Load averages
* Daemon status

### processes

Show top processes by resource usage.

```bash theme={null}
catops processes
```

Options:

| Flag        | Description           |
| ----------- | --------------------- |
| `--cpu`     | Sort by CPU (default) |
| `--mem`     | Sort by memory        |
| `--limit N` | Show top N processes  |

## AI Commands

### ask

Ask AI questions about your server.

```bash theme={null}
catops ask "why is CPU high?"
catops ask "what's using the most memory?"
catops ask "any issues on this server?"
```

<Note>
  Requires Cloud mode. Enable with `catops auth login`.
</Note>

## Configuration Commands

### config

View current configuration.

```bash theme={null}
catops config
```

Shows:

* Collection interval
* Auth status
* Server ID
* Config file path

### set

Update configuration settings.

```bash theme={null}
# Set collection interval (seconds)
catops set interval 30

# Set CPU alert threshold (%)
catops set cpu 80

# Set memory alert threshold (%)
catops set mem 85

# Set disk alert threshold (%)
catops set disk 90
```

Valid intervals: 10-300 seconds.

## Service Commands

### service install

Install CatOps as a system service.

```bash theme={null}
catops service install
```

Creates:

* **Linux**: systemd user service
* **macOS**: launchd agent

### service start

Start the monitoring service.

```bash theme={null}
catops service start
```

### service stop

Stop the monitoring service.

```bash theme={null}
catops service stop
```

### service remove

Uninstall the system service.

```bash theme={null}
catops service remove
```

### service status

Check service status.

```bash theme={null}
catops service status
```

## Authentication Commands

### auth login

Connect to CatOps Cloud.

```bash theme={null}
catops auth login YOUR_TOKEN
```

Get your token from [catops.app/settings](https://catops.app/settings).

### auth logout

Disconnect from Cloud.

```bash theme={null}
catops auth logout
```

### auth info

Show current authentication status.

```bash theme={null}
catops auth info
```

## Daemon Commands

### restart

Restart the monitoring daemon.

```bash theme={null}
catops restart
```

Use after changing configuration.

### start

Start monitoring in foreground (debugging).

```bash theme={null}
catops start
```

Press `Ctrl+C` to stop.

## Update Commands

### update

Update to the latest version.

```bash theme={null}
catops update
```

### version

Show current version.

```bash theme={null}
catops version
# or
catops --version
```

## Cleanup Commands

### uninstall

Remove CatOps completely.

```bash theme={null}
catops uninstall
```

Removes:

* Binary (`~/.local/bin/catops`)
* Config (`~/.catops/`)
* System service
* Log files

### cleanup

Clean up old log files and cache.

```bash theme={null}
catops cleanup
```

## All Flags

Global flags available for all commands:

| Flag              | Description         |
| ----------------- | ------------------- |
| `--help`, `-h`    | Show help           |
| `--version`, `-v` | Show version        |
| `--config`        | Custom config path  |
| `--verbose`       | Enable debug output |
