Skip to main content

ShellPa command-line logo

ShellPa

A safety-conscious, cross-platform terminal assistant. Describe the outcome; review the native command; stay in control.

CI PyPI version Python 3.10+ Windows, Linux, and macOS MIT License

ShellPa translates natural-language intent into a command for the active operating system and shell. Before anything runs, ShellPa applies a deterministic local safety policy and presents the proposal for review.

User intent
    -> structured command proposal
    -> deterministic safety assessment
    -> permission decision
    -> observable execution
    -> redacted recovery when needed

Why ShellPa

  • Cross-platform commands — supports PowerShell, CMD, Bash, and Zsh.
  • Deterministic safety — the model proposes; ShellPa decides whether a command may execute.
  • Interactive terminal UX — themes, motion settings, history, completion, activity states, and keyboard navigation.
  • Workspace awareness — detects bounded project, Git, tool, and Python environment metadata without reading source contents.
  • Provider choice — supports OpenRouter, OpenAI API, Gemini, Anthropic, and eligible ChatGPT subscriptions through the optional Codex provider.
  • Private by design — diagnostics and recovery exclude credentials, environment values, command output, and arbitrary Git filenames.

Installation

ShellPa requires Python 3.10 or newer. For a standalone command-line application, pipx is recommended because it creates an isolated environment while making shellpa available from any terminal.

pipx install shellpa

For ChatGPT subscription access through the embedded Codex provider:

pipx install "shellpa[codex]"

The configuration wizard can also install the optional Codex provider after explicit approval. A separate Codex CLI installation is not required.

If pipx is not installed, or for platform-specific update and removal instructions, see the installation guide.

Quick start

Configure a provider:

shellpa config

Run a natural-language request:

shellpa "show the five largest files in this directory"

Preview without execution:

shellpa "show the five largest files in this directory" --dry-run

Open the interactive session:

shellpa

Inside the session, use /help to see all interactive controls.

Providers

Provider Authentication API billing
OpenRouter API key Provider account
OpenAI OpenAI Platform API key OpenAI API account
Google Gemini API key Provider account
Anthropic API key Provider account
OpenAI Codex Eligible ChatGPT account ChatGPT plan limits

The Codex path delegates sign-in and session storage to the official embedded Codex runtime. ShellPa does not read or store Codex credentials. Existing sessions are preserved by default, and logout requires explicit confirmation.

For API-backed providers, ShellPa stores newly configured keys in Windows Credential Locker, macOS Keychain, Linux Secret Service, or KWallet through the active operating-system credential backend. Existing plaintext user configuration is migrated only after the secure copy is verified. When secure storage is unavailable, ShellPa can use a key for the current process without silently saving another plaintext copy.

shellpa login
shellpa login --device-code
shellpa logout

Safety model

ShellPa assesses every proposed command locally:

Level Typical behavior
Read-only May run automatically only in Trusted mode
Normal Requires approval unless safely permitted by explicit --force
High risk Requires typed confirmation
Critical Manual-only; ShellPa will not execute it
Unknown Requires review and cannot be silently trusted

Approved commands inherit operational environment variables needed by the shell, but ShellPa withholds provider keys, its own configuration variables, and other secret-shaped values from child processes.

Permission modes:

  • Ask — review commands before execution.
  • Plan — display proposals without execution.
  • Trusted — automatically runs only commands proven read-only.

--force does not bypass critical-policy boundaries.

Workspace transparency

ShellPa detects only bounded workspace facts:

  • workspace boundary and allowlisted project markers;
  • project types and known executable availability;
  • Git branch, detached/unborn state, and change counts;
  • active Python environment type.

It does not read source contents, .env contents, credential files, or arbitrary Git filenames to create the provider-safe summary.

shellpa context

The context view clearly separates local-only paths from the smaller summary that may influence a provider request.

Useful commands

Command Purpose
shellpa Open the interactive terminal
shellpa "<request>" Generate, review, and process a command
shellpa config Configure the provider and model
shellpa context Inspect workspace facts and provider-safe context
shellpa doctor Diagnose the local installation without exposing secrets
shellpa about Open the ShellPa identity and project hub
shellpa update Check the stable PyPI release and show the appropriate upgrade command
shellpa version Show the installed version

See the complete command reference and v0.3 migration guide.

Development

Clone the repository and create a project environment:

git clone https://github.com/AMR-M-ALSHAMEERI/ShellPa.git
cd ShellPa
python -m venv venv

Activate it:

# Windows PowerShell
.\venv\Scripts\Activate.ps1

# macOS / Linux
source venv/bin/activate

Install the development and Codex extras:

python -m pip install -e ".[dev,codex]"

Run the quality suite:

python -m pytest
python -m ruff format --check .
python -m ruff check .
python -m mypy
python -m build
python scripts/verify_package_contents.py dist

See CONTRIBUTING.md before proposing a change. Report suspected vulnerabilities through the security policy, not through a public issue.

License

ShellPa is available under the MIT License.

Release status

Version 0.3.1 is available on PyPI. It was published through the protected Trusted Publishing workflow after TestPyPI and clean-install validation.

Metadata

Release files for shellpa 0.4.0

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

Source distribution (sdist)

Source distribution for shellpa 0.4.0
File Size Uploaded
shellpa-0.4.0.tar.gz 136.2 kB Details

Built distribution (wheel)

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

Total release size: 220.9 kB

Release files / shellpa-0.4.0.tar.gz

Download URL shellpa-0.4.0.tar.gz
Size 136.2 kB
Tags Source
SHA-256 checksum
How to use checksums
854b3d6147d68e0836e923809f4750c1f9626ed13872754f1895dbc104e19c01
BLAKE2b-256 checksum
How to use checksums
d866bbb0ac7d604c55893389079d5d3b833b803b366b5b0bfcf7b6ab44d9f938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 9, 2026.

Transparency log

Release files / shellpa-0.4.0-py3-none-any.whl

Download URL shellpa-0.4.0-py3-none-any.whl
Size 84.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
901c6362ac227bd2c008ca8a927e0d72e344a5eeb10e66671e3c797977d0691b
BLAKE2b-256 checksum
How to use checksums
3c42ecf434ae0e5350585a89fbcec825e06248d360b43cea090fd84db09da645
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

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