Metadata-Version: 2.4
Name: openkite
Version: 0.1.0
Summary: OpenKite trading assistant packaged as a modular Python application.
Author: OpenKite Contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/your-org/openkite
Project-URL: Issues, https://github.com/your-org/openkite/issues
Keywords: openai-agents,mcp,kite,gradio,trading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai-agents>=0.0.7
Requires-Dist: gradio>=5.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: click>=8.1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.2.0; extra == "dev"
Dynamic: license-file

# openkite

openkite is a modular Python package for the OpenKite trading assistant.
It converts the notebook-based app into a reusable installable application with a CLI and Gradio UI.

## Features

- Reusable package structure for agent, MCP runtime, UI, and persistence
- Configuration from `.env` (API keys, model, server URL, host, port)
- Chat history persisted in SQLite
- CLI entrypoint (`openkite`)
- CI and PyPI publish workflows for GitHub Actions

## Installation

```bash
pip install openkite
```

For local development:

```bash
pip install -e .[dev]
```

## Configuration

Create a `.env` file in your working directory (or pass `--env-file`):

```dotenv
OPENAI_API_KEY=sk-...
FIRECRAWL_API_KEY=fc-...
OPENKITE_MODEL=gpt-5.4
OPENKITE_KITE_SSE_URL=https://mcp.kite.trade/sse
OPENKITE_DB_PATH=~/.openkite/chat_history.db
OPENKITE_HOST=127.0.0.1
OPENKITE_PORT=7860
OPENKITE_SHARE=false
```

## Usage

Launch the chat app:

```bash
openkite chat
```

Show config validation summary:

```bash
openkite check
```

Pass custom runtime options:

```bash
openkite chat --env-file .env --host 0.0.0.0 --port 7860
```

## Release Automation

This repository includes two workflows:

- `.github/workflows/ci.yml`
- `.github/workflows/publish.yml`

`publish.yml` runs on every push to `master`, builds distributions, and publishes to PyPI using OIDC trusted publishing.
Version is set to `0.1.N` where `N` is `github.run_number`.

## One-time PyPI Setup

1. Create the `openkite` project on PyPI.
2. Configure a Trusted Publisher in PyPI pointing to this GitHub repository and the `master` branch workflow.
3. Create a GitHub environment named `pypi`.
4. Push to `master` to trigger automated publish.

## Notes

- Node.js (`npx`) is required to run the Firecrawl MCP server.
- Keep `.env` out of source control.
- `openkite/_version.py` is generated at build time by `setuptools_scm`.
