Metadata-Version: 2.4
Name: ninecli
Version: 0.1.0
Summary: Unofficial CLI for the Ninebot (九号) scooter Passport + business APIs
Author: ninecli contributors
License: MIT
Keywords: ninebot,scooter,ebike,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Go
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# ninecli

Unofficial CLI for the Ninebot (九号) scooter app — read vehicle info,
view ride history, and run vehicle controls (engine start/stop, seat
trunk, find-me bell) from the terminal.

Reverse-engineered from the official Ninebot Android app's encrypted
business APIs. **Not affiliated with Ninebot / Segway.**

## Install

```bash
# one-off, no install
uvx ninecli

# or install into current env
pip install ninecli
```

Multi-platform wheels are published for Linux (amd64, arm64) and
macOS (amd64, arm64); `pip` / `uv` picks the right one automatically.

## Quick start

```bash
ninecli login          # password login, saves tokens.json
ninecli whoami         # verify the saved token
ninecli vehicles       # list owned + shared vehicles
ninecli status         # show one vehicle's status (asks which one)
ninecli travel         # ride history for the current month
```

Vehicle controls (`bell`, `engine-start`, `engine-stop`, `buck`) print
a `y/N` safety prompt — pass `-y` to skip.

## `--help`

```
$ ninecli --help
ninecli — Ninebot scooter Passport + vehicle info + control

Usage:
  ninecli [command]

Available Commands:
  bell         Ring the find-my-vehicle bell
  buck         ⚠️  Open the seat trunk
  completion   Generate the autocompletion script for the specified shell
  engine-start ⚠️  Power on / unlock the vehicle
  engine-stop  ⚠️  Power off / lock the vehicle
  help         Help about any command
  login        Password login (Passport) — saves tokens.json
  login-code   SMS-code login (Passport) — sends code, then consumes it
  status       Show vehicle status (location, battery, lock, acc, perms)
  travel       Ride history (default: list current month); --detail <id> shows one ride
  vehicles     List owned + shared vehicles
  whoami       Verify the saved token (calls POST /v5/user)

Flags:
      --config string          config directory (default: $NINEBOT_CONFIG_DIR or ~/.config/ninebot)
  -h, --help                   help for ninecli
      --json                   emit raw decrypted JSON instead of human-readable output
  -y, --yes                    bypass the y/N safety prompt on control commands (engine-start/engine-stop/buck)

Use "ninecli [command] --help" for more information about a command.
```
