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 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.0 is available on PyPI. It was published through the protected Trusted Publishing workflow after TestPyPI and clean-install validation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellpa-0.3.1.tar.gz (116.2 kB view details)

Uploaded Source

Built Distribution

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

shellpa-0.3.1-py3-none-any.whl (69.1 kB view details)

Uploaded Python 3

File details

Details for the file shellpa-0.3.1.tar.gz.

File metadata

  • Download URL: shellpa-0.3.1.tar.gz
  • Upload date:
  • Size: 116.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for shellpa-0.3.1.tar.gz
Algorithm Hash digest
SHA256 45a964a62ee90ec794c74d72ae7c90ba36dcae9dc17b73b492cc1264446d9e93
MD5 e72c1c43ea22aae3ee0099f3a147cd09
BLAKE2b-256 448ff6d347ad60744382682569bf5f5e2df5bb0ecd9a22d75159b867c9c657e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for shellpa-0.3.1.tar.gz:

Publisher: release.yml on AMR-M-ALSHAMEERI/ShellPa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shellpa-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: shellpa-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 69.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for shellpa-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74b0cb4f56e04a4cbb91c1aeb7ada3ba1444640ef616f32d68ac9cfa53ccd362
MD5 840f7b5beaac262b8dbf3f40623e14f5
BLAKE2b-256 bafa32fa851e4a47e0397ae8834b6ded88f1bb821890985bdd9c4bda338bede5

See more details on using hashes here.

Provenance

The following attestation bundles were made for shellpa-0.3.1-py3-none-any.whl:

Publisher: release.yml on AMR-M-ALSHAMEERI/ShellPa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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