starfold (Python)
A client for agents and scripts driving a starfold desktop: screenshots, waiting for the screen, mouse and keyboard, recordings and files.
uv add starfold # or: pip install starfold
From a checkout: uv add --editable path/to/starfold/python/starfold (or pip install -e python/starfold).
from starfold import Starfold, act
# password defaults to $STARFOLD_PASSWORD
with Starfold("http://localhost:6901", password="...") as sf:
shot = sf.screenshot() # shot.png (bytes), shot.seq, shot.size
shot.save("before.png")
sf.click(400, 300)
r = sf.type_text("hello\n")
sf.wait(change=True, since=r.seq) # returns once the typing changed the screen
sf.wait(idle_ms=300) # and once it settled
sf.key("ctrl+shift+t")
sf.scroll(dy=3, x=400, y=300)
sf.drag(100, 100, 400, 100)
sf.actions([act.key("ctrl+l"), act.type_text("example.com"), act.key("Enter")])
clips = sf.record(5) # a list of MP4s: one, or more if the encoder changed mid-recording
sf.files_upload("data.csv", "local/data.csv")
print([e.name for e in sf.files_list().entries])
AsyncStarfold has the same methods for asyncio. Screenshot.image() returns a Pillow
image if Pillow is installed (starfold[pillow]).
Errors: AuthError (wrong or missing password), ReadOnlyError (the server runs with
--read-only), RecordingOffError (it runs without --enable-recording), ForbiddenError,
NotFoundError, StarfoldTimeoutError, StarfoldConnectionError, and for the server on this
machine (below) BinaryNotFoundError, MissingLibrariesError and ServerStartError, all
StarfoldError. wait() reports a timeout in its result
(timed_out) rather than raising.
Keys for key() are a single character or a name (Enter, Tab, Escape, BackSpace, Delete,
Home, End, PageUp, PageDown, Up, Down, Left, Right, F1-F24, ...), joined with + after
modifiers (ctrl, shift, alt, altgr, super). With shift, a letter or a US-layout digit or
punctuation key means the shifted key: ctrl+shift+t, cmd+shift+4.
The server, from the same install
On Linux x86_64 and aarch64, macOS arm64 and Windows x86_64, pip install starfold gets a
wheel with the starfold server binary in it. On other platforms it installs the client alone,
which works against a server running elsewhere.
import starfold
with starfold.start_server() as server: # loopback, a free port, a generated password
sf = server.client() # signed in already
sf.screenshot().save("desktop.png")
start_server() listens on 127.0.0.1 unless you pass addr=; port=, password= (an
empty one counts as none), args= (more server flags, starfold --help), env= (merged onto
this process's environment), cwd=, binary= (default binary_path()) and timeout=
(seconds until it answers, default 30) are optional. If the server exits, doesn't answer in
time or can't have its port, it raises ServerStartError with the server's last output in
output. It returns a LocalServer with url, password, process, stderr_tail (the
server's last lines of output), client(), async_client() and close(); the server stops on
close(), at the end of the with block, at exit, and when your process ends, however it
ends. On Linux and macOS process is a small sh guard whose child is the server. On Linux it
needs a display (DISPLAY, e.g. from Xvfb); it doesn't start one.
starfold.binary_path() is the binary: $STARFOLD_BIN if set, else the wheel's. The
starfold command runs it (starfold --help).
On Linux the server uses the system's libyuv, Opus and PulseAudio libraries and needs glibc 2.39 or newer (Ubuntu 24.04 or newer):
sudo apt install libyuv0 libopus0 libpulse0
Without them, start_server() and starfold say which libraries are missing.
Tests
uv run pytest # unit tests, no server
STARFOLD_BIN=../../target/release/starfold uv run pytest -m integration # Linux, Xvfb + xterm
Metadata
Release files for starfold 0.3.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 |
|---|---|---|---|---|
| starfold-0.3.2.tar.gz | 14.0 kB | With provenance | Details for starfold-0.3.2.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| starfold-0.3.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for starfold-0.3.2-py3-none-win_amd64.whl |
| starfold-0.3.2-py3-none-manylinux_2_39_x86_64.whl | Python 3 | none | Linux glibc 2.39+ x86-64 | Details for starfold-0.3.2-py3-none-manylinux_2_39_x86_64.whl |
| starfold-0.3.2-py3-none-manylinux_2_39_aarch64.whl | Python 3 | none | Linux glibc 2.39+ ARM64 | Details for starfold-0.3.2-py3-none-manylinux_2_39_aarch64.whl |
| starfold-0.3.2-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for starfold-0.3.2-py3-none-macosx_11_0_arm64.whl |
| starfold-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for starfold-0.3.2-py3-none-any.whl |
Total release size: 18.6 MB
Release files / starfold-0.3.2.tar.gz
| Download URL | starfold-0.3.2.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
580ef6dbe50cfa4d99ae57061c8941308ed04d688d57d5be5f488cb4398c4596
|
|
BLAKE2b-256 checksum How to use checksums |
6e314637a67cb8304dea38d9c7dac0ab8becb94fc110efb00d3e06bc110047cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / starfold-0.3.2-py3-none-win_amd64.whl
| Download URL | starfold-0.3.2-py3-none-win_amd64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
39ff5ef7c6db41f2836cd55dafa2418b556fd254f183cefb15206e0a6d3c38ff
|
|
BLAKE2b-256 checksum How to use checksums |
c6594f1e641c58493afe21a31151f7dd3e724130cb0902dc40bed8c5ba6f1b0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / starfold-0.3.2-py3-none-manylinux_2_39_x86_64.whl
| Download URL | starfold-0.3.2-py3-none-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 4.7 MB |
| Tags | Linux glibc 2.39+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
9fb8a41bf1d298aea2e6ff5bcc227a4d519cf02a8c95ec7e07bdf4c253e8fd52
|
|
BLAKE2b-256 checksum How to use checksums |
a422af0210e9f5644d26be25f671e589706baffb17601d326639504313433011
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / starfold-0.3.2-py3-none-manylinux_2_39_aarch64.whl
| Download URL | starfold-0.3.2-py3-none-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Linux glibc 2.39+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
d83ae2f9ddb61d22a7a6a172b37da0fd473710788d82e91380680aa587c45fa0
|
|
BLAKE2b-256 checksum How to use checksums |
2ebfe4e859c19b1b43c3708f7029bfb31c18381417445c895d6727e1103d9770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / starfold-0.3.2-py3-none-macosx_11_0_arm64.whl
| Download URL | starfold-0.3.2-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0aa25554b36a49f88bdac3ed2f743067d259c854b495cb69cb56ca0db2bc074b
|
|
BLAKE2b-256 checksum How to use checksums |
5d57d6db69cd875e147821268f4f9c43a2ed2d6956859b4e672978129db415ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / starfold-0.3.2-py3-none-any.whl
| Download URL | starfold-0.3.2-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5258a93b47f1801f4515444f1f989cf602e365fdf65f50e48d52f711a3fca832
|
|
BLAKE2b-256 checksum How to use checksums |
5d32770f9c6f2a3da3c1016e24f76523bcf1b2732ad8a160bc751a43acb4f7ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logSecurity for starfold 0.3.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.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for starfold-0.3.2.tar.gz
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 Nov 24, 2026.
Transparency logA 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.