Metadata-Version: 2.4
Name: antonio-cli
Version: 0.1.0
Summary: CLI for managing your Discord server via the guild-scoped API
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28

# antonio-cli

A command-line tool for managing your Discord server remotely — ban, kick, and send messages from your terminal, authenticated with a per-server API key.

## Installation

```bash
pip install antonio-cli
```

## Setup

Before using the CLI, generate an API key for your server by running `a.api create` in Discord. The key will be sent to you via DM — save it, it won't be shown again.

Then configure the CLI:

```bash
antonio configure
```

You'll be asked for:
- Your API key
- Your server (guild) ID
- The base URL for the API (has a default — just press enter if you're not sure)

This is a one-time setup per machine. The first request from a new device requires approval from the key owner (they'll get a DM with instructions) — after that, the device is trusted.

## Usage

**Look up a user's ID by username:**
```bash
antonio lookup --user someuser
```

**Ban a user:**
```bash
antonio ban --user someuser --reason "spamming"
```

**Kick a user:**
```bash
antonio kick --user someuser --reason "rule violation"
```

You can also skip the username lookup if you already have the user's ID:
```bash
antonio ban --user-id 123456789012345678 --reason "spamming"
```

**Send a message to a channel:**
```bash
antonio msg --channel 111222333444555 --text "hello from the CLI"
```

## Notes

- Each API key is scoped to a single server — a key generated for one server cannot be used against another.
- If a command returns a "waiting for approval" message, ask whoever holds the key to approve your device before retrying.
- Config is stored locally at `~/.antonio/config.json` with restricted file permissions.

## Requirements

- Python 3.9+
- A valid API key generated by the bot for the server you want to manage

## License

MIT
