mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-06 03:05:25 +00:00
20 lines
346 B
Python
20 lines
346 B
Python
import typer
|
|
import httpx
|
|
from memos.server import run_server
|
|
|
|
app = typer.Typer()
|
|
|
|
@app.command()
|
|
def serve():
|
|
run_server()
|
|
|
|
@app.command()
|
|
def ls():
|
|
response = httpx.get("http://localhost:8080/libraries")
|
|
libraries = response.json()
|
|
for library in libraries:
|
|
print(library['name'])
|
|
|
|
if __name__ == "__main__":
|
|
app()
|