Metadata-Version: 2.4
Name: talis-cli
Version: 0.1.0a3
Summary: Command-line client for the Talis trading platform. Sign in via device flow, manage sessions, view portfolio, place orders.
Author: Talis
License-Expression: Apache-2.0
Project-URL: Homepage, https://talis.trade
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
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
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: respx>=0.21; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"

# talis-cli

Command-line client for the [Talis](https://talis.trade) trading platform.

```bash
pip install talis-cli

talis login                  # device flow — opens a browser, you approve
talis approve ABCD-EFGH      # approve another login from this signed-in CLI
talis whoami                 # shows current session
talis portfolio              # balance + open positions

talis buy BTC-USD 25         # market buy $25 of BTC
talis close BTC-USD          # close 100% of the BTC position

talis outcome list           # browse live HIP-4 outcome (prediction) markets
talis outcome buy 100 yes 11 # buy $11 of the YES side of outcome 100 (#1000)
talis outcome close 100 yes 25  # sell 25 YES shares of outcome 100

talis sessions               # list active sessions (Connected Devices)
talis sessions revoke ab12   # revoke a session by short prefix
talis logout                 # revoke the current session
```

By default the CLI targets AWS production at `https://api-aws.jarvis.trade`.
Set `TALIS_ENV=render` only when intentionally auditing the legacy Render
deployment, or set `TALIS_API_URL` to override the endpoint completely.

## Read-only sessions

For automation, scripts, or letting an LLM browse your account without
authority to trade, request a `read` scope at login:

```bash
talis login --read-only
```

Read-scope sessions are denied (`403`) on every endpoint that mutates orders,
positions, strategies, or wallets — enforced server-side at the API layer.
When approving a login with `talis approve`, the approving session's scope is
also enforced: a read-only session can only approve read-only CLI access.

## Output mode

When stdout is a TTY (interactive shell), commands render with rich formatting.
When stdout is piped or redirected, commands emit one JSON object per line —
suitable for parsing from scripts or LLM agents. Force JSON anywhere with
`--json`.

## Credentials

The CLI stores its session token at `~/.talis/credentials` with `chmod 600`
on POSIX systems. The token is a JWT; treat it like any other credential.

## Relationship to `cli/jarvis_cli.sh`

The bash script at [`cli/jarvis_cli.sh`](../../cli/jarvis_cli.sh) is the legacy
engineer power tool — admin-keyed, POSIX-only, prose output. It still works
and isn't going anywhere short-term.

**talis-cli is the going-forward client.** All new features (device-flow auth,
per-user credentials, JSON output, scope-aware sessions, future commands)
land here. The bash CLI will be archived once talis-cli reaches feature
parity for admin/engineer workflows.

If you're a Talis engineer with the admin API key, you can keep using either.
If you're a public user or driving the API from an LLM / script, use this one.

## Status

Alpha. APIs may shift. File issues at the
[Talis trading engine repo](https://github.com/Jarvis-Trade/jarvis-trading-engine).
