memvora 0.1.13__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.
memvora-0.1.13/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Memvora
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.
@@ -0,0 +1,187 @@
1
+ Metadata-Version: 2.4
2
+ Name: memvora
3
+ Version: 0.1.13
4
+ Summary: Python CLI for Memvora terminal capture and offline sync.
5
+ Author: Memvora
6
+ License-Expression: MIT
7
+ Keywords: ai,memory,cli,terminal,rag,developer-tools
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Software Development
17
+ Classifier: Topic :: Terminals
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
22
+
23
+ # Memvora CLI
24
+
25
+ Standalone Python CLI for terminal capture, hashing, offline queueing, and sync to the temporary FastAPI backend.
26
+
27
+ ## Install
28
+
29
+ For any user machine after the package is published:
30
+
31
+ ```powershell
32
+ python -m pip install memvora
33
+ ```
34
+
35
+ Before PyPI publish, install from GitHub:
36
+
37
+ ```powershell
38
+ python -m pip install "memvora @ git+https://github.com/harshitgupta31415/memvora-cli.git"
39
+ ```
40
+
41
+ For local development from this CLI repo:
42
+
43
+ ```powershell
44
+ python -m pip install -e .
45
+ ```
46
+
47
+ ## Basic flow
48
+
49
+ ```powershell
50
+ python -m memvora_cli auth --token TOKEN_FROM_WEBSITE --api-url https://api.your-domain.com
51
+ python -m memvora_cli init --project my-project --repo owner/repo --workspace .
52
+ python -m memvora_cli workspace connect --path . --repo owner/repo --package-manager pip
53
+ watch "backend setup"
54
+ ```
55
+
56
+ The `auth` command verifies the website-issued token with FastAPI before it is saved locally. After verification,
57
+ the CLI stores a SHA-512 user hash for this computer, binds the token to that hash on the server, and starts the
58
+ background sync agent once on Windows.
59
+
60
+ If you run `watch` before auth, it will prompt for the website CLI token and FastAPI URL, then continue into
61
+ terminal capture after verification.
62
+
63
+ `watch` is a shortcut for `python -m memvora_cli watch`. Give it a name, such as `watch "backend setup"`, so every command until `exit` is grouped under that work session. If Windows Device Guard blocks the generated launcher, keep using `python -m memvora_cli watch "backend setup"`.
64
+ On Windows the shortcut is installed as `watch.cmd`; the Python Scripts folder must be on `PATH` for bare `watch` to resolve.
65
+
66
+ Use `python -m memvora_cli run -- COMMAND` when you only want to record one command.
67
+
68
+ On Windows, `python -m memvora_cli ...` is the safest form because it avoids PATH issues and Device Guard policies that can block pip's generated `memvora.exe` launcher. Also avoid angle bracket placeholders in CMD because they are treated as file redirection.
69
+
70
+ Inside `watch`, type the real command you want to capture, for example `python --version`. Do not type `python -m memvora_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.
72
+ On Windows, commands run through PowerShell, so type `ls` directly. Do not type `powershell` or `cmd` inside `watch`; nested shell launchers are ignored and not stored.
73
+ The watch prompt shows the session name and active folder, for example `memvora[backend setup] C:\work\repo>`. Use `cd`, `chdir`, `cd..`, `cd /d D:\path`, `cd ~`, or `cd -` normally; successful directory changes are tracked as hashed terminal events and become the working folder for the next command.
74
+
75
+ ## Background agent
76
+
77
+ After `auth`, the background agent starts once and is installed in the Windows Startup folder so queued terminal
78
+ hashes keep syncing whenever the API is reachable. Use these commands when you need manual control:
79
+
80
+ ```powershell
81
+ python -m memvora_cli agent status
82
+ python -m memvora_cli agent stop
83
+ python -m memvora_cli agent start
84
+ ```
85
+
86
+ The agent does not secretly capture every terminal on the computer. Commands are captured when they run through:
87
+
88
+ ```powershell
89
+ python -m memvora_cli watch "backend setup"
90
+ python -m memvora_cli run -- python --version
91
+ ```
92
+
93
+ To remove the startup task:
94
+
95
+ ```powershell
96
+ python -m memvora_cli agent stop
97
+ python -m memvora_cli agent uninstall
98
+ ```
99
+
100
+ Agent logs are written to `%USERPROFILE%\.memvora\logs\agent.log`.
101
+
102
+ ## Storage
103
+
104
+ The CLI stores config and unsynced events in a separate folder:
105
+
106
+ - Windows: `%USERPROFILE%\.memvora`
107
+ - macOS/Linux: `~/.memvora`
108
+
109
+ Set `MEMVORA_CLI_HOME` to override this location.
110
+
111
+ Accepted command observations are also written as plain daily hash logs:
112
+
113
+ - Windows: `%USERPROFILE%\.memvora\history\YYYY-MM-DD.log`
114
+ - macOS/Linux: `~/.memvora/history/YYYY-MM-DD.log`
115
+
116
+ These files include time/date, event hash, command hash, output hash, source, exit code, and working-folder name.
117
+
118
+ The readable command/output mapping is stored locally in:
119
+
120
+ - Windows: `%USERPROFILE%\.memvora\dictionary\terminal-dictionary.json`
121
+ - macOS/Linux: `~/.memvora/dictionary/terminal-dictionary.json`
122
+
123
+ When synced, FastAPI also stores that mapping in PostgreSQL under:
124
+
125
+ ```text
126
+ cli/<github-account>/<user-hash-prefix>/terminal-dictionary.json
127
+ ```
128
+
129
+ Use this dictionary to map `command_hash`, `output_hash`, or `event_hash` back to the command text and captured output.
130
+
131
+ Each named watch session is also stored as one readable JSON file:
132
+
133
+ - Windows: `%USERPROFILE%\.memvora\dictionary\watch-sessions\<watch-id>.json`
134
+ - macOS/Linux: `~/.memvora/dictionary/watch-sessions/<watch-id>.json`
135
+
136
+ When synced, FastAPI stores the same named session in PostgreSQL under:
137
+
138
+ ```text
139
+ cli/<github-account>/<user-hash-prefix>/terminal-watch-sessions/<watch-id>.json
140
+ ```
141
+
142
+ If a command is clearly invalid, such as a pasted prompt (`memvora> python --version`) or a shell "not recognized" error, the CLI skips storing it as an event.
143
+
144
+ ## Storage, meaning, and dedupe
145
+
146
+ The CLI stores three related records:
147
+
148
+ - readable event files in `events/`, `outbox/`, `sent/`, and backend `terminal-events/`
149
+ - readable mapping in `terminal-dictionary.json`
150
+ - readable named watch sessions in `dictionary/watch-sessions/`
151
+
152
+ Event files contain readable fields such as `command`, `stdout`, `stderr`, `output`, and `cwd`, plus `command_hash`, `output_hash`, and `event_hash` for dedupe.
153
+
154
+ The dictionary contains:
155
+
156
+ - `commands[command_hash].command`
157
+ - `outputs[output_hash].stdout`
158
+ - `outputs[output_hash].stderr`
159
+ - `events[event_hash].command`
160
+ - `events[event_hash].stdout`
161
+ - `events[event_hash].stderr`
162
+ - `watch_sessions[watch_id].watch_name`
163
+ - `watch_sessions[watch_id].event_hashes`
164
+
165
+ If the same command produces the same output again, the CLI keeps one event hash and increments `duplicate_count`.
166
+
167
+ ## Excluded commands
168
+
169
+ Long-running development commands are not captured by default. They still run, but no hash event is stored.
170
+
171
+ Default excluded patterns include:
172
+
173
+ - `npm run ...`
174
+ - `next dev`
175
+ - `vite`
176
+ - `uvicorn --reload`
177
+ - `python -m uvicorn ... --reload`
178
+
179
+ Use `--include-excluded` on `run` or `watch` if you need to capture them anyway.
180
+
181
+ ## Publish
182
+
183
+ After this folder is pushed as its own public GitHub repo, publish to PyPI with:
184
+
185
+ ```powershell
186
+ .\scripts\publish.ps1 -Repository pypi
187
+ ```
@@ -0,0 +1,165 @@
1
+ # Memvora CLI
2
+
3
+ Standalone Python CLI for terminal capture, hashing, offline queueing, and sync to the temporary FastAPI backend.
4
+
5
+ ## Install
6
+
7
+ For any user machine after the package is published:
8
+
9
+ ```powershell
10
+ python -m pip install memvora
11
+ ```
12
+
13
+ Before PyPI publish, install from GitHub:
14
+
15
+ ```powershell
16
+ python -m pip install "memvora @ git+https://github.com/harshitgupta31415/memvora-cli.git"
17
+ ```
18
+
19
+ For local development from this CLI repo:
20
+
21
+ ```powershell
22
+ python -m pip install -e .
23
+ ```
24
+
25
+ ## Basic flow
26
+
27
+ ```powershell
28
+ python -m memvora_cli auth --token TOKEN_FROM_WEBSITE --api-url https://api.your-domain.com
29
+ python -m memvora_cli init --project my-project --repo owner/repo --workspace .
30
+ python -m memvora_cli workspace connect --path . --repo owner/repo --package-manager pip
31
+ watch "backend setup"
32
+ ```
33
+
34
+ The `auth` command verifies the website-issued token with FastAPI before it is saved locally. After verification,
35
+ the CLI stores a SHA-512 user hash for this computer, binds the token to that hash on the server, and starts the
36
+ background sync agent once on Windows.
37
+
38
+ If you run `watch` before auth, it will prompt for the website CLI token and FastAPI URL, then continue into
39
+ terminal capture after verification.
40
+
41
+ `watch` is a shortcut for `python -m memvora_cli watch`. Give it a name, such as `watch "backend setup"`, so every command until `exit` is grouped under that work session. If Windows Device Guard blocks the generated launcher, keep using `python -m memvora_cli watch "backend setup"`.
42
+ On Windows the shortcut is installed as `watch.cmd`; the Python Scripts folder must be on `PATH` for bare `watch` to resolve.
43
+
44
+ Use `python -m memvora_cli run -- COMMAND` when you only want to record one command.
45
+
46
+ On Windows, `python -m memvora_cli ...` is the safest form because it avoids PATH issues and Device Guard policies that can block pip's generated `memvora.exe` launcher. Also avoid angle bracket placeholders in CMD because they are treated as file redirection.
47
+
48
+ Inside `watch`, type the real command you want to capture, for example `python --version`. Do not type `python -m memvora_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.
50
+ On Windows, commands run through PowerShell, so type `ls` directly. Do not type `powershell` or `cmd` inside `watch`; nested shell launchers are ignored and not stored.
51
+ The watch prompt shows the session name and active folder, for example `memvora[backend setup] C:\work\repo>`. Use `cd`, `chdir`, `cd..`, `cd /d D:\path`, `cd ~`, or `cd -` normally; successful directory changes are tracked as hashed terminal events and become the working folder for the next command.
52
+
53
+ ## Background agent
54
+
55
+ After `auth`, the background agent starts once and is installed in the Windows Startup folder so queued terminal
56
+ hashes keep syncing whenever the API is reachable. Use these commands when you need manual control:
57
+
58
+ ```powershell
59
+ python -m memvora_cli agent status
60
+ python -m memvora_cli agent stop
61
+ python -m memvora_cli agent start
62
+ ```
63
+
64
+ The agent does not secretly capture every terminal on the computer. Commands are captured when they run through:
65
+
66
+ ```powershell
67
+ python -m memvora_cli watch "backend setup"
68
+ python -m memvora_cli run -- python --version
69
+ ```
70
+
71
+ To remove the startup task:
72
+
73
+ ```powershell
74
+ python -m memvora_cli agent stop
75
+ python -m memvora_cli agent uninstall
76
+ ```
77
+
78
+ Agent logs are written to `%USERPROFILE%\.memvora\logs\agent.log`.
79
+
80
+ ## Storage
81
+
82
+ The CLI stores config and unsynced events in a separate folder:
83
+
84
+ - Windows: `%USERPROFILE%\.memvora`
85
+ - macOS/Linux: `~/.memvora`
86
+
87
+ Set `MEMVORA_CLI_HOME` to override this location.
88
+
89
+ Accepted command observations are also written as plain daily hash logs:
90
+
91
+ - Windows: `%USERPROFILE%\.memvora\history\YYYY-MM-DD.log`
92
+ - macOS/Linux: `~/.memvora/history/YYYY-MM-DD.log`
93
+
94
+ These files include time/date, event hash, command hash, output hash, source, exit code, and working-folder name.
95
+
96
+ The readable command/output mapping is stored locally in:
97
+
98
+ - Windows: `%USERPROFILE%\.memvora\dictionary\terminal-dictionary.json`
99
+ - macOS/Linux: `~/.memvora/dictionary/terminal-dictionary.json`
100
+
101
+ When synced, FastAPI also stores that mapping in PostgreSQL under:
102
+
103
+ ```text
104
+ cli/<github-account>/<user-hash-prefix>/terminal-dictionary.json
105
+ ```
106
+
107
+ Use this dictionary to map `command_hash`, `output_hash`, or `event_hash` back to the command text and captured output.
108
+
109
+ Each named watch session is also stored as one readable JSON file:
110
+
111
+ - Windows: `%USERPROFILE%\.memvora\dictionary\watch-sessions\<watch-id>.json`
112
+ - macOS/Linux: `~/.memvora/dictionary/watch-sessions/<watch-id>.json`
113
+
114
+ When synced, FastAPI stores the same named session in PostgreSQL under:
115
+
116
+ ```text
117
+ cli/<github-account>/<user-hash-prefix>/terminal-watch-sessions/<watch-id>.json
118
+ ```
119
+
120
+ If a command is clearly invalid, such as a pasted prompt (`memvora> python --version`) or a shell "not recognized" error, the CLI skips storing it as an event.
121
+
122
+ ## Storage, meaning, and dedupe
123
+
124
+ The CLI stores three related records:
125
+
126
+ - readable event files in `events/`, `outbox/`, `sent/`, and backend `terminal-events/`
127
+ - readable mapping in `terminal-dictionary.json`
128
+ - readable named watch sessions in `dictionary/watch-sessions/`
129
+
130
+ Event files contain readable fields such as `command`, `stdout`, `stderr`, `output`, and `cwd`, plus `command_hash`, `output_hash`, and `event_hash` for dedupe.
131
+
132
+ The dictionary contains:
133
+
134
+ - `commands[command_hash].command`
135
+ - `outputs[output_hash].stdout`
136
+ - `outputs[output_hash].stderr`
137
+ - `events[event_hash].command`
138
+ - `events[event_hash].stdout`
139
+ - `events[event_hash].stderr`
140
+ - `watch_sessions[watch_id].watch_name`
141
+ - `watch_sessions[watch_id].event_hashes`
142
+
143
+ If the same command produces the same output again, the CLI keeps one event hash and increments `duplicate_count`.
144
+
145
+ ## Excluded commands
146
+
147
+ Long-running development commands are not captured by default. They still run, but no hash event is stored.
148
+
149
+ Default excluded patterns include:
150
+
151
+ - `npm run ...`
152
+ - `next dev`
153
+ - `vite`
154
+ - `uvicorn --reload`
155
+ - `python -m uvicorn ... --reload`
156
+
157
+ Use `--include-excluded` on `run` or `watch` if you need to capture them anyway.
158
+
159
+ ## Publish
160
+
161
+ After this folder is pushed as its own public GitHub repo, publish to PyPI with:
162
+
163
+ ```powershell
164
+ .\scripts\publish.ps1 -Repository pypi
165
+ ```
@@ -0,0 +1,7 @@
1
+ @echo off
2
+ set "MEMVORA_PY=%~dp0python.exe"
3
+ if exist "%MEMVORA_PY%" (
4
+ "%MEMVORA_PY%" -m memvora_cli watch %*
5
+ ) else (
6
+ python -m memvora_cli watch %*
7
+ )
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "memvora"
7
+ version = "0.1.13"
8
+ description = "Python CLI for Memvora terminal capture and offline sync."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "Memvora" }]
12
+ license = "MIT"
13
+ license-files = ["LICENSE"]
14
+ keywords = ["ai", "memory", "cli", "terminal", "rag", "developer-tools"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Topic :: Software Development",
25
+ "Topic :: Terminals",
26
+ ]
27
+ dependencies = []
28
+
29
+ [project.scripts]
30
+ memvora = "memvora_cli.cli:main"
31
+
32
+ [tool.setuptools]
33
+ script-files = ["bin/watch.cmd"]
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,187 @@
1
+ Metadata-Version: 2.4
2
+ Name: memvora
3
+ Version: 0.1.13
4
+ Summary: Python CLI for Memvora terminal capture and offline sync.
5
+ Author: Memvora
6
+ License-Expression: MIT
7
+ Keywords: ai,memory,cli,terminal,rag,developer-tools
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Software Development
17
+ Classifier: Topic :: Terminals
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
22
+
23
+ # Memvora CLI
24
+
25
+ Standalone Python CLI for terminal capture, hashing, offline queueing, and sync to the temporary FastAPI backend.
26
+
27
+ ## Install
28
+
29
+ For any user machine after the package is published:
30
+
31
+ ```powershell
32
+ python -m pip install memvora
33
+ ```
34
+
35
+ Before PyPI publish, install from GitHub:
36
+
37
+ ```powershell
38
+ python -m pip install "memvora @ git+https://github.com/harshitgupta31415/memvora-cli.git"
39
+ ```
40
+
41
+ For local development from this CLI repo:
42
+
43
+ ```powershell
44
+ python -m pip install -e .
45
+ ```
46
+
47
+ ## Basic flow
48
+
49
+ ```powershell
50
+ python -m memvora_cli auth --token TOKEN_FROM_WEBSITE --api-url https://api.your-domain.com
51
+ python -m memvora_cli init --project my-project --repo owner/repo --workspace .
52
+ python -m memvora_cli workspace connect --path . --repo owner/repo --package-manager pip
53
+ watch "backend setup"
54
+ ```
55
+
56
+ The `auth` command verifies the website-issued token with FastAPI before it is saved locally. After verification,
57
+ the CLI stores a SHA-512 user hash for this computer, binds the token to that hash on the server, and starts the
58
+ background sync agent once on Windows.
59
+
60
+ If you run `watch` before auth, it will prompt for the website CLI token and FastAPI URL, then continue into
61
+ terminal capture after verification.
62
+
63
+ `watch` is a shortcut for `python -m memvora_cli watch`. Give it a name, such as `watch "backend setup"`, so every command until `exit` is grouped under that work session. If Windows Device Guard blocks the generated launcher, keep using `python -m memvora_cli watch "backend setup"`.
64
+ On Windows the shortcut is installed as `watch.cmd`; the Python Scripts folder must be on `PATH` for bare `watch` to resolve.
65
+
66
+ Use `python -m memvora_cli run -- COMMAND` when you only want to record one command.
67
+
68
+ On Windows, `python -m memvora_cli ...` is the safest form because it avoids PATH issues and Device Guard policies that can block pip's generated `memvora.exe` launcher. Also avoid angle bracket placeholders in CMD because they are treated as file redirection.
69
+
70
+ Inside `watch`, type the real command you want to capture, for example `python --version`. Do not type `python -m memvora_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.
72
+ On Windows, commands run through PowerShell, so type `ls` directly. Do not type `powershell` or `cmd` inside `watch`; nested shell launchers are ignored and not stored.
73
+ The watch prompt shows the session name and active folder, for example `memvora[backend setup] C:\work\repo>`. Use `cd`, `chdir`, `cd..`, `cd /d D:\path`, `cd ~`, or `cd -` normally; successful directory changes are tracked as hashed terminal events and become the working folder for the next command.
74
+
75
+ ## Background agent
76
+
77
+ After `auth`, the background agent starts once and is installed in the Windows Startup folder so queued terminal
78
+ hashes keep syncing whenever the API is reachable. Use these commands when you need manual control:
79
+
80
+ ```powershell
81
+ python -m memvora_cli agent status
82
+ python -m memvora_cli agent stop
83
+ python -m memvora_cli agent start
84
+ ```
85
+
86
+ The agent does not secretly capture every terminal on the computer. Commands are captured when they run through:
87
+
88
+ ```powershell
89
+ python -m memvora_cli watch "backend setup"
90
+ python -m memvora_cli run -- python --version
91
+ ```
92
+
93
+ To remove the startup task:
94
+
95
+ ```powershell
96
+ python -m memvora_cli agent stop
97
+ python -m memvora_cli agent uninstall
98
+ ```
99
+
100
+ Agent logs are written to `%USERPROFILE%\.memvora\logs\agent.log`.
101
+
102
+ ## Storage
103
+
104
+ The CLI stores config and unsynced events in a separate folder:
105
+
106
+ - Windows: `%USERPROFILE%\.memvora`
107
+ - macOS/Linux: `~/.memvora`
108
+
109
+ Set `MEMVORA_CLI_HOME` to override this location.
110
+
111
+ Accepted command observations are also written as plain daily hash logs:
112
+
113
+ - Windows: `%USERPROFILE%\.memvora\history\YYYY-MM-DD.log`
114
+ - macOS/Linux: `~/.memvora/history/YYYY-MM-DD.log`
115
+
116
+ These files include time/date, event hash, command hash, output hash, source, exit code, and working-folder name.
117
+
118
+ The readable command/output mapping is stored locally in:
119
+
120
+ - Windows: `%USERPROFILE%\.memvora\dictionary\terminal-dictionary.json`
121
+ - macOS/Linux: `~/.memvora/dictionary/terminal-dictionary.json`
122
+
123
+ When synced, FastAPI also stores that mapping in PostgreSQL under:
124
+
125
+ ```text
126
+ cli/<github-account>/<user-hash-prefix>/terminal-dictionary.json
127
+ ```
128
+
129
+ Use this dictionary to map `command_hash`, `output_hash`, or `event_hash` back to the command text and captured output.
130
+
131
+ Each named watch session is also stored as one readable JSON file:
132
+
133
+ - Windows: `%USERPROFILE%\.memvora\dictionary\watch-sessions\<watch-id>.json`
134
+ - macOS/Linux: `~/.memvora/dictionary/watch-sessions/<watch-id>.json`
135
+
136
+ When synced, FastAPI stores the same named session in PostgreSQL under:
137
+
138
+ ```text
139
+ cli/<github-account>/<user-hash-prefix>/terminal-watch-sessions/<watch-id>.json
140
+ ```
141
+
142
+ If a command is clearly invalid, such as a pasted prompt (`memvora> python --version`) or a shell "not recognized" error, the CLI skips storing it as an event.
143
+
144
+ ## Storage, meaning, and dedupe
145
+
146
+ The CLI stores three related records:
147
+
148
+ - readable event files in `events/`, `outbox/`, `sent/`, and backend `terminal-events/`
149
+ - readable mapping in `terminal-dictionary.json`
150
+ - readable named watch sessions in `dictionary/watch-sessions/`
151
+
152
+ Event files contain readable fields such as `command`, `stdout`, `stderr`, `output`, and `cwd`, plus `command_hash`, `output_hash`, and `event_hash` for dedupe.
153
+
154
+ The dictionary contains:
155
+
156
+ - `commands[command_hash].command`
157
+ - `outputs[output_hash].stdout`
158
+ - `outputs[output_hash].stderr`
159
+ - `events[event_hash].command`
160
+ - `events[event_hash].stdout`
161
+ - `events[event_hash].stderr`
162
+ - `watch_sessions[watch_id].watch_name`
163
+ - `watch_sessions[watch_id].event_hashes`
164
+
165
+ If the same command produces the same output again, the CLI keeps one event hash and increments `duplicate_count`.
166
+
167
+ ## Excluded commands
168
+
169
+ Long-running development commands are not captured by default. They still run, but no hash event is stored.
170
+
171
+ Default excluded patterns include:
172
+
173
+ - `npm run ...`
174
+ - `next dev`
175
+ - `vite`
176
+ - `uvicorn --reload`
177
+ - `python -m uvicorn ... --reload`
178
+
179
+ Use `--include-excluded` on `run` or `watch` if you need to capture them anyway.
180
+
181
+ ## Publish
182
+
183
+ After this folder is pushed as its own public GitHub repo, publish to PyPI with:
184
+
185
+ ```powershell
186
+ .\scripts\publish.ps1 -Repository pypi
187
+ ```
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ bin/watch.cmd
5
+ src/memvora.egg-info/PKG-INFO
6
+ src/memvora.egg-info/SOURCES.txt
7
+ src/memvora.egg-info/dependency_links.txt
8
+ src/memvora.egg-info/entry_points.txt
9
+ src/memvora.egg-info/top_level.txt
10
+ src/memvora_cli/__init__.py
11
+ src/memvora_cli/__main__.py
12
+ src/memvora_cli/cli.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ memvora = memvora_cli.cli:main
@@ -0,0 +1 @@
1
+ memvora_cli
@@ -0,0 +1,3 @@
1
+ """Memvora terminal capture CLI."""
2
+
3
+ __version__ = "0.1.13"
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())