Skip to main content

starfold (Python)

A client for agents and scripts driving a starfold desktop: screenshots, waiting for the screen, mouse and keyboard, recordings and files. It is the client alone: no server binary and no starfold command. To run a server on this machine, or start one from Python, install starfold-server, which brings this package with it.

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 and StarfoldConnectionError, 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.

From 0.3.2

Up to 0.3.2 this package also carried the server: the starfold command, start_server(), LocalServer, binary_path(), check_libraries() and their errors. From 0.4.0 they are in starfold-server:

0.3.2 0.4.0
pip install starfold (for the command or server) pip install starfold-server
from starfold import start_server, and likewise LocalServer, binary_path, check_libraries, BinaryNotFoundError, MissingLibrariesError, ServerStartError the same names from starfold_server
pip install "starfold[pillow]" with the server pip install starfold-server "starfold[pillow]"
uvx starfold / pipx run starfold uvx --from starfold-server starfold / pipx run --spec starfold-server starfold
Starfold, AsyncStarfold, act, StarfoldError and the client's other errors unchanged

from starfold import start_server (or any other moved name) raises an ImportError that says so. Staying on starfold==0.3.2 changes nothing: it still carries the server.

Tests

uv run pytest

Metadata

Release files for starfold 0.4.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 starfold 0.4.0
File Size Uploaded Provenance Actions
starfold-0.4.0.tar.gz 8.7 kB With provenance Details for starfold-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for starfold 0.4.0
File Interpreter ABI Platform Actions
starfold-0.4.0-py3-none-any.whl Python 3 none any Details for starfold-0.4.0-py3-none-any.whl

Total release size: 19.6 kB

Release files / starfold-0.4.0.tar.gz

Download URL starfold-0.4.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bd3c39d5618ac6911adf4961f913a542198d813166f1f4b449cfecb2f82ed1a6
BLAKE2b-256 checksum
How to use checksums
392ccf321e0113f40164bf4d2daf2a968ea9b83afc988cfbbdea17870013ec5a
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 25, 2026.

Transparency log

Release files / starfold-0.4.0-py3-none-any.whl

Download URL starfold-0.4.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
671652074c079e592398ffd43e81a66a658dd537967e1c8ff5c9f38d432285c2
BLAKE2b-256 checksum
How to use checksums
580654ca08e0e346d30399b4f6c70ac56d1f82e7cb89a582af11400b8ecfd19e
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 25, 2026.

Transparency log

Security for starfold 0.4.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for starfold-0.4.0.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 25, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files Full provenance

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