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.

Download files

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

Source Distribution

ershu-1.0.0.post20260812.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

ershu-1.0.0.post20260812-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ershu-1.0.0.post20260812.tar.gz.

File metadata

  • Download URL: ershu-1.0.0.post20260812.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for ershu-1.0.0.post20260812.tar.gz
Algorithm Hash digest
SHA256 5972951f8af287d7aece13e096de40d6f05c2bdcbcd21f8a76b196a8e5f1b504
MD5 467dbb968e6a9d0b5a26344e3f5a3421
BLAKE2b-256 01fc0402a79b43d7fa99eed70369a4e8adebb8770c954a19c93fcc39670be9c2

See more details on using hashes here.

File details

Details for the file ershu-1.0.0.post20260812-py3-none-any.whl.

File metadata

  • Download URL: ershu-1.0.0.post20260812-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for ershu-1.0.0.post20260812-py3-none-any.whl
Algorithm Hash digest
SHA256 e969c3d118cfb0fda8b283b99c843d9c4c82474e5b80612529f9e8a299928fc3
MD5 62b71040f4d9d779f728cdf33203204f
BLAKE2b-256 5965612ddef5ed55cb3b16f89f40c632cdd8eed60bd356c8ac5d630ec6f9a6f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page