Metadata-Version: 2.4
Name: insighta-cli
Version: 0.1.2
Summary: Insighta Cloud CLI - portfolio upload framework
Project-URL: Homepage, https://insighta.cloud
Project-URL: Repository, https://github.com/insighta-cloud/insighta-cli
Project-URL: Issues, https://github.com/insighta-cloud/insighta-cli/issues
Author-email: "insighta cloud Inc." <tech@insighta.cloud>
License-Expression: CC-BY-NC-4.0
License-File: LICENSE
Keywords: cli,insighta,investment,portfolio,upload
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Requires-Dist: insighta-sdk>=0.1.5
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich-click>=1.7.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# insighta-cli

Insighta Cloud CLI — portfolio upload framework with plugin support.

## Installation

```bash
pip install insighta-cli
```

## Usage

```bash
# Prepare upload files from trade history
insighta --work my-portfolio prepare

# Upload to Insighta Cloud
insighta --work my-portfolio upload --config output/upload.yaml

# Portfolio management
insighta list-portfolios
insighta search-portfolios --search "tech"
insighta delete-portfolio <portfolio_id>
insighta nav-history <portfolio_id>
insighta metrics-history <portfolio_id>

# News & search
insighta news --period 7
insighta search "AAPL"

# Order history
insighta orders --portfolio-id <portfolio_id>

# History & backfill
insighta history <portfolio_id>
insighta backfill <portfolio_id>

# Image parsing
insighta image screenshot.png --prompt "Extract trades from this image"

# Configuration
insighta config --credentials credentials.yaml
```

## Commands

| Command | Description |
|---------|-------------|
| `prepare` | Generate upload.yaml + order.csv from trade history |
| `upload` | Send portfolio data to Insighta API |
| `config` | Save/display default settings |
| `list-portfolios` | List own portfolios |
| `search-portfolios` | Search public portfolios |
| `delete-portfolio` | Delete a portfolio |
| `nav-history` | Get NAV history |
| `metrics-history` | Get metrics history |
| `news` | Fetch recent news |
| `search` | Search entities by keyword |
| `history` | Get combined NAV + metrics history |
| `orders` | List order history |
| `image` | Upload and parse images with AI |
| `backfill` | Trigger history backfill |

All commands support `--output-json` for machine-readable output.

## Plugin System

Brokerage-specific tools register commands via `entry_points`:

```toml
[project.entry-points."insighta_cli.plugins"]
sbi = "insighta_sbi:register"
```

Available plugins:
- [`insighta-sbi-tool`](https://github.com/insighta-cloud/insighta-sbi-tool) — SBI Securities (Japan)

## Development

```bash
pip install -e ".[dev]"
pre-commit install
insighta --help
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

## License

CC-BY-NC-4.0 — See [LICENSE](LICENSE)
