ai-memory-cli 0.1.7__tar.gz → 0.1.8__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.
- {ai_memory_cli-0.1.7/src/ai_memory_cli.egg-info → ai_memory_cli-0.1.8}/PKG-INFO +2 -1
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/README.md +1 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/pyproject.toml +1 -1
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli/__init__.py +1 -1
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli/cli.py +20 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8/src/ai_memory_cli.egg-info}/PKG-INFO +2 -1
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/LICENSE +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/bin/watch.cmd +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/setup.cfg +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli/__main__.py +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli.egg-info/SOURCES.txt +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli.egg-info/dependency_links.txt +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli.egg-info/entry_points.txt +0 -0
- {ai_memory_cli-0.1.7 → ai_memory_cli-0.1.8}/src/ai_memory_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-memory-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: Python CLI for AI Memory terminal capture and offline sync.
|
|
5
5
|
Author: AI Memory
|
|
6
6
|
License-Expression: MIT
|
|
@@ -68,6 +68,7 @@ Use `python -m ai_memory_cli run -- COMMAND` when you only want to record one co
|
|
|
68
68
|
On Windows, `python -m ai_memory_cli ...` is the safest form because it avoids PATH issues and Device Guard policies that can block pip's generated `ai-memory.exe` launcher. Also avoid angle bracket placeholders in CMD because they are treated as file redirection.
|
|
69
69
|
|
|
70
70
|
Inside `watch`, type the real command you want to capture, for example `python --version`. Do not type `python -m ai_memory_cli run -- ...` inside `watch`, or you will capture the nested CLI command too.
|
|
71
|
+
Use `cls` on Windows or `clear` on Unix shells to clear the watch screen; those control commands are not stored or synced.
|
|
71
72
|
|
|
72
73
|
## Background agent
|
|
73
74
|
|
|
@@ -46,6 +46,7 @@ Use `python -m ai_memory_cli run -- COMMAND` when you only want to record one co
|
|
|
46
46
|
On Windows, `python -m ai_memory_cli ...` is the safest form because it avoids PATH issues and Device Guard policies that can block pip's generated `ai-memory.exe` launcher. Also avoid angle bracket placeholders in CMD because they are treated as file redirection.
|
|
47
47
|
|
|
48
48
|
Inside `watch`, type the real command you want to capture, for example `python --version`. Do not type `python -m ai_memory_cli run -- ...` inside `watch`, or you will capture the nested CLI command too.
|
|
49
|
+
Use `cls` on Windows or `clear` on Unix shells to clear the watch screen; those control commands are not stored or synced.
|
|
49
50
|
|
|
50
51
|
## Background agent
|
|
51
52
|
|
|
@@ -42,6 +42,7 @@ SHELL_NOT_FOUND_PATTERNS = [
|
|
|
42
42
|
"no such file or directory",
|
|
43
43
|
"command not found",
|
|
44
44
|
]
|
|
45
|
+
CLEAR_COMMANDS = {"cls", "clear"}
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
def utc_now() -> str:
|
|
@@ -321,6 +322,18 @@ def clean_watch_command(command: str) -> str:
|
|
|
321
322
|
return cleaned
|
|
322
323
|
|
|
323
324
|
|
|
325
|
+
def is_clear_command(command: str) -> bool:
|
|
326
|
+
return normalize_command(command).lower() in CLEAR_COMMANDS
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def clear_console() -> None:
|
|
330
|
+
command = "cls" if os.name == "nt" else "clear"
|
|
331
|
+
try:
|
|
332
|
+
subprocess.call(command, shell=True)
|
|
333
|
+
except Exception:
|
|
334
|
+
print("\033[2J\033[H", end="")
|
|
335
|
+
|
|
336
|
+
|
|
324
337
|
def normalize_output(stdout: str, stderr: str) -> str:
|
|
325
338
|
combined = f"stdout:\n{stdout}\nstderr:\n{stderr}"
|
|
326
339
|
lines = [line.rstrip() for line in combined.replace("\r\n", "\n").replace("\r", "\n").split("\n")]
|
|
@@ -632,6 +645,10 @@ def sync_events(home: Path, config: dict[str, Any], limit: int = 50, quiet: bool
|
|
|
632
645
|
|
|
633
646
|
|
|
634
647
|
def capture_command(home: Path, config: dict[str, Any], command: str, include_excluded: bool, source: str) -> int:
|
|
648
|
+
if is_clear_command(command):
|
|
649
|
+
clear_console()
|
|
650
|
+
return 0
|
|
651
|
+
|
|
635
652
|
require_verified_auth(home, config)
|
|
636
653
|
workspace = Path(str(config.get("workspace_path") or ".")).expanduser()
|
|
637
654
|
cwd = workspace if workspace.exists() else Path.cwd()
|
|
@@ -868,6 +885,9 @@ def command_watch(args: argparse.Namespace) -> int:
|
|
|
868
885
|
command = cleaned_command
|
|
869
886
|
if command.lower() in {"exit", "quit"}:
|
|
870
887
|
break
|
|
888
|
+
if is_clear_command(command):
|
|
889
|
+
clear_console()
|
|
890
|
+
continue
|
|
871
891
|
capture_command(home, config, command, args.include_excluded, "watch")
|
|
872
892
|
return 0
|
|
873
893
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-memory-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: Python CLI for AI Memory terminal capture and offline sync.
|
|
5
5
|
Author: AI Memory
|
|
6
6
|
License-Expression: MIT
|
|
@@ -68,6 +68,7 @@ Use `python -m ai_memory_cli run -- COMMAND` when you only want to record one co
|
|
|
68
68
|
On Windows, `python -m ai_memory_cli ...` is the safest form because it avoids PATH issues and Device Guard policies that can block pip's generated `ai-memory.exe` launcher. Also avoid angle bracket placeholders in CMD because they are treated as file redirection.
|
|
69
69
|
|
|
70
70
|
Inside `watch`, type the real command you want to capture, for example `python --version`. Do not type `python -m ai_memory_cli run -- ...` inside `watch`, or you will capture the nested CLI command too.
|
|
71
|
+
Use `cls` on Windows or `clear` on Unix shells to clear the watch screen; those control commands are not stored or synced.
|
|
71
72
|
|
|
72
73
|
## Background agent
|
|
73
74
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|