--- id: spur version: "0.3.23" license: BSD-2-Clause license_treatment: permissive maintenance: abandoned --- # spur — Run commands and manipulate files locally or over SSH using the same interface License: permissive · Maintenance: abandoned · Downloads: 98.4K/mo ## What it is and what it does Spur is a Python library that abstracts local shell execution and remote SSH command execution behind a single, consistent interface. You create either a LocalShell or SshShell object, then call the same methods (run, spawn, open) on either one to execute commands or manipulate files. The run method executes a command synchronously and returns an ExecutionResult with output and return code; spawn returns a process object for asynchronous control. File operations use a context-manager pattern similar to Python's built-in open. The library handles SSH authentication via password or private key, supports custom ports and timeouts, and allows passing socket-like objects for proxy scenarios. It depends on paramiko for SSH transport. The package targets developers who need to write scripts that work identically whether running locally or remotely, avoiding code duplication and conditional branching around shell execution. Use it for: - Write deployment or configuration management scripts that run the same commands on local and remote machines without conditional logic. - Copy files between local and remote systems over SSH using a file-like interface similar to Python's open(). - Spawn long-running processes on remote servers and poll their status or interact with their stdin/stdout asynchronously. - Execute commands in a specific working directory or with custom environment variables on either local or remote shells. - Automate system administration tasks that need to work across heterogeneous environments (local, Linux servers, embedded systems with minimal shells). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a unified Python interface to run shell commands and manipulate files either locally or over SSH, using the same API for both contexts. Yes, if you need a simple unified interface for local and SSH command execution and can accept the maintenance risk. The package is abandoned (last release 2023-03-11, no commits since), so it will not receive security updates or compatibility fixes for future Python or paramiko versions. It remains functional for stable, non-security-critical automation tasks, but consider maintained alternatives for production systems or security-sensitive deployments. ## Install pip install spur uv add spur poetry add spur ## Installing spur Before you install: Low install friction with a pure-Python wheel. However, the package is abandoned as of 2023-03-11 with no recent maintenance, so security updates and compatibility fixes are unlikely to arrive. License in practice: BSD-2-Clause is permissive and poses no significant licensing constraints for most use cases. Quickstart: import spur # Local execution shell = spur.LocalShell() result = shell.run(["echo", "-n", "hello"]) print(result.output) # SSH execution shell = spur.SshShell(hostname="localhost", username="bob", password="password1") with shell: result = shell.run(["echo", "-n", "hello"]) print(result.output) Requires paramiko as a runtime dependency for SSH functionality; SSH authentication requires valid credentials or private key access to the target host. Verify before relying: - Whether the package remains compatible with current versions of paramiko and modern SSH server configurations. - Whether the minimal shell type (spur.ssh.ShellTypes.minimal) works reliably on embedded systems it targets. - Current state of the GitHub repository and whether community forks or maintained alternatives have superseded this package. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 98.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ssh command execution python, run commands over ssh, local and remote shell interface, python subprocess ssh wrapper, file manipulation ssh, remote command execution, unified shell interface, ssh-automation, shell-abstraction, remote-execution [View on SkillFed](https://skillfed.io/packages/spur) · [View on PyPI](https://pypi.org/project/spur/)