Skip to main content

pycodex-ws

Browser conversations, a live HTML Canvas, read-only file/diff viewers and optional Feishu integration for python-codex. Requires Python 3.7+ and installs the matching core version.

Quick start

python3 -m pip install pycodex-ws

Create workspaces.json:

{
  "workspaces": [
    {"id": "demo", "work_dir": ".", "state_path": "demo", "enable_board": true}
  ]
}
pycodex-ws --listen 127.0.0.1:6007 --workspace-config workspaces.json

Open http://127.0.0.1:6007. Use python3 -m workspace_server if the command is not on PATH. Keep stdin open while the server runs; EOF initiates shutdown. Model configuration comes from ~/.codex/config.toml.

Conversations and views

The session sidebar starts collapsed. Hover to preview it, click to keep it open, and click the toggle or empty space again to close it. Expansion narrows the conversation while keeping the board fixed. On phones, use the header buttons to switch between chat and board.

Use the expanded sidebar to create, rename or close sessions. Status dots show running sessions and unread replies. /cd <directory> changes the current session's working directory while idle; /model, /resume, /compact and other core session commands are also available.

Click Markdown links to open files and comparisons, for example [source](app.py:42) or [changes](diff:HEAD:app.py). In a code or diff view, select text and choose Insert into chat to add editable context to the draft. Click a context block to edit or remove it before sending. See view links and supported formats.

When using a router, its directory groups workspaces by device and lists unread workspaces at the top. Device handles reorder the list; pencil buttons edit device names.

The VS Code extension uses this backend and is distributed separately as a VSIX.

Customize the interface

Click the gear button to start a customization conversation with the Agent. Custom files live in the server user's ~/.pycodex/frontend/:

  • custom.css and custom.js: optional styles and an ES module, loaded automatically.
  • workspace.html: optional full-page override; otherwise the packaged page is used.
  • Other files: available at workspace-relative frontend/<path> URLs.

Refresh to apply changes and keep the selected conversation. Open the workspace with ?builtin=1 to bypass all customizations; click “Re-enable customizations” to return. Changes apply to all workspaces for that OS user. See the customization contract.

Storage

Paths in workspaces.json resolve from the configuration directory. state_path is a unique filename prefix: the example saves sessions in demo.pycodex-ws.json, file views in demo.pycodex-views.json, and Canvas in demo.html. Suffixes are appended to the complete prefix, including any dots.

Set enable_board to false to disable Canvas while retaining conversations and file views. Session directories and history survive server restarts; changing a session's directory does not move Canvas or workspace state files. Configuration and restoration details are in the runtime guide.

Feishu

Install the optional SDK in the workspace's Python environment, then authorize:

python3 -m pip install lark-oapi
python3 -m pycodex_ws.feishu_oauth

Authorization reads app credentials from ~/.codex/.env and stores the refresh token in ~/.codex/.feishu_refresh_token. In a workspace session, use /link <feishu-email|open_id|chat_id> to connect a card and /unlink to disconnect. Other workspace features work without the SDK.

Development

From the repository root:

uv sync --dev
uv run pycodex-ws --help
uv run --dev pytest packages/pycodex-ws/tests
uv build packages/pycodex-ws

Python integrations use pycodex_ws.build_runtime(agent) to include workspace commands. See runtime contracts and test documentation.

Metadata

Release files for pycodex-ws 0.5.0

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

Source distribution (sdist)

Source distribution for pycodex-ws 0.5.0
File Size Uploaded
pycodex_ws-0.5.0.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycodex-ws 0.5.0
File Interpreter ABI Platform
pycodex_ws-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.7 MB

Release files / pycodex_ws-0.5.0.tar.gz

Download URL pycodex_ws-0.5.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
495f7662c5a1556927a2a69cae7ee762caf46f56dee4ce315a9b598403b01756
BLAKE2b-256 checksum
How to use checksums
fb455972889f3c55acb035f44b68551aab8beee0b6b4ddc0748dff105be3b996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / pycodex_ws-0.5.0-py3-none-any.whl

Download URL pycodex_ws-0.5.0-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a7365b47fe562a5e473e9a59f61389544111622998ff01fb10dcf420d5065510
BLAKE2b-256 checksum
How to use checksums
4e194ae269a0180688e1e8c82ff0fd8d57c8d594f7c21249732aca36b4889365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.7

2 release files

0.2.6

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