Metadata-Version: 2.4
Name: asher-cli
Version: 0.0.2
Summary: Terminal dashboard for Litter Robot (LR3/LR4/LR5) via the Whisker cloud API
License: MIT License
        
        Copyright (c) 2026 Karz
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: litter-robot,smart-home,terminal,tui,whisker
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT 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: Topic :: Home Automation
Requires-Python: >=3.10
Requires-Dist: keyring>=24.0.0
Requires-Dist: pylitterbot>=3.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: textual>=0.47.0
Description-Content-Type: text/markdown

# Asher CLI

A Claude Code-style terminal dashboard for monitoring and controlling Litter Robot via the Whisker cloud API.

<img width="808" height="351" alt="image" src="https://github.com/user-attachments/assets/6599966f-837c-419c-8692-bfda3533e730" />

## Features

- Live status bar — unit name, online/offline, drawer fill level, last activity, cat weight
- Human-readable robot status — translates raw API states into plain English (`Ready`, `Cleaning`, `Cat Detected`, `Drawer Full`, etc.)
- Scrollable activity log with timestamps
- Commands: `clean`, `status`, `lock`, `unlock`, `sleep`, `wake`, `night-light`, `history`, `help`, `quit`
- Slash commands for app management: `/login`, `/logout`, `/exit`
- Cat animation panel that reacts to robot state
- Command history (↑/↓ arrows)
- Auto-refreshes every 30 seconds

## Install

```bash
pipx install asher-cli
asher
```

`pipx` installs the CLI into an isolated environment and puts `asher` on your PATH automatically. Install `pipx` with `pip install pipx` if you don't have it.

Or with plain pip (ensure Python's `Scripts` folder is on your PATH):

```bash
pip install asher-cli
asher
```

Or run from source:

```bash
git clone https://github.com/karanshukla/asher-cli
cd asher-cli
pip install -e .
asher
```

### Dev setup

```bash
uv sync --dev
git config core.hooksPath .githooks   # run lint + tests before every push
```

```bash
uv run poe check   # ruff + mypy + pytest (same as CI)
uv run poe fix     # auto-fix ruff issues
uv run poe test    # tests only
uv run poe types   # mypy only
```

## Credentials

On first run, type `/login` at the command prompt. Your credentials are saved to the OS keyring (Windows Credential Manager / macOS Keychain / Linux Secret Service) and reused automatically on subsequent runs.

To sign out: `/logout`

`.env` fallback (for CI or existing users):

```env
LITTER_ROBOT_USER=your@email.com
LITTER_ROBOT_PASSWORD=yourpassword
```

## Commands

### Robot commands

| Command | Description |
|---|---|
| `clean` | Start a clean cycle |
| `status` | Refresh and show what matters — online state, drawer level, last activity |
| `info` | Full dump of all robot properties (serial, firmware, all settings) |
| `lock` / `unlock` | Toggle panel lockout |
| `sleep` / `wake` | Toggle sleep mode |
| `night-light on\|off` | Toggle night light |
| `history` | Show last 25 activity events |
| `clear` | Clear the log |
| `help` | Show command list |
| `quit` | Exit |

### Slash commands

| Command | Description |
|---|---|
| `/login` | Sign in or switch accounts |
| `/logout` | Sign out and clear saved credentials |
| `/exit` | Exit Asher CLI |

**Keyboard shortcuts:** `Ctrl+L` clears the log, `Ctrl+C` quits.

## Releasing

```bash
# bump version, commit, and tag in one step
uv run bump-my-version bump patch    # 0.0.1 → 0.0.2
uv run bump-my-version bump minor    # 0.0.2 → 0.1.0
uv run bump-my-version bump major    # 0.1.0 → 1.0.0

# then push the release branch to trigger PyPI publish
git checkout -b release/0.0.2
git push origin release/0.0.2
```

## Troubleshooting

**`asher` not found after `pip install asher-cli`**

Python's `Scripts` folder isn't on your PATH. Use `pipx` instead — it handles this automatically:

```bash
pip install pipx
pipx install asher-cli
asher
```

If you're in a virtualenv, deactivate it first:

```bash
deactivate
pip install pipx
pipx install asher-cli
```

**`pipx: command not found`**

Run it as a module instead:

```bash
python -m pip install pipx
python -m pipx install asher-cli
```

## Testing

```bash
uv run pytest
```

CI runs on Python 3.10 / 3.11 / 3.12 across Ubuntu, Windows, and macOS on every push.

## Notes

- Uses the unofficial [pylitterbot](https://github.com/natekspencer/pylitterbot) library — supports LR3, LR4, LR5, and other Whisker robots
- The Whisker API is reverse-engineered and may change without notice
- Auth errors and network failures are shown in the UI with friendly messages
