datasette-ports
Find all currently running Datasette instances on your machine and list their ports, databases, versions and plugins.
Installation
Install this as a plugin in the same environment as Datasette.
datasette install datasette-ports
Or run it directly using uvx:
uvx datasette-ports
Or install it as a standalone tool:
uv tool install datasette-ports
datasette-ports
Usage
If installed as a Datasette plugin:
datasette ports
Or as a standalone command:
datasette-ports
This uses lsof to find all Python processes listening on TCP ports, then probes each one to check if it is a Datasette instance. For each instance found it displays the URL, Datasette version, attached databases and installed plugins.
Example output:
http://127.0.0.1:8007/ - v1.0a26
Directory: /Users/simon/dev/blog
Databases:
simonwillisonblog: /Users/simon/dev/blog/simonwillisonblog.db
Plugins:
datasette-llm
datasette-secrets
http://127.0.0.1:8001/ - v1.0a26
Directory: /Users/simon/dev/creatures
Databases:
creatures: /tmp/creatures.db
Plugins:
datasette-extract
datasette-llm
datasette-secrets
http://127.0.0.1:8900/ - v0.65.2
Databases:
logs: /Users/simon/Library/Application Support/io.datasette.llm/logs.db
http://0.0.0.0:8014/ - v1.0a26
Directory: /Users/simon/dev/datasette
Databases:
content: /Users/simon/dev/datasette/content.db
trees: /Users/simon/dev/datasette/trees.db
_internal
Plugins:
datasette-llm
datasette-visible-internal-db
Database paths come from each instance's /-/databases.json endpoint. Where the process working directory can be determined (via /proc/<pid>/cwd on Linux or lsof on macOS), relative paths are resolved to absolute ones. On platforms where the working directory cannot be determined the Directory: line is omitted and paths are shown as reported by Datasette.
JSON output
Use --json to get machine-readable output:
datasette ports --json
# or
datasette-ports --json
[
{
"url": "http://127.0.0.1:8007/",
"host": "127.0.0.1",
"port": 8007,
"pid": 42373,
"cwd": "/Users/simon/dev/blog",
"version": "1.0a26",
"databases": [
{"name": "simonwillisonblog", "path": "/Users/simon/dev/blog/simonwillisonblog.db"}
],
"plugins": [
"datasette-llm",
"datasette-secrets"
]
},
{
"url": "http://127.0.0.1:8900/",
"host": "127.0.0.1",
"port": 8900,
"pid": 12345,
"cwd": null,
"version": "0.65.2",
"databases": [
{"name": "logs", "path": "/Users/simon/Library/Application Support/io.datasette.llm/logs.db"}
],
"plugins": []
}
]
Development
To set up this project locally, first checkout the code. You can confirm it is available like this:
cd datasette-ports
uv run datasette-ports --help
# Or:
uv run datasette ports --help
To run the tests:
uv run pytest
Release files for datasette-ports 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datasette_ports-0.3.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datasette_ports-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.0 kB
Release files / datasette_ports-0.3.tar.gz
| Download URL | datasette_ports-0.3.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05a59fa1a8c4fb0ec6f86d0b4845980bff64baaa3f4835bd3adbe75a94c0a05e
|
|
BLAKE2b-256 checksum How to use checksums |
5d47946a11d33cb1afbebfc0e921f6b3bf9d531be486d124beefd8bfd97f3db5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 15, 2026.
Transparency logRelease files / datasette_ports-0.3-py3-none-any.whl
| Download URL | datasette_ports-0.3-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25fd64d8e27b7c921b6b9b4e8ac861cfaf8a914214de73cd4f414fb86ae9cc7e
|
|
BLAKE2b-256 checksum How to use checksums |
8125f4e68639834aac7f8f7e2587e4bac5ed3fc9fa4dde35bc5d42074eaabbb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 15, 2026.
Transparency log