Metadata-Version: 2.4
Name: diodos
Version: 0.3.0
Summary: Auto detect and login to the captive portal of given networks.
Keywords: captive-portal,network,cli,automation,wifi
Author: RushiVivek
Author-email: RushiVivek <rushivivek123@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet
Classifier: Topic :: Utilities
Requires-Dist: psutil>=7.2.2
Requires-Dist: requests>=2.34.2
Requires-Dist: tomlkit>=0.15.1
Requires-Dist: typer>=0.27.1
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/RushiVivek/Diodos
Project-URL: Repository, https://github.com/RushiVivek/Diodos
Project-URL: Issues, https://github.com/RushiVivek/Diodos/issues
Description-Content-Type: text/markdown

# diodos

`diodos` is a CLI daemon that monitors your network and automatically attempts login when a captive portal is detected.

## Features

- Checks connectivity on a configurable interval.
- Detects likely captive-portal redirects.
- Submits configured credentials automatically.
- Works with `python -m diodos` and the installed `diodos` command.

## Installation

### With uv (recommended)

Install as a global CLI tool:

```bash
uv tool install diodos
```

Run without installing globally:

```bash
uvx diodos run
```

### With pip (alternative)

```bash
pip install diodos
```

## Upgrade

For an existing uv installation:

```bash
uv tool install -U diodos
```

For an existing pip installation:

```bash
python -m pip install --upgrade diodos
```

To run the latest published version without installing it permanently:

```bash
uvx --refresh diodos run
```

### From source

```bash
git clone <your-repo-url>
cd Diodos
uv sync
```

## Usage

The installed `diodos` command is the recommended way to use the CLI. The available commands are:

Launch the daemon in the background:

```bash
diodos run
```

Run the daemon process in the foreground:

```bash
diodos daemon
```

Check for a captive portal and attempt a one-time login:

```bash
diodos login
```

Log out from the captive portal:

```bash
diodos logout
```

Open the configuration file:

```bash
diodos config
```

Stop a running background daemon:

```bash
diodos stop
```

You can also run any command with `uvx` without installing the package globally. For example:

```bash
uvx diodos logout
```

Or run the CLI as a Python module:

```bash
python -m diodos run
```

On first run, `diodos` creates a default config file and opens it for editing.

## Configuration

Default config path:

- Linux: `~/.config/diodos/config.toml` (or `$XDG_CONFIG_HOME/diodos/config.toml`)
- macOS: `~/Library/Application Support/diodos/config.toml`
- Windows: `%APPDATA%/diodos/config.toml`

Example:

```toml
[network]
SSID = "Example SSID"

[network_check]
url = "https://example.com"
msg = "Success"
interval = 60

[login]
url = "https://portal.example.com/login"

[login.credentials]
username = "your-username"
password = "your-password"

[logout]
url = "https://portal.example.com/logout"
```

## Development

Build distributables:

```bash
uv build
```

Validate package metadata:

```bash
uvx twine check dist/*
```
