Metadata-Version: 2.5
Name: mindvest-atlas
Version: 0.68.3
Summary: Atlas CLI — OAuth login, tool calls, and live alert/flow streaming for the Atlas trading API
Project-URL: Homepage, https://github.com/finmanagerai/atlas-cli
Project-URL: Repository, https://github.com/finmanagerai/atlas-cli
Project-URL: Issues, https://github.com/finmanagerai/atlas-cli/issues
Author: FinManagerAI
License: MIT
License-File: LICENSE
Keywords: atlas,cli,mcp,mindvest,oauth,options,trading
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Provides-Extra: watch
Requires-Dist: mss>=9; extra == 'watch'
Requires-Dist: pillow>=10; extra == 'watch'
Description-Content-Type: text/markdown

# Atlas CLI (Python)

The Python implementation of the Atlas CLI. Zero third-party dependencies — pure
standard library, Python ≥ 3.8.

## Install

```sh
pipx install mindvest-atlas      # recommended (isolated)
# or
pip install --user mindvest-atlas
atlas login
```

Or run from a clone without installing:

```sh
cd python
python -m atlas_cli --help
```

## Usage

See the [top-level README](../README.md) for the full command reference. Quick
tour:

```sh
atlas login
atlas tools
atlas stock-quote --symbol SPY
atlas options-chain --symbol SPY --expiration 2026-06-20
atlas historical-contract --symbol NVDA --expiry 2026-07-13 --strike 205 --side call --from 2026-07-06 --to 2026-07-10
atlas alerts --symbol SPY --name greek_exposure --save-charts ./charts
atlas flow stream --symbol NVDA
```

## Layout

```
atlas_cli/
  cli.py              # arg parsing + command dispatch + entry point (`run`)
  config.py           # constants, endpoints, paths
  pkce.py oauth.py loopback.py store.py   # auth: PKCE, OAuth, callback server, 0600 store
  client.py catalog.py stream.py _http.py # API client (+ auto-refresh), catalog, SSE
  ui.py args.py help.py format.py stream_loop.py
  commands/           # login, logout, whoami, tools, call, alerts, flow
tests/                # unittest suites (offline)
```

## Test

```sh
python -m unittest discover -s tests
```

Runs PKCE/arg/SSE/storage unit tests plus integration tests that drive the real
OAuth client and loopback server against in-process mock servers — no network
required.

### Plays (signals) — `atlas signals <command>`

```
atlas signals groups                              # groups you post to, and the ones you follow
atlas signals plays --board community --days 1    # the plays themselves
atlas signals performance --group <id> [--mine]   # closed trades + win rate, like a workflow's
atlas signals delete --group <id>                 # refuses while people are subscribed, and says how many
atlas signals delete --group <id> --stop-subscribers   # stops their billing, tells them, then deletes
atlas signals take --id <play> --contracts 1      # place a play in YOUR account
atlas signals post --symbol SPY --call --strike 765 --expiry 2026-09-14 \
  --entry 765 --target 765.5 --stop 764 --group <id>      # post a play
atlas signals post --symbol SPY --call --strike 765 --expiry 2026-09-14 --entry 765 \
  --link oco --with-put --with-strike 760 --with-entry 759   # a LINKED pair: one cancels the other
atlas signals <show|discover|follow|schema>
```

### Alerts — list and clear them out

```
atlas alerts list [--all] [--symbol SPY]          # your alerts WITH their ids ( --all includes the off ones)
atlas alerts delete --id <id> --id <id2>          # switch them off and hide them
atlas alerts delete --id <id> --purge             # delete the rows for good
```

`--purge` refuses any alert a live workflow or task is still bound to and names
what holds it: that binding is only an id, so removing the row would leave the
setup pointing at nothing and quietly never firing.

`atlas alerts` on its own is still the live feed.

### Every tool, as a command

[docs/TOOLS.md](docs/TOOLS.md) lists all of them, generated from the live
registry. Anything the server registers is callable as `atlas <slug> --flag
value` the moment it exists — the catalog is fetched, not shipped
(`atlas tools --refresh` re-reads it).
