lineout-cli
Render diagram JSON files exported from Lineout to SVG, PNG or JPG. Arrows are routed with the same engine as the editor, so the output matches the app.
Install
The package is lineout-cli; the command and the Python module are lineout.
uv tool install "lineout-cli[jpg]" # global `lineout` command
uvx --from lineout-cli lineout architecture.json -o architecture.png # one-off run
pip install "lineout-cli[jpg]" # as a library
The jpg extra adds JPG output. Don't install lineout: that name on PyPI is
an unrelated package.
Command line
lineout architecture.json # writes architecture.svg
lineout architecture.json -o architecture.png # format from the suffix
lineout architecture.json -o out.jpg --theme dark
cat architecture.json | lineout - -f png -o - > architecture.png
| Option | Description |
|---|---|
-o, --output |
Output file, or - for stdout. Defaults to the input name with the format suffix. |
-f, --format |
svg, png or jpg. Defaults to the output suffix, else svg. |
-t, --theme |
light (default) or dark. |
--transparent |
No background. SVG and PNG only. |
-s, --scale |
Pixel ratio for PNG and JPG. Defaults to 2. |
Python
from lineout import render
png = render(open("architecture.json").read(), "png", theme="dark")
svg = render({"nodes": [...], "arrows": [...]})
render accepts a JSON string, bytes or a dict and returns bytes. Invalid
documents raise lineout.LineoutError with the path of the offending field.
Updates
Each Lineout release publishes a new lineout-cli. Once a day the lineout
command checks PyPI for a newer version and, when there is one, prints a line
on stderr with the command to upgrade:
uv tool upgrade lineout-cli
The check waits at most two seconds, stays quiet when PyPI can't be reached and
is off when LINEOUT_NO_UPDATE_CHECK or CI is set. Its result is cached in
~/.cache/lineout (~/Library/Caches/lineout on macOS,
%LOCALAPPDATA%\lineout on Windows).
Development
The package bundles the TypeScript renderer from the repository root. Build the assets before building or running the package:
pnpm build:python # from the repository root
uv tool install --editable "./packages/python[jpg]" # once
uvx lineout architecture.json -o architecture.png # uses the installed tool
The editable install reads the Python sources and _assets/ straight from the
repository, so edits and pnpm build:python take effect on the next run.
Avoid uvx --from ./packages/python: uv caches that build and does not pick
up later changes. Remove the tool with uv tool uninstall lineout-cli.
Don't publish by hand. pnpm release in the app repository sets version in
pyproject.toml, and the release workflow builds the assets and publishes the
package to PyPI.
Metadata
Release files for lineout-cli 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lineout_cli-0.5.2.tar.gz | 2.9 MB | Without provenance | Details for lineout_cli-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lineout_cli-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for lineout_cli-0.5.2-py3-none-any.whl |
Total release size: 8.6 MB
Release files / lineout_cli-0.5.2.tar.gz
| Download URL | lineout_cli-0.5.2.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1eadecfcfda398d4d3dc896d53dd89639850eca8cec69155e7c34452bf2e8a5c
|
|
BLAKE2b-256 checksum How to use checksums |
b859c1b3ac4429705aaffbaa03459482df1890f2d37429e68625c6b377d70477
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / lineout_cli-0.5.2-py3-none-any.whl
| Download URL | lineout_cli-0.5.2-py3-none-any.whl |
|---|---|
| Size | 5.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12a9c061fa9f0c837bca29eb5b29acd9e7fd858a6c8b156d964843fd3f59a832
|
|
BLAKE2b-256 checksum How to use checksums |
ba616ca1403418c822d2171dce4f2b1ac6bce40a781c8d52059ee338f86f2aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for lineout-cli 0.5.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.