Skip to main content

Ershu

中文

This is Ershu's installation and deployment repository. Python users can install Core by itself, add API, MCP, or Worker, or install the complete backend. The repository also contains single-host infrastructure, systemd units, and a local reverse-proxy example.

The initial composition uses tag v1.0.0-20260812, which maps to Python package version 1.0.0.post20260812. Components may publish independent versions later. versions.env records the component, frontend, and LSP image versions selected by a particular Ershu composition.

Installation choices

Ershu requires Python 3.14 or newer.

Command Installs
pip install ershu Core and the ershu-db migration command
pip install "ershu[api]" Core and the HTTP API
pip install "ershu[mcp]" Core and the MCP server
pip install "ershu[worker]" Core and the background Worker
pip install "ershu[all]" Core, API, MCP, and Worker

On a server, keep the environment at a fixed path and install an exact version:

uv venv --python 3.14 /opt/ershu/releases/v1.0.0-20260812/.venv
uv pip install \
  --python /opt/ershu/releases/v1.0.0-20260812/.venv/bin/python \
  "ershu[all]==1.0.0.post20260812"

Regular pip supports the same extras. The deployment installer uses uv pip install so systemd can always call commands from a known path.

The deployment does not use uv tool install "ershu[all]". The ershu package describes a composition and provides no command of its own. Commands such as ershu-db, ershu-api, ershu-worker, and ershu-mcp come from its dependencies, whose executables UV does not expose by default for a tool installation.

Repository responsibilities

This repository owns installation choices, composition versions, and shared deployment files. Component code remains in its own repository:

Repository Responsibility
ershu-core Shared data model, permissions, query services, and database migrations
ershu-api HTTP API, browser authentication, and repository polling
ershu-mcp MCP transport and tools
ershu-worker Queue processing, analysis, LSP Dockerfiles, and LSP images
frontend Browser frontend
ershu-docs Public documentation

LSP images follow Worker releases. This repository pins only published images in its version manifest and configuration examples.

Deployment bundle contents

File Purpose
versions.env Records the component, frontend, LSP, and infrastructure versions in the composition
runtime.env Passes the composition version and LSP images to the systemd services
compose.infrastructure.yml Starts PostgreSQL, Redis, Milvus, etcd, and MinIO
.env.example Shared configuration example for API, Worker, MCP, and Core
.env.compose.example Infrastructure image, storage, and account example
deploy/systemd/ Services for API, Worker, MCP, optional Poller, and database migration
deploy/nginx/ershu-local.conf Loopback-only frontend and reverse-proxy example
scripts/generate_config_values.py Generates passwords and application secrets for the first deployment

Install on a Linux server

Download a deployment archive from GitHub Releases and extract it to:

/opt/ershu/releases/<tag>

Enter the extracted directory and run:

sudo bash deploy/systemd/install.sh --uv-bin "$(command -v uv)"

The installer:

  • creates a dedicated ershu system account;
  • installs the composition's exact ershu[all] version from PyPI;
  • prepares /etc/ershu, /var/lib/ershu, and /var/cache/ershu;
  • installs the systemd units and points /opt/ershu/current to this release;
  • updates the composition version while preserving existing secrets and deployment settings.

Edit these files after installation:

/etc/ershu/.env
/etc/ershu/compose.env

Replace the password and secret placeholders, then start Ershu:

sudo systemctl enable --now ershu.target
sudo systemctl status ershu-api ershu-worker ershu-mcp

The first start brings up the infrastructure and applies database migrations before the application services. Scheduled polling remains off until enabled:

sudo systemctl enable --now ershu-poller.service

Follow service logs with:

journalctl -u ershu-api -u ershu-worker -u ershu-mcp -f

The quick deployment guide covers download verification, configuration, frontend installation, and acceptance checks.

Worker and LSP

LSP is disabled by default. When REPOSITORY_LSP_ENABLED=true, Worker invokes Docker to run short-lived language-server containers. The ershu account must then be able to reach Docker, and Docker must be able to mount the repository directory.

Docker access is highly privileged. Review repository paths, image versions, resource limits, and dependency sources before enabling it. Environments that need a stronger boundary should not add Worker directly to the host Docker group.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for ershu 1.0.0.post20260812

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

Source distribution (sdist)

Source distribution for ershu 1.0.0.post20260812
File Size Uploaded
ershu-1.0.0.post20260812.tar.gz 9.4 kB Details

Built distribution (wheel)

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

Total release size: 17.0 kB

Release files / ershu-1.0.0.post20260812.tar.gz

Download URL ershu-1.0.0.post20260812.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5972951f8af287d7aece13e096de40d6f05c2bdcbcd21f8a76b196a8e5f1b504
BLAKE2b-256 checksum
How to use checksums
01fc0402a79b43d7fa99eed70369a4e8adebb8770c954a19c93fcc39670be9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ershu-1.0.0.post20260812-py3-none-any.whl

Download URL ershu-1.0.0.post20260812-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e969c3d118cfb0fda8b283b99c843d9c4c82474e5b80612529f9e8a299928fc3
BLAKE2b-256 checksum
How to use checksums
5965612ddef5ed55cb3b16f89f40c632cdd8eed60bd356c8ac5d630ec6f9a6f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.0.0.post20260812 This release

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