Skip to main content

Bamboo SSH

This project currently provides a reusable PTY-backed shell session core and an optional FastAPI web terminal adapter. It is designed for local or otherwise trusted environments.

It is not an SSH transport layer yet. The current implementation launches a real shell on the host where the service runs.

Requires Python 3.12 or newer.

Full Documentation

See the documentation set in docs/:

Install Profiles

The package supports three install modes:

  • pip install bamboo-ssh for the reusable core package
  • pip install "bamboo-ssh[web]" for the FastAPI web terminal adapter
  • pip install "bamboo-ssh[full]" for the web adapter plus built-in config-file auth helpers

From this checkout, install the matching local package profile with:

python -m pip install .
python -m pip install ".[web]"
python -m pip install ".[full]"

Use requirements.txt for contributor setup. It installs the editable project with the full and dev extras.

Make Targets

For local contributor and release helpers:

  • make install creates .venv and installs requirements.txt
  • make clean removes local build and test artifacts
  • make build creates a source distribution and wheel in dist/
  • make deploy builds and uploads dist/* to PyPI with twine

For make deploy, authenticate with PyPI first, typically with a token in TWINE_PASSWORD.

Quick Start

python3 -m venv .venv
. .venv/bin/activate
python -m pip install ".[full]"
bamboo-ssh auth init
bamboo-ssh serve --host 127.0.0.1 --port 8765

Open http://127.0.0.1:8765/.

If the default config file exists, bamboo-ssh serve loads it automatically. Use --config /path/to/config.toml to point at a different file.

Embedded Usage

Other Python projects can import the package without using the built-in web auth flow.

The complete guide is in Using the Core in Other Python Projects.

Use the core session API directly:

from bamboo_ssh.core.session import TerminalSession

session = TerminalSession.start(cols=80, rows=24)
session.write("printf 'hello\\n'\n")
session.close()

Or mount the web adapter inside another backend:

from bamboo_ssh.adapters.fastapi_app import create_app

terminal_app = create_app()
protected_terminal_app = create_app(config_path="/etc/bamboo-ssh/config.toml")

Built-In Auth

The standalone auth mode is intentionally simple:

  • one admin username
  • password hash stored in a TOML config file
  • signed session cookie for the browser
  • no database

Manage it with:

bamboo-ssh auth init
bamboo-ssh auth set-password
bamboo-ssh auth show-config-path

After login, the terminal page loads normally. POST /logout clears the session cookie and returns the browser to the login page.

Shell Startup Tuning

Web terminal shell sessions export WEB_TERMINAL=1.

If your shell startup files do expensive optional work such as loading large completion bundles, language managers, or interactive prompts, you can use that variable to skip them for browser terminal sessions while keeping a full login shell for normal terminal use.

Docker Quick Start

cp docker/.env.example docker/.env
docker compose -f docker/compose.yml --env-file docker/.env up --build

This runs the terminal inside a Python 3.12 container. The browser terminal connects to the shell inside the container, not the host machine shell.

Metadata

Release files for bamboo-ssh 0.2.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 bamboo-ssh 0.2.1
File Size Uploaded Provenance
bamboo_ssh-0.2.1.tar.gz 100.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bamboo-ssh 0.2.1
File Interpreter ABI Platform
bamboo_ssh-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 192.2 kB

Release files / bamboo_ssh-0.2.1.tar.gz

Download URL bamboo_ssh-0.2.1.tar.gz
Size 100.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c28dcefddbe53721c4d5f43c0e6a5b6ba4b257beb7592f24cd2f06664c49bc1e
BLAKE2b-256 checksum
How to use checksums
b2bc3adc11ff1161b74731172de379bee5a070408d5f3804929dd1e9431c7f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / bamboo_ssh-0.2.1-py3-none-any.whl

Download URL bamboo_ssh-0.2.1-py3-none-any.whl
Size 92.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1633ee0633567cde8075f6d33a9e95c61830df4db59fe2f8aa0d379646de5d3
BLAKE2b-256 checksum
How to use checksums
169e365fedb83489fea3d17f451c7d59207d9e50976b0e4b9a36621d5eff19d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Security for bamboo-ssh 0.2.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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