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.0.tar.gz (99.9 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.0-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bamboo_ssh-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6f4074c76428054fddd7f1914a06e2d239e3c0119ea80f0cc1feaa058fbaa2c5
MD5 39f435131c8d56500b6415095b98d119
BLAKE2b-256 8e15b14286d2b3b31a5bdca4215a109edc3652f1f9163e05aaee38baaee9bbd9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bamboo_ssh-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67180af398797a4bb37fdb7f9405935aefac1eb885ec46a6478c049b3da6478b
MD5 9e61fdc71d0082b45da449acc012efed
BLAKE2b-256 fad75c6c121cf1f9cc417e138d8465332c8c04b2d993d65fb0050269bada9055

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

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