Skip to main content

Unified server-side Python utility for the PocketShell Android client.

Project description

pocketshell-cli

Unified server-side Python utility for the PocketShell Android client. Replaces the separately-installed quse and tmuxctl utilities the app currently probes for on every remote host.

This first release ships the skeleton plus the pocketshell usage subcommand only. Follow-up rounds will add jobs, agent-log, sessions, repos, and an optional daemon mode. See issue #170 for the design spike and phased roll-out plan.

Install

The recommended path is uv tool install, which lands the binary on PATH under ~/.local/bin/:

uv tool install pocketshell-cli

For local development from a clone:

cd tools/pocketshell-cli
uv venv
uv pip install -e .
pocketshell --help

pipx install pocketshell-cli works the same way for users who prefer pipx. Both install paths produce a pocketshell binary that the PocketShell app's bootstrap probe detects.

Usage

pocketshell usage           # human-readable lines, one per provider
pocketshell usage --json    # machine-readable JSON (consumed by the app)
pocketshell usage codex     # filter to a single provider

The output shape is byte-identical to quse [provider] [--json] so any consumer that already parses quse output keeps working when the app routes through pocketshell usage instead. Under the hood the first release delegates to the quse CLI via subprocess; later rounds will fold the provider-detection logic in directly and drop the subprocess hop.

If quse is not installed, pocketshell usage exits with code 127 and prints an install hint to stderr.

Development

cd tools/pocketshell-cli
uv venv
uv pip install -e ".[dev]"
uv run pytest

Or via the dependency-group:

uv sync --group dev
uv run pytest

The tests stub quse.usage.collect_usage so they run in seconds without hitting any provider API.

Why a unified CLI?

The PocketShell app previously probed for two binaries (quse, tmuxctl) on every host. That meant two installs to keep up to date, two probes to surface failures from, and two PATH-discovery edge cases (see issue #41). A single pocketshell binary collapses those into one install, one probe, one bootstrap row. The app keeps detecting quse and tmuxctl as a parallel path while pocketshell ramps up to feature parity; once parity is reached, the legacy probes are removed in a hard-cut follow-up (no compat shim — see decision D22 in docs/decisions.md).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pocketshell-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pocketshell-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pocketshell-0.1.0.tar.gz.

File metadata

  • Download URL: pocketshell-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pocketshell-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8f7caf991e6100655c59f1b6fccc545f8619e068b9f5c74c0e68d700bcd39362
MD5 bd950179afb809c2ed0526e3cb34eecf
BLAKE2b-256 206e0e4a77f608d54d916a92c17bfb457e7179b0782b4f3d96a5165b11233ec5

See more details on using hashes here.

File details

Details for the file pocketshell-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pocketshell-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pocketshell-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 397ff3c05fbf00a041b34041cdc119897dd39ca38eae02a875a79dbf4b854cb9
MD5 2b623bb57a31bfbf9631b95caf2e766f
BLAKE2b-256 60379a5000d873685f61fe6590e816c5afe86793e4d1a688c339707ae09f7461

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page