Skip to main content

Webleank

This repository is online at both:

Webleank implements WebSocket and web application functionality on top of the core functionality of lspleanklib.

For the user guide and background information, visit lean.castedo.com/webleank.

Configuration reference

Webleank stores and reads its configuration from a file named webleank.toml, located in a lean subdirectory within the user configuration directory. For the exact file location, see the Platform directories reference section.

The default webleank.toml configuration file is:

[allowed]
domains = ['127.0.0.1', 'localhost', 'castedo.com']

The first time webleank service runs, it checks whether the lean configuration subdirectory exists. If it does not, it will write this default webleank.toml file.

The allowed.domains setting specifies under which domains web-based Lean editor sidekick applications are allowed to connect to the localhost:1342 WebSocket.

For more information on the TOML format, visit toml.io.

CLI reference

The webleank program provides functionality for web-based Lean editor sidekick applications. For reference information on the low-level program lspleank, see the lspleanklib README.

$ webleank -h
usage: webleank [-h] [--version] {connect,start,service} ...

Link Lean sidekick web apps to LSP-enabled editors

positional arguments:
  {connect,start,service}
    connect             run as stdio LSP server connecting to lspleank socket
    start               start webleank service as detached background process
    service             run as webleank service process

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Subcommand connect

The command webleank connect is used in the same situations where lake serve would be used. It runs an LSP server as a stdio subprocess of an editor. However, instead of running lake serve as a subprocess, webleank connect connects to a lspleank socket to indirectly connect to lake serve running in a separate parallel process.

Running

webleank connect

is functionally equivalent to running

lspleank connect -- webleank start

Subcommand start

The command webleank start is used to ensure a webleank background service is running and acting as a server on the lspleank user socket. The command will exit as soon as it determines a server is available on the lspleank user socket. It will start webleank service as a detached background process if one is not running.

Subcommand service

[!tip] Running webleank service from the command line is very useful for debugging because error information will appear on stdout and/or stderr.

The command webleank service will run Webleank as a service, listening on the lspleank user socket and localhost:1342 as the Webleank control panel and sidekick WebSocket.

Running this command alone will not cause Webleank to run in the background. Running webleank start will cause this process to run in the background as a detached process. By default, webleank service will terminate after a number of idle seconds if nothing connects to one of the sockets it is servicing.

Platform directories reference

Webleank creates a lean subdirectory in:

  • the user configuration directory, and
  • the user runtime directory.

Webleank uses the platformdirs Python package to determine their platform-specific file system locations. On Linux, these correspond to XDG_CONFIG_HOME (default ~/.config) and XDG_RUNTIME_DIR, respectively. On macOS, they correspond to ~/Library/Application Support/ and ~/Library/Caches/TemporaryItems/, respectively. For other operating systems, consult the platformdirs documentation.

Metadata

Release files for webleank 0.3.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 webleank 0.3.1
File Size Uploaded Provenance
webleank-0.3.1.tar.gz 100.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 173.9 kB

Release files / webleank-0.3.1.tar.gz

Download URL webleank-0.3.1.tar.gz
Size 100.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2606c3b2eaf1f7aadb31e9f7628bc9da5a7a3c2c47fe5d75a01e86142351f33a
BLAKE2b-256 checksum
How to use checksums
33119df8df94d96dc058a666feab1882c6063268cc0029379245a18157769ae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / webleank-0.3.1-py3-none-any.whl

Download URL webleank-0.3.1-py3-none-any.whl
Size 73.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cc6be3f3edae0ef95d171eca67c4850afc93ffb50c203d8a75f6d20340b191b
BLAKE2b-256 checksum
How to use checksums
fd45f8285535b7bfbf004eadbe25679d42ef502e442aef5240690b837b50c03c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Security for webleank 0.3.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