Skip to main content

reaterm — Read-only terminal access from Python

MIT license

PyPI total downloads npm total downloads

Give your Python app eyes into a project—not a writable shell.

ReaTerm brings a focused, read-only command interface to Python. Its native Rust engine implements a short inspection allowlist instead of forwarding arbitrary strings to a shell. Choose a filesystem root, read the information you need, and keep writes out of the native execution path.

Why use ReaTerm?

  • One line to inspect: reaterm.run("ls -al").
  • Everything needed for a quick look: directory listings, file contents, literal text searches, and metadata.
  • AI-ready tool integrations: OpenAI, Anthropic, and a local stdio Model Context Protocol (MCP) server.
  • Security by design: fixed commands, bounded reads, scoped paths, and OS-backed restrictions.

A small API that gets to the point

import reaterm

print(reaterm.run("ls -al"))
print(reaterm.run('cat "README.md"'))

For precise argv and a reusable root:

from reaterm import ReaTerm

terminal = ReaTerm(root=".")
print(terminal.run("grep", "-n", "TODO", "README.md"))

Give AI assistants a read-only tool

from reaterm.tools.openai import reaterm_tool_openai
from reaterm.tools.anthropic import reaterm_tool_anthropic

# OpenAI: tools=[reaterm_tool_openai]
# Anthropic: tools=[reaterm_tool_anthropic]

Your application executes returned tool calls explicitly and sends results back. Tool schemas alone never run commands, and returning file content to a provider can disclose information in the selected root.

Connect an MCP client

reaterm-mcp --root /absolute/path/to/project

Compatible MCP clients can invoke the run_command tool using a read-only command name and exact argv tokens. The server exposes no shell or arbitrary executable access; the root is selected when the server starts, not by the model. The optional MCP SDK is installed separately from the base package.

Explore the tool integrations

Requires Python 3.11+ and a separately installed native Rust CLI. Supported: Linux x86-64/ARM64, macOS Intel/Apple Silicon, and Windows x86-64. Published PyPI availability has not been verified. The native restrictions apply to ReaTerm itself, not a parent shell.

Website · See the security model

Security and installation notes

This is an unaudited prototype, not a production data-loss-prevention boundary. The native executable is installed separately from the Python adapter and must be discoverable on PATH or via REATERM_BIN. See source installation.

ReaTerm denies common secret filenames by default, but does not scan file contents or redact arbitrary credentials. Output remains untrusted model input; it may contain prompt injection. The wrapper defaults to a 15-second native subprocess wall timeout, whereas Unix native execution has a 10-second CPU budget; standalone native I/O can still block. Linux requires Landlock ABI v3 (approximately kernel 6.2+). See the threat model before exposing a directory to an agent.

Metadata

Release files for reaterm 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reaterm 0.0.2
File Size Uploaded Provenance Actions
reaterm-0.0.2.tar.gz 17.4 kB With provenance Details for reaterm-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reaterm 0.0.2
File Interpreter ABI Platform Actions
reaterm-0.0.2-py3-none-any.whl Python 3 none any Details for reaterm-0.0.2-py3-none-any.whl

Total release size: 28.9 kB

Release files / reaterm-0.0.2.tar.gz

Download URL reaterm-0.0.2.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3a0a2fd8bc1d03a3d24bda2e5194da3ec29a35f991d0c3885453926ab875d830
BLAKE2b-256 checksum
How to use checksums
b873272515b1a4096496f8216cec7a630dbc53dcf1e50f3db7172bf94635597a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / reaterm-0.0.2-py3-none-any.whl

Download URL reaterm-0.0.2-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38b6d567690aa9dbc7a8eec8b1acf905da5476d792490f559b992f9240cb07f0
BLAKE2b-256 checksum
How to use checksums
5739b723bcf5cafb49d3c6224a303031dd23af2d6f6ea28b124a95abe8b36c39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for reaterm 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for reaterm-0.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page