This file provides guidance to Claude Code when working with the Appose meta-repository.
This is the Appose meta-repository - it contains the overarching project documentation, protocol specification, and links to language-specific implementations. This repository does not contain code - it is purely documentation.
What is Appose?
Appose is a library for interprocess cooperation with shared memory. It enables easy execution of code in different programming languages without copying large data structures (especially tensors for deep learning).
Key principles:
- Simplicity - Minimal dependencies, straightforward API
- Efficiency - Zero-copy tensor sharing via shared memory
Architecture:
- Each language has its own implementation (separate repositories)
- All implementations follow the same worker protocol (JSON over stdin/stdout)
- Workers can be written in any language that implements the protocol
appose/ # Meta-repository (THIS REPO)
βββ README.md # Main project README with protocol spec
βββ CLAUDE.md # This file
βββ DOCUMENTATION.md # Guide to the Sphinx documentation
βββ pyproject.toml # Dependency groups for docs building
βββ .readthedocs.yaml # ReadTheDocs configuration
βββ docs/ # Comprehensive Sphinx documentation
β βββ conf.py # Sphinx configuration
β βββ Makefile # Build commands (uses uv)
β βββ make.bat # Windows build commands
β βββ requirements.txt # Docs dependencies (legacy, use pyproject.toml)
β βββ README.md # How to build the docs
β βββ index.rst # Documentation landing page
β βββ getting-started.rst # Installation and first steps
β βββ core-concepts.rst # Architecture and key concepts
β βββ examples.rst # Comprehensive examples
β βββ worker-protocol.rst # Protocol specification
β βββ faq.rst # FAQ
β βββ alternatives.rst # Comparison with alternatives
β βββ _static/ # Static assets
β βββ _templates/ # Custom templates
βββ openmoji-svg-color/ # SVG icons (not part of docs)
The actual implementations are in separate repositories:
- appose-java: Java implementation at
../appose-java/- See
../appose-java/CLAUDE.mdfor Java-specific guidance
- See
- appose-python: Python implementation at
../appose-python/- See
../appose-python/README.mdfor Python-specific docs
- See
Builder β Environment β Service β Task
- Builder: Creates environments with dependencies (Pixi, Mamba, UV, System)
- Environment: Configured environment with executables
- Service: Access to a worker process
- Task: Asynchronous operation (like a Future/Promise)
- Worker: Separate process that executes scripts
Communication is via JSON over stdin/stdout:
Request Types:
EXECUTE- Run a scriptCANCEL- Cancel a running task
Response Types:
LAUNCH- Task startedUPDATE- Progress updateCOMPLETION- Task finished successfullyCANCELATION- Task canceledFAILURE- Task failedCRASH- Worker crashed
See README.md or docs/worker-protocol.rst for full specification.
- Sphinx - Documentation generator
- sphinx_rtd_theme - Read the Docs theme
- sphinx_tabs - Language-specific examples in tabs (Java/Python)
- sphinx_copybutton - Copy buttons for code blocks
- myst_parser - Markdown support alongside RST
- uv - Dependency management (following pyimagej pattern)
# Build HTML documentation
cd docs
make html
# Other formats
make latexpdf # PDF (requires LaTeX)
make epub # EPUB
make linkcheck # Check for broken links
# Clean build
make cleanThe Makefile uses uv run --group docs sphinx-build, which automatically:
- Creates a virtual environment in
.venv/ - Installs dependencies from
pyproject.toml[dependency-groups]section - Runs sphinx-build
Dependencies are managed in pyproject.toml using PEP 735 dependency groups:
[dependency-groups]
docs = [
"myst-parser>=2.0.0",
"sphinx>=7.0.0",
"sphinx-copybutton>=0.5.0",
"sphinx-rtd-theme>=2.0.0",
"sphinx-tabs>=3.4.0",
]This follows the same pattern as ~/code/imagej/pyimagej/pyproject.toml.
- index.rst - Landing page with quick examples
- getting-started.rst - Installation, prerequisites, first program
- core-concepts.rst - Deep dive into architecture
- examples.rst - From basic to advanced use cases
- worker-protocol.rst - Complete protocol specification
- faq.rst - Frequently asked questions
- alternatives.rst - Comparison with Arrow, NATS, gRPC, etc.
Throughout the docs, examples are shown side-by-side using sphinx_tabs:
.. tabs::
.. tab:: Java
.. code-block:: java
Environment env = Appose.system();
Service python = env.python();
.. tab:: Python
.. code-block:: python
env = appose.system()
python = env.python()This makes it easy for users to compare implementations across languages.
- Create or edit .rst files in
docs/ - Use sphinx_tabs for language-specific examples
- Test locally:
cd docs && make html - Check for warnings - build should have zero warnings
- Add to toctree in
index.rstif new page
The worker protocol is documented in two places:
README.md- Main specification (canonical)docs/worker-protocol.rst- Detailed Sphinx version
Keep them in sync when updating.
Add examples to docs/examples.rst:
- Use tabs for Java/Python side-by-side
- Include both simple and advanced examples
- Group by topic (basic, progress, environments, real-world)
- Keep examples concise but complete
Code blocks:
- Always specify language:
.. code-block:: java - Use tabs for multi-language examples
- Keep indentation consistent (3 spaces for nested content in RST)
Avoid triple-quoted strings in Python examples within RST:
- They cause indentation parsing errors
- Use string concatenation instead:
script = ( "line 1\n" "line 2\n" )
- No code implementation - see appose-java and appose-python for code
- No tests to run - documentation builds are the "tests"
- No releases - implementations are released independently
- Shared issue tracker: https://github.com/apposed/appose/issues
Configuration in .readthedocs.yaml:
- Uses Python 3.11
- Builds Sphinx docs from
docs/conf.py - Installs dependencies from
docs/requirements.txt - Generates PDF and EPUB in addition to HTML
appose/ # THIS REPO - Documentation
βββ README.md # Protocol spec + overview
βββ docs/ # Full documentation site
appose-java/ # Java implementation
βββ src/main/java/ # Java code
βββ README.md # Java-specific README
βββ CLAUDE.md # Java-specific guidance
appose-python/ # Python implementation
βββ src/appose/ # Python code
βββ README.md # Python-specific README
Changes to the protocol require coordinating across all implementations.
- This repo doesn't have releases
- Documentation version is set in
docs/conf.py:release = '0.3.0' - Should match the latest stable release of implementations
- Update when implementations release new versions
RST is whitespace-sensitive. Common issues:
- Triple-quoted Python strings in code blocks
- Inconsistent indentation in nested directives
- Missing blank lines before/after directives
Either:
- Add to a
.. toctree::directive (usually inindex.rst) - Add to
exclude_patternsinconf.py(for files like README.md)
Check html_theme_options in conf.py against current sphinx_rtd_theme version. Deprecated options should be removed.
Install uv:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"- Main site: https://apposed.org (when launched)
- Issue tracker: https://github.com/apposed/appose/issues
- Java implementation: https://github.com/apposed/appose-java
- Python implementation: https://github.com/apposed/appose-python
- Sphinx docs: https://www.sphinx-doc.org/
- Read the Docs: https://docs.readthedocs.io/
- uv: https://docs.astral.sh/uv/
| What | Where |
|---|---|
| Protocol specification | README.md |
| Documentation source | docs/*.rst |
| Sphinx config | docs/conf.py |
| Build commands | docs/Makefile |
| Dependencies | pyproject.toml |
| ReadTheDocs config | .readthedocs.yaml |
| Java implementation docs | ../appose-java/CLAUDE.md |
# Build docs
cd docs && make html
# Clean build
cd docs && make clean html
# Check links
cd docs && make linkcheck
# View built docs
open docs/_build/html/index.html
# Check for uncommitted changes
git statusAppose prioritizes simplicity over features:
- β Simple JSON protocol, not Protocol Buffers
- β Pipes (stdin/stdout), not network sockets
- β One self-contained library per language
- β Minimal dependencies
- β No plugin architecture (keeps codebase small)
- β No cross-machine communication (keeps it simple)
- β No alternative transport layers (keeps it focused)
See README.md FAQ section for rationale on these decisions.