Skip to main content

nuro is a lightweight runner for fetching and executing PowerShell scripts from remote repositories.

Project description

nuro

nuro is a minimal, scoop-like command runner focused on distributing and invoking PowerShell scripts from remote repositories. It keeps a lightweight local cache under ~/.nuro, supports bucket pinning, and can transparently execute PowerShell, Python, or shell helpers published alongside your scripts.

Features

  • Bucket-based distribution – Fetch cmds/<name>.ps1 (and optional .py / .sh) from GitHub-style "buckets" or local folders.
  • Commit pinning – Lock a bucket to an exact commit hash via buckets.json so remote changes do not unexpectedly roll out.
  • Command caching – Store downloaded scripts in ~/.nuro/cache/cmds/<ext>/<bucket>/ and reuse them while allowing manual refreshes.
  • Usage caching – Cache one-line help snippets generated by NuroUsage_<name> functions so nuro can display usage without spinning up PowerShell each time.
  • Dependency aware Python support – Automatically install requirements declared inside downloaded Python scripts before running them.
  • Debug-friendly – Emit trace logs to ~/.nuro/logs/nuro-debug.log when --debug or NURO_DEBUG=1 is set.

Installation

pip install nuro

For Windows-first setups there is also a bootstrapper (bootstrap/get.nuro.ps1) that provisions a virtual environment under ~/.nuro/venv, creates a shim at ~/.nuro/bin/nuro.cmd, and wires the folder into your PATH. After bootstrap you still interact with the PyPI package above.

Quick Start

  1. Install the package: pip install nuro
  2. Run nuro with no arguments to see available commands fetched from your configured buckets.
  3. Execute a command: nuro example will download cmds/example.ps1 from the highest-priority bucket (unless overridden by pinning).
  4. Show usage details: nuro example --help
  5. Force a fresh command list and clear caches: nuro --refresh

Configuration

nuro keeps its state inside ~/.nuro (created automatically on first run):

  • config/config.json – Application defaults, notably official_bucket_base which points at the canonical bucket (defaults to https://raw.githubusercontent.com/nor-void/nuro/main).
  • config/buckets.json – Registry of buckets and command pins. Each entry looks like:
    {
      "name": "official",
      "uri": "raw::https://raw.githubusercontent.com/nor-void/nuro/main",
      "priority": 100,
      "trusted": true,
      "sha1-hash": "<optional commit sha>"
    }
    
    Add a pins object mapping command names to bucket names to force per-command resolution.
  • cache/ – Script (cmds/) and usage (usage/) caches. These are cleared when nuro --refresh is invoked.
  • logs/ – Contains nuro-debug.log when debug logging is enabled.

Command Resolution

  1. Optional bucket:command prefix on the CLI takes precedence.
  2. Bucket pins (pins section in buckets.json) resolve specific commands.
  3. Remaining buckets are tried by descending priority.
  4. nuro prefers .ps1, then .py, then .sh. PowerShell scripts are executed through a helper host so NuroCmd_<name> can interact with the current PowerShell session when desired.

Debugging & Diagnostics

  • nuro --debug … (or NURO_DEBUG=1) writes detailed fetch/execute information to stdout and ~/.nuro/logs/nuro-debug.log.
  • nuro --refresh removes both script and usage caches before re-listing commands.
  • Validation commands can be run manually: nuro official:your-cmd fetches straight from the official bucket even if pins exist.

Developing Buckets

Bucket repositories follow a simple structure:

repo/
  cmds/
    hello.ps1
    hello.py
    hello.sh

Each PowerShell script can optionally expose:

  • function NuroCmd_<name> { param([string[]]$Args) … } – the entry point executed by nuro
  • function NuroUsage_<name> { "nuro <name> …" } – a one-line usage string cached by nuro

When you update bucket contents, publish to your Git remote and, if you need deterministic rollouts, update the sha1-hash in buckets.json to the new commit.

Contributing

Clone the repository, create a virtual environment (or run bootstrap/get.nuro.ps1 on Windows), then install in editable mode:

pip install -e .

Run the CLI locally with python -m nuro --debug to inspect fetch and resolution behaviour. Pull requests and issue reports are welcome.

License

nuro is released under the MIT License. See LICENSE for full details.

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

nuro-0.1.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

nuro-0.1.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file nuro-0.1.1.tar.gz.

File metadata

  • Download URL: nuro-0.1.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for nuro-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3a6e6e6e2ed49da1c94eca5536a06bbe7a68abecb787c64a38eb3c15c9f9eee5
MD5 d594b6e0c6d8cedb5bcb49a6b24096bc
BLAKE2b-256 2047cfd656a612151a5efe9a7dd734e1cf3a72123d5ccf05bf8685727a865326

See more details on using hashes here.

File details

Details for the file nuro-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nuro-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for nuro-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58be09cfc4a35ff019e918fb9c4c7c1d43db7c3be9628edecf98303b2119c559
MD5 9ef08ec816232ac21747a0ffb702598e
BLAKE2b-256 1a3f5078f4253b38f03723e565b02c48a3d3d446896420c0eb97fe9aa579e5e4

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