Skip to content

armgit / Aleph

Public Imported from GitHub
0

Give satellite imagery, terrain data, buildings, streetview photos to your LLM

Default port

Belluxx1c27febef1e5
diff --git a/README.md b/README.md
index e52bda2..92bc483 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,11 @@ Requires Python 3.11+. Pillow is the only dependency. No API keys required.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install .
+```
+
+Then test with
+
+```sh
alephgeo --help
```
@@ -36,7 +41,7 @@ If you prefer using Aleph from the CLI or want to let an agent interface with di
alephgeo dashboard --root captures
```
-The dashboard opens in your browser. Your captures will be saved in `captures`.
+The dashboard opens in your browser at `http://127.0.0.1:8100`. Your captures will be saved in `captures`.
## Inside the folder
diff --git a/aleph.py b/aleph.py
index f30ff22..8ac6fc4 100644
--- a/aleph.py
+++ b/aleph.py
@@ -114,8 +114,8 @@ def parser():
area.set_defaults(**capture.DEFAULT_OPTIONS)
dashboard = commands.add_parser("dashboard", help="Open the local capture dashboard")
dashboard.add_argument("--root", type=Path, default=Path("."), help="capture directory (default: current directory)")
- dashboard.add_argument("--port", type=int, metavar="PORT", default=0,
- help="local port (default: choose an available port)")
+ dashboard.add_argument("--port", type=int, metavar="PORT", default=8100,
+ help="local port (default: 8100)")
dashboard.add_argument("--no-browser", action="store_true", help="print the URL without opening a browser")
for name, help_text in (
("resume", "Continue a saved or planned run"),
@@ -249,8 +249,8 @@ def main(argv=None):
return 0
args = command.parse_args(argv)
if args.command == "dashboard":
- if not 0 <= args.port <= 65535:
- command.error("--port must be from 0 to 65535")
+ if not 1 <= args.port <= 65535:
+ command.error("--port must be from 1 to 65535")
from src.dashboard import serve
serve(args.root, args.port, open_browser=not args.no_browser)
diff --git a/src/dashboard.py b/src/dashboard.py
index 790eb9c..c000289 100644
--- a/src/dashboard.py
+++ b/src/dashboard.py
@@ -388,7 +388,7 @@ class Handler(BaseHTTPRequestHandler):
do_POST = dispatch
-def serve(root, port=0, *, open_browser=True):
+def serve(root, port=8100, *, open_browser=True):
root = Path(root).expanduser().resolve()
root.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(prefix="aleph-dashboard-") as cache: