Metadata-Version: 2.4
Name: bridgenode-cli
Version: 0.1.2
Summary: BridgeNode CLI — AI inference with x402 payment on Solana USDC. No API keys.
Author-email: BridgeNode <eli.BNx@proton.me>
License-Expression: MIT-0
Project-URL: Homepage, https://bridgenode.cc
Project-URL: Repository, https://github.com/applefanaimail-blip/bridgenode-llm
Project-URL: Documentation, https://bridgenode.cc/llms.txt
Keywords: x402,solana,usdc,ai,llm,cli,agents,payment,bridgenode,openai-compatible,chat,inference,micropayments
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bridgenode-llm>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest>=9.1.1; extra == "dev"
Dynamic: license-file

# bridgenode-cli

[![PyPI version](https://img.shields.io/pypi/v/bridgenode-cli.svg)](https://pypi.org/project/bridgenode-cli/)
[![Downloads](https://img.shields.io/pypi/dm/bridgenode-cli.svg)](https://pypi.org/project/bridgenode-cli/)
[![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](https://opensource.org/license/mit-0/)
[![Python versions](https://img.shields.io/pypi/pyversions/bridgenode-cli.svg)](https://pypi.org/project/bridgenode-cli/)

BridgeNode CLI — AI inference without API keys. Pay per request with **Solana USDC via x402**. The payment handshake is fully automatic, and fees are sponsored — no SOL needed.

## Installation

```bash
pip install bridgenode-cli
```

Or install the full toolkit (SDK + CLI):

```bash
pip install bridgenode
```

## Usage

```bash
# Single chat completion (payment handshake fully automatic)
bridgenode chat "Hello!" --model deepseek-v4-flash

# Smart routing: auto / eco / premium
bridgenode chat "Analyze this code" --mode auto

# Model list + prices (no payment)
bridgenode models
```

## Options

| Option | Description |
|---|---|
| `--model` | Explicit model id (see `bridgenode models`) |
| `--mode` | `auto` / `eco` / `premium` (smart routing) |
| `--max-tokens` | Max output tokens (billed upfront) |
| `--base-url` | Base URL (default: `BRIDGENODE_BASE_URL` / https://bridgenode.cc/v1) |
| `--max-per-call` / `--daily-cap` | Spending policy (fail-closed) |

## Configuration (.env)

```bash
# Required — your Solana wallet private key (base58)
BRIDGENODE_WALLET_KEY=...
# Optional: BRIDGENODE_BASE_URL, BRIDGENODE_MAX_PER_CALL, BRIDGENODE_DAILY_CAP
```

## Security

- **Receipt verification:** every response receipt is verified — invalid receipt → error.
- **Spending policy (fail-closed):** max USD per call / per day — checked BEFORE signing.

## Requirements

- Python ≥ 3.11
- A Solana wallet with a USDC token account (ATA)

## Links

- Website: https://bridgenode.cc
- Models & prices: https://bridgenode.cc/v1/models
- Documentation: https://bridgenode.cc/llms.txt
- Protocol: x402 V2 (https://docs.x402.org)
