reef-cli 0.1.0__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reef_cli-1.0.0/LICENSE +21 -0
- {reef_cli-0.1.0 → reef_cli-1.0.0}/PKG-INFO +3 -2
- reef_cli-1.0.0/pyproject.toml +30 -0
- reef_cli-0.1.0/pyproject.toml → reef_cli-1.0.0/pyproject.toml.orig +3 -2
- {reef_cli-0.1.0 → reef_cli-1.0.0}/src/reef_cli/cli.py +82 -45
- {reef_cli-0.1.0 → reef_cli-1.0.0}/README.md +0 -0
- {reef_cli-0.1.0 → reef_cli-1.0.0}/src/reef_cli/__init__.py +0 -0
reef_cli-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Haai BV
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reef-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Command-line client for reef — shared, living memory for people and their AI assistants
|
|
5
5
|
Keywords: mcp,memory,cli,reef
|
|
6
6
|
Author: WOUTER DURNEZ
|
|
7
7
|
Author-email: WOUTER DURNEZ <wouter.durnez@gmail.com>
|
|
8
8
|
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Dist: fastmcp>=2
|
|
10
11
|
Requires-Python: >=3.13
|
|
11
12
|
Project-URL: Homepage, https://reefwith.me
|
|
12
|
-
Project-URL: Repository, https://github.com/diepzee/
|
|
13
|
+
Project-URL: Repository, https://github.com/diepzee/reef
|
|
13
14
|
Description-Content-Type: text/markdown
|
|
14
15
|
|
|
15
16
|
# reef-cli
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "reef-cli"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Command-line client for reef — shared, living memory for people and their AI assistants"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
requires-python = ">=3.13"
|
|
9
|
+
dependencies = ["fastmcp>=2"]
|
|
10
|
+
keywords = [
|
|
11
|
+
"mcp",
|
|
12
|
+
"memory",
|
|
13
|
+
"cli",
|
|
14
|
+
"reef",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[[project.authors]]
|
|
18
|
+
name = "WOUTER DURNEZ"
|
|
19
|
+
email = "wouter.durnez@gmail.com"
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://reefwith.me"
|
|
23
|
+
Repository = "https://github.com/diepzee/reef"
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
reef = "reef_cli.cli:main"
|
|
27
|
+
|
|
28
|
+
[build-system]
|
|
29
|
+
requires = ["uv_build>=0.11.14,<0.12.0"]
|
|
30
|
+
build-backend = "uv_build"
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "reef-cli"
|
|
3
|
-
version = "
|
|
3
|
+
version = "1.0.0"
|
|
4
4
|
description = "Command-line client for reef — shared, living memory for people and their AI assistants"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
7
7
|
{ name = "WOUTER DURNEZ", email = "wouter.durnez@gmail.com" }
|
|
8
8
|
]
|
|
9
9
|
license = "MIT"
|
|
10
|
+
license-files = ["LICENSE"]
|
|
10
11
|
requires-python = ">=3.13"
|
|
11
12
|
dependencies = [
|
|
12
13
|
"fastmcp>=2",
|
|
@@ -15,7 +16,7 @@ keywords = ["mcp", "memory", "cli", "reef"]
|
|
|
15
16
|
|
|
16
17
|
[project.urls]
|
|
17
18
|
Homepage = "https://reefwith.me"
|
|
18
|
-
Repository = "https://github.com/diepzee/
|
|
19
|
+
Repository = "https://github.com/diepzee/reef"
|
|
19
20
|
|
|
20
21
|
[project.scripts]
|
|
21
22
|
reef = "reef_cli.cli:main"
|
|
@@ -252,41 +252,62 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
252
252
|
)
|
|
253
253
|
|
|
254
254
|
_tool_parser(sub, "load_index", "load the body-free memory index")
|
|
255
|
-
read_pages = _tool_parser(sub, "read_pages", "read several pages from one
|
|
256
|
-
read_pages.add_argument("
|
|
255
|
+
read_pages = _tool_parser(sub, "read_pages", "read several pages from one cove")
|
|
256
|
+
read_pages.add_argument("cove")
|
|
257
257
|
read_pages.add_argument("paths", nargs="+")
|
|
258
|
+
search = _tool_parser(sub, "search_pages", "full-text search across your pages")
|
|
259
|
+
search.add_argument("query")
|
|
260
|
+
search.add_argument("--cove", help="restrict to one cove")
|
|
261
|
+
search.add_argument("--limit", type=int, default=10)
|
|
262
|
+
# The two-tool connector shape, carried here for parity with the MCP
|
|
263
|
+
# surface. A person at a terminal wants search-pages and read-page --
|
|
264
|
+
# these exist because some clients can only ever call two tools.
|
|
265
|
+
connector_search = _tool_parser(sub, "search", "search, in the connector shape")
|
|
266
|
+
connector_search.add_argument("query")
|
|
267
|
+
connector_fetch = _tool_parser(sub, "fetch", "fetch one result from search")
|
|
268
|
+
connector_fetch.add_argument("id")
|
|
258
269
|
_tool_parser(sub, "load_all_context", "load all page bodies for maintenance")
|
|
259
270
|
_tool_parser(sub, "get_operating_protocol", "load the protocol and persona")
|
|
260
271
|
read_page = _tool_parser(sub, "read_page", "read one page")
|
|
261
|
-
read_page.add_argument("
|
|
272
|
+
read_page.add_argument("cove")
|
|
262
273
|
read_page.add_argument("path")
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
274
|
+
read_page.add_argument("--as-of", help="ISO-8601 moment to read the page as of")
|
|
275
|
+
whats_new = _tool_parser(sub, "whats_new", "list recent changes across coves")
|
|
276
|
+
whats_new.add_argument("--since", help="ISO-8601 moment to report changes after")
|
|
277
|
+
_tool_parser(sub, "list_coves", "list coves, members, ownership, and versions")
|
|
278
|
+
create_cove = _tool_parser(sub, "create_cove", "create a shared cove")
|
|
279
|
+
create_cove.add_argument("slug")
|
|
280
|
+
invite = _tool_parser(sub, "invite", "invite a person into a shared cove")
|
|
281
|
+
invite.add_argument("cove")
|
|
268
282
|
invite.add_argument("email")
|
|
269
283
|
invite.add_argument("--display-name")
|
|
284
|
+
invite.add_argument(
|
|
285
|
+
"--role",
|
|
286
|
+
choices=["member", "viewer"],
|
|
287
|
+
default="member",
|
|
288
|
+
help="viewer reads everything and writes nothing",
|
|
289
|
+
)
|
|
270
290
|
invite_reef = _tool_parser(
|
|
271
|
-
sub, "invite_to_reef", "invite someone to Reef without sharing a
|
|
291
|
+
sub, "invite_to_reef", "invite someone to Reef without sharing a cove"
|
|
272
292
|
)
|
|
273
293
|
invite_reef.add_argument("email")
|
|
274
294
|
invite_reef.add_argument("--display-name")
|
|
275
|
-
remove = _tool_parser(sub, "remove_member", "remove a shared-
|
|
276
|
-
remove.add_argument("
|
|
295
|
+
remove = _tool_parser(sub, "remove_member", "remove a shared-cove member")
|
|
296
|
+
remove.add_argument("cove")
|
|
277
297
|
remove.add_argument("email")
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
)
|
|
283
|
-
delete
|
|
284
|
-
|
|
298
|
+
rename = _tool_parser(sub, "rename_cove", "change what you call a shared cove")
|
|
299
|
+
rename.add_argument("cove")
|
|
300
|
+
rename.add_argument("new_name")
|
|
301
|
+
leave = _tool_parser(sub, "leave_cove", "leave a shared cove, handing it on")
|
|
302
|
+
leave.add_argument("cove")
|
|
303
|
+
delete = _tool_parser(sub, "delete_cove", "destroy a shared cove you are alone in")
|
|
304
|
+
delete.add_argument("cove")
|
|
305
|
+
remember = _tool_parser(sub, "remember", "append a fact to a cove inbox")
|
|
285
306
|
remember.add_argument("fact", help="fact text; '-' reads stdin")
|
|
286
|
-
remember.add_argument("--
|
|
307
|
+
remember.add_argument("--cove", default="personal")
|
|
287
308
|
|
|
288
309
|
write = _tool_parser(sub, "write_page", "create or replace one Markdown page")
|
|
289
|
-
write.add_argument("
|
|
310
|
+
write.add_argument("cove")
|
|
290
311
|
write.add_argument("path")
|
|
291
312
|
_add_text_source(write, "body")
|
|
292
313
|
write.add_argument("--message", required=True)
|
|
@@ -294,13 +315,19 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
294
315
|
write.add_argument("--tag", dest="tags", action="append")
|
|
295
316
|
write.add_argument("--expected-version", type=int)
|
|
296
317
|
|
|
318
|
+
delete_page = _tool_parser(
|
|
319
|
+
sub, "delete_page", "permanently delete a page and its history"
|
|
320
|
+
)
|
|
321
|
+
delete_page.add_argument("cove")
|
|
322
|
+
delete_page.add_argument("path")
|
|
323
|
+
|
|
297
324
|
writes = _tool_parser(sub, "write_pages", "atomically write up to 20 pages")
|
|
298
|
-
writes.add_argument("
|
|
325
|
+
writes.add_argument("cove")
|
|
299
326
|
writes.add_argument("pages", help="JSON array, @file, or '-' for stdin")
|
|
300
327
|
writes.add_argument("--message", default="")
|
|
301
328
|
|
|
302
329
|
edit = _tool_parser(sub, "edit_page_section", "replace one exact page span")
|
|
303
|
-
edit.add_argument("
|
|
330
|
+
edit.add_argument("cove")
|
|
304
331
|
edit.add_argument("path")
|
|
305
332
|
_add_text_source(edit, "old-text")
|
|
306
333
|
_add_text_source(edit, "new-text")
|
|
@@ -320,7 +347,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
320
347
|
sub, "prepare_to_share", "stage personal content for sharing"
|
|
321
348
|
)
|
|
322
349
|
prepare.add_argument("path")
|
|
323
|
-
prepare.add_argument("
|
|
350
|
+
prepare.add_argument("dest_cove")
|
|
324
351
|
prepare.add_argument("--section")
|
|
325
352
|
prepare.add_argument("--section-file")
|
|
326
353
|
prepare.add_argument("--dest-path")
|
|
@@ -330,33 +357,33 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
330
357
|
add_file = _tool_parser(
|
|
331
358
|
sub, "add_file", "upload a file with a searchable description"
|
|
332
359
|
)
|
|
333
|
-
add_file.add_argument("
|
|
360
|
+
add_file.add_argument("cove")
|
|
334
361
|
add_file.add_argument("file", type=Path)
|
|
335
362
|
add_file.add_argument("--mime")
|
|
336
363
|
add_file.add_argument("--description", required=True)
|
|
337
364
|
add_file.add_argument("--page-path")
|
|
338
365
|
read_file = _tool_parser(sub, "read_file", "get file metadata and a signed URL")
|
|
339
|
-
read_file.add_argument("
|
|
366
|
+
read_file.add_argument("cove")
|
|
340
367
|
read_file.add_argument("key")
|
|
341
368
|
delete_file = _tool_parser(sub, "delete_file", "permanently delete a stored file")
|
|
342
|
-
delete_file.add_argument("
|
|
369
|
+
delete_file.add_argument("cove")
|
|
343
370
|
delete_file.add_argument("key")
|
|
344
371
|
|
|
345
372
|
add_image = _tool_parser(
|
|
346
373
|
sub, "add_image", "compatibility alias for uploading an image"
|
|
347
374
|
)
|
|
348
|
-
add_image.add_argument("
|
|
375
|
+
add_image.add_argument("cove")
|
|
349
376
|
add_image.add_argument("file", type=Path)
|
|
350
377
|
add_image.add_argument("--mime")
|
|
351
378
|
add_image.add_argument("--description", required=True)
|
|
352
379
|
add_image.add_argument("--page-path")
|
|
353
380
|
read_image = _tool_parser(sub, "read_image", "compatibility alias for read-file")
|
|
354
|
-
read_image.add_argument("
|
|
381
|
+
read_image.add_argument("cove")
|
|
355
382
|
read_image.add_argument("key")
|
|
356
383
|
delete_image = _tool_parser(
|
|
357
384
|
sub, "delete_image", "compatibility alias for delete-file"
|
|
358
385
|
)
|
|
359
|
-
delete_image.add_argument("
|
|
386
|
+
delete_image.add_argument("cove")
|
|
360
387
|
delete_image.add_argument("key")
|
|
361
388
|
return parser
|
|
362
389
|
|
|
@@ -370,7 +397,7 @@ def _file_arguments(args: argparse.Namespace, *, image: bool = False) -> dict[st
|
|
|
370
397
|
if mime is None:
|
|
371
398
|
mime = "application/octet-stream"
|
|
372
399
|
result = {
|
|
373
|
-
"
|
|
400
|
+
"cove": args.cove,
|
|
374
401
|
"data_base64": base64.b64encode(data).decode("ascii"),
|
|
375
402
|
"mime": mime,
|
|
376
403
|
"description": args.description,
|
|
@@ -388,30 +415,40 @@ def tool_call(args: argparse.Namespace) -> tuple[str, dict[str, Any]]:
|
|
|
388
415
|
"load_index",
|
|
389
416
|
"load_all_context",
|
|
390
417
|
"get_operating_protocol",
|
|
391
|
-
"
|
|
418
|
+
"list_coves",
|
|
392
419
|
}:
|
|
393
420
|
return tool, {}
|
|
394
421
|
if tool == "read_pages":
|
|
395
|
-
return tool, {"
|
|
422
|
+
return tool, {"cove": args.cove, "paths": args.paths}
|
|
423
|
+
if tool == "search_pages":
|
|
424
|
+
return tool, {"query": args.query, "cove": args.cove, "limit": args.limit}
|
|
396
425
|
if tool == "read_page":
|
|
397
|
-
|
|
398
|
-
|
|
426
|
+
payload = {"cove": args.cove, "path": args.path}
|
|
427
|
+
if args.as_of is not None:
|
|
428
|
+
payload["as_of"] = args.as_of
|
|
429
|
+
return tool, payload
|
|
430
|
+
if tool == "whats_new":
|
|
431
|
+
return tool, {"since": args.since} if args.since is not None else {}
|
|
432
|
+
if tool == "create_cove":
|
|
399
433
|
return tool, {"slug": args.slug}
|
|
400
434
|
if tool in {"invite", "invite_to_reef"}:
|
|
401
435
|
payload = {"email": args.email, "display_name": args.display_name}
|
|
402
436
|
if tool == "invite":
|
|
403
|
-
payload["
|
|
437
|
+
payload["cove"] = args.cove
|
|
438
|
+
payload["role"] = args.role
|
|
404
439
|
return tool, payload
|
|
405
440
|
if tool == "remove_member":
|
|
406
|
-
return tool, {"
|
|
407
|
-
if tool
|
|
408
|
-
return tool, {"
|
|
441
|
+
return tool, {"cove": args.cove, "email": args.email}
|
|
442
|
+
if tool == "rename_cove":
|
|
443
|
+
return tool, {"cove": args.cove, "new_name": args.new_name}
|
|
444
|
+
if tool in {"leave_cove", "delete_cove"}:
|
|
445
|
+
return tool, {"cove": args.cove}
|
|
409
446
|
if tool == "remember":
|
|
410
447
|
fact = sys.stdin.read() if args.fact == "-" else args.fact
|
|
411
|
-
return tool, {"fact": fact, "
|
|
448
|
+
return tool, {"fact": fact, "cove": args.cove}
|
|
412
449
|
if tool == "write_page":
|
|
413
450
|
return tool, {
|
|
414
|
-
"
|
|
451
|
+
"cove": args.cove,
|
|
415
452
|
"path": args.path,
|
|
416
453
|
"body": _text_source(args.body, args.body_file, "body"),
|
|
417
454
|
"message": args.message,
|
|
@@ -423,10 +460,10 @@ def tool_call(args: argparse.Namespace) -> tuple[str, dict[str, Any]]:
|
|
|
423
460
|
pages = _json_source(args.pages)
|
|
424
461
|
if not isinstance(pages, list):
|
|
425
462
|
raise CLIError("write-pages input must be a JSON array")
|
|
426
|
-
return tool, {"
|
|
463
|
+
return tool, {"cove": args.cove, "pages": pages, "message": args.message}
|
|
427
464
|
if tool == "edit_page_section":
|
|
428
465
|
return tool, {
|
|
429
|
-
"
|
|
466
|
+
"cove": args.cove,
|
|
430
467
|
"path": args.path,
|
|
431
468
|
"old_text": _text_source(args.old_text, args.old_text_file, "old-text"),
|
|
432
469
|
"new_text": _text_source(args.new_text, args.new_text_file, "new-text"),
|
|
@@ -435,7 +472,7 @@ def tool_call(args: argparse.Namespace) -> tuple[str, dict[str, Any]]:
|
|
|
435
472
|
}
|
|
436
473
|
if tool == "update_meta_page":
|
|
437
474
|
return tool, {
|
|
438
|
-
"
|
|
475
|
+
"cove": "personal",
|
|
439
476
|
"path": "meta/persona.md",
|
|
440
477
|
"body": _text_source(args.body, args.body_file, "body"),
|
|
441
478
|
"message": args.message,
|
|
@@ -449,7 +486,7 @@ def tool_call(args: argparse.Namespace) -> tuple[str, dict[str, Any]]:
|
|
|
449
486
|
section = _text_source(args.section, args.section_file, "section")
|
|
450
487
|
return tool, {
|
|
451
488
|
"path": args.path,
|
|
452
|
-
"
|
|
489
|
+
"dest_cove": args.dest_cove,
|
|
453
490
|
"section": section,
|
|
454
491
|
"dest_path": args.dest_path,
|
|
455
492
|
}
|
|
@@ -460,7 +497,7 @@ def tool_call(args: argparse.Namespace) -> tuple[str, dict[str, Any]]:
|
|
|
460
497
|
if tool == "add_image":
|
|
461
498
|
return tool, _file_arguments(args, image=True)
|
|
462
499
|
if tool in {"read_file", "delete_file", "read_image", "delete_image"}:
|
|
463
|
-
return tool, {"
|
|
500
|
+
return tool, {"cove": args.cove, "key": args.key}
|
|
464
501
|
raise CLIError(f"unsupported command: {tool}")
|
|
465
502
|
|
|
466
503
|
|
|
File without changes
|
|
File without changes
|