Metadata-Version: 2.4
Name: workspace-runner
Version: 0.1.1
Summary: Fuzzy dev-workspace script dispatcher: run the closest workspace/ script with the right runtime
Author: kuhe
License: Apache-2.0
Keywords: cli,dev-workspace,dispatcher,monorepo
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# workspace-runner

A fuzzy **dev-workspace script dispatcher**. From anywhere inside a known repo,
it walks up to the repo root, detects the repo type by a unique path signature,
fuzzy-matches a script in that repo's `workspace/` directory, and execs it with
the correct runtime (node / esbuild / php with autoloader / repo venv /
`uv run`) so it runs against the **local repo source/build**.

The shipped registry covers a subset of the AWS SDK client repos (aws-sdk-js-v3,
smithy-typescript, aws-sdk-python, smithy-python, boto3, botocore, aws-sdk-php,
smithy-php); edit `REGISTRY` in `cli.py` to add your own.

## Install

```bash
pipx install workspace-runner    # recommended: isolated, just puts the CLI on PATH
# or
pip install workspace-runner
```

This installs a command named **`workspace-runner`**.

### Want to type `r`?

`r` is intentionally not shipped as the command name (it collides with shell
aliases and the R toolchain). Alias it yourself:

```bash
echo 'alias r=workspace-runner' >> ~/.zshrc   # or ~/.bashrc
```

## Usage

```bash
cd ~/work/boto3/some/subdir
workspace-runner demo            # runs the best workspace/ script matching "demo"
workspace-runner list buckets    # each word must appear, in order, in the path
```

## Prerequisites

The dispatcher shells out to language runtimes it does not install:

- **node** and **npx** (for `.js/.mjs/.ts` scripts; `.ts` via `esbuild-runner`)
- **php** with a repo `vendor/autoload.php` (for `.php` scripts)
- **uv** (for the `aws-sdk-python` / `smithy-python` monorepos)
- a repo `.venv` (for `boto3` / `botocore`), else falls back to `python3`

## Publishing

```bash
make tools         # install build + twine
make testpublish   # upload to TestPyPI first
make publish       # upload to PyPI
```
