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.

Download files

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

Source Distribution

bamboo_ssh-0.2.1.tar.gz (100.0 kB view details)

Uploaded Source

Built Distribution

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

bamboo_ssh-0.2.1-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

Details for the file bamboo_ssh-0.2.1.tar.gz.

File metadata

  • Download URL: bamboo_ssh-0.2.1.tar.gz
  • Upload date:
  • Size: 100.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.3

File hashes

Hashes for bamboo_ssh-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c28dcefddbe53721c4d5f43c0e6a5b6ba4b257beb7592f24cd2f06664c49bc1e
MD5 8c1dfc4ecf1985d5bd16291ac48f0e74
BLAKE2b-256 b2bc3adc11ff1161b74731172de379bee5a070408d5f3804929dd1e9431c7f42

See more details on using hashes here.

File details

Details for the file bamboo_ssh-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bamboo_ssh-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.3

File hashes

Hashes for bamboo_ssh-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1633ee0633567cde8075f6d33a9e95c61830df4db59fe2f8aa0d379646de5d3
MD5 4b063ff4fbbabafbbf0426a24b3111e3
BLAKE2b-256 169e365fedb83489fea3d17f451c7d59207d9e50976b0e4b9a36621d5eff19d8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 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