Metadata-Version: 2.5
Name: nxplora
Version: 0.16.0
Summary: NX in your terminal, on your Nexplora account.
License: Proprietary
Requires-Python: >=3.9
Requires-Dist: certifi
Requires-Dist: textual<2,>=1.0
Description-Content-Type: text/markdown

# nx-cli

**Private source. Proprietary. Published to PyPI as `nxplora` only when ready.**

The NX terminal client: a thin client of a person's Nexplora account. Each message is a real run on the same engine the
chat uses, with the account's approvals and billing. It shows what really came back and nothing else.

## Charter

| nx-cli OWNS | nx-cli NEVER contains |
|---|---|
| Sign-in / enrollment with nx-cloud | Brain logic: routing, prompts, CodeChat harness, council, cognition router, brain core (these stay in private `Nexploraai/NX`) |
| Terminal UI, streaming, rendering | Model IDs, provider URLs or provider keys |
| Actions that must run on the operator's own machine (host, computer, phone) — only under nx-cloud-issued, approval-gated commands | Global Nexplora / NX secrets |
| Its own update channel | Any upload / publish path to a package index other than the gated release job |

Every published build must pass a check that none of the private NX modules are present in the wheel.

## What it does

- **In a Nexplora Code session's terminal** it is already signed in: the app writes a short-lived session ticket (bound to the
  person, the Operation and that session, one hour, usable only for sending a message there) to a private file, and renews it
  while the page holds the terminal. The person's login is never on that computer. The ticket can't approve anything.
- **On any other computer** `nx` shows a short link and a code. Approve it in the browser and it's done. The sign-in stays in
  `~/.nx-cli/credentials.json` (0600). `nx logout` ends it. Work runs on the person's Nexplora cloud computer, not this one.
- **Approvals** are given in the chat. `nx` says what is waiting and where, then follows the run as it goes on.
- **Colours** are the terminal's own, with no painted background, so it matches a light or dark panel.

```bash
python -m pip install .
nx
```

## Checks

```bash
python -m pytest                                  # includes a real local HTTP server (tests/stub_server.py)
python -m build --wheel && python scripts/check_wheel.py dist/*.whl   # the charter's check; a release must pass it
python scripts/pty_proof.py "$(command -v nx)" /tmp/nx-proof          # real pty, reads the screen, fails on any painted background
```

## PyPI

The `nxplora` project name is owned and all historical releases are yanked (2026-09-29). Existing installs
run `nx upgrade` → `pip install -U nxplora`, so the first nx-cli release published under `nxplora` becomes
the migration path for those users. Never delete the PyPI project (name-takeover risk).
