Skip to main content

Pampa

PyPI - Version PyPI - Python Version

Pampa is an experimental, interactive AI coding assistant for learning and experimentation. It uses the OpenAI Responses API and can inspect a project and run shell commands on the user's behalf. Every shell command is shown for approval before it is executed.

Status: Pampa is in beta and is not intended for production use. Review generated commands and changes before allowing them to run.

See the project roadmap for planned work.

Requirements

  • Python 3.12 or newer
  • An OpenAI API key with access to the model configured in pampa/core.py
  • uv (recommended for development)

Installation

Clone the repository and install its locked dependencies:

git clone <repository-url>
cd pampa
uv sync --locked

Alternatively, install the package and its runtime dependency with pip:

python -m pip install .

Set the API key in the environment. Do not commit it to the repository:

export OPENAI_API_KEY="your-api-key"

Usage

Pampa exposes its interactive assistant through the pampa command:

uv run pampa

When running directly from a checkout, the module form remains available:

uv run python -m pampa.core

The assistant reads a message from standard input. Because input is read as a multi-line block, finish a message with Ctrl-D on Linux/macOS (or the terminal's equivalent EOF shortcut on Windows). For example:

$ uv run python -m pampa.core
Welcome to Pampa Coding assistant

>>>:
Inspect the files in this project and summarize the architecture.
# Press Ctrl-D here
Thinking...

The built-in command /clear removes the conversation context. Press Ctrl-C to exit. When Pampa requests a shell command, enter Y to approve it; any other response declines execution.

Built-in tool

The assistant currently has one tool, bash_run, which executes a Bash command and returns its exit code, standard output, and standard error. The tool supports these arguments:

  • command — command to execute (required)
  • timeout — maximum execution time in seconds (default: 10)
  • cwd — optional working directory
  • max_output_bytes — optional output limit
  • capture_stderr — whether to return standard error (default: true)

The tool uses a restricted environment and rejects several obviously dangerous command patterns, including sudo, su , shutdown, reboot, and dd if=. This is only a basic safeguard; it is not a security boundary. Run Pampa in a disposable or otherwise appropriately isolated environment when working with untrusted prompts or generated commands.

Development

Install the development dependencies with:

uv sync --locked

Useful project commands:

make test   # run pytest
make lint   # run Ruff
make help   # list Make targets

The package requires Python >=3.12, has openai as its runtime dependency, and uses pytest and ruff for development. The lockfile is uv.lock; update it whenever dependencies are changed:

uv add <package>
uv add --dev <package>
uv lock

Project layout

pampa/
├── core.py          # interactive assistant loop and OpenAI integration
└── tools/bash.py    # Bash tool schema and command runner
tests/               # test suite
docs/                # Sphinx documentation

License

Pampa is distributed under the terms of the MIT license.

Release files for pampa 0.1.1

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

Source distribution (sdist)

Source distribution for pampa 0.1.1
File Size Uploaded
pampa-0.1.1.tar.gz 45.1 kB Details

Built distribution (wheel)

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

Total release size: 54.6 kB

Release files / pampa-0.1.1.tar.gz

Download URL pampa-0.1.1.tar.gz
Size 45.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fe64cc3f4994fdc3bd8cfdc23d885e97084e29802255acc5c03ad7a02ba3f98c
BLAKE2b-256 checksum
How to use checksums
ce398a0944699075d3fcfb31177ebd2d2b18b0f5a25fcabd23d3a2bd4a1ef1f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pampa-0.1.1-py3-none-any.whl

Download URL pampa-0.1.1-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42bf345250914b08efbc2621c28d4384177369664deca7b497b402a3167760ac
BLAKE2b-256 checksum
How to use checksums
99ec9dc140f9597b7084e6198398385221c1e323b67823797d572bbeec69349c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.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