memvora 0.1.13__py3-none-any.whl
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.data/scripts/watch.cmd +7 -0
- memvora-0.1.13.dist-info/METADATA +187 -0
- memvora-0.1.13.dist-info/RECORD +10 -0
- memvora-0.1.13.dist-info/WHEEL +5 -0
- memvora-0.1.13.dist-info/entry_points.txt +2 -0
- memvora-0.1.13.dist-info/licenses/LICENSE +21 -0
- memvora-0.1.13.dist-info/top_level.txt +1 -0
- memvora_cli/__init__.py +3 -0
- memvora_cli/__main__.py +4 -0
- memvora_cli/cli.py +1819 -0
|
@@ -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,10 @@
|
|
|
1
|
+
memvora-0.1.13.data/scripts/watch.cmd,sha256=adD8jt2ZsNLV_iQhXNapHFXCvb4FTlGczqqaZF2rzZ8,154
|
|
2
|
+
memvora-0.1.13.dist-info/licenses/LICENSE,sha256=f-IZkKQVQoWUKAQZ9wvBSiyToBxTSYA_8E2eqiN8A5w,1064
|
|
3
|
+
memvora_cli/__init__.py,sha256=E5BD9Kk3Tue2DSQSA8sZUmSnPIGgAo0sLileP_EUrUo,60
|
|
4
|
+
memvora_cli/__main__.py,sha256=MHKZ_ae3fSLGTLUUMOx15fWdeOnJSHhq-zslRP5F5Lc,79
|
|
5
|
+
memvora_cli/cli.py,sha256=DNlt7G_sBt4mriMoFiHS3HQw72coHhlrWTktYaj-2eE,67384
|
|
6
|
+
memvora-0.1.13.dist-info/METADATA,sha256=mNZZkC57J_LwITY5evPUl3Nlz2cH2JQKzfX8w_7IMko,7152
|
|
7
|
+
memvora-0.1.13.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
8
|
+
memvora-0.1.13.dist-info/entry_points.txt,sha256=A8TuV6enRWQ9UAzGeiflY_llSkYY4X92KHwkqsPoZmI,49
|
|
9
|
+
memvora-0.1.13.dist-info/top_level.txt,sha256=-TZgBNbOiNx0qXxabfvAClO8Ga5DuvEgayqMDuuTfzQ,12
|
|
10
|
+
memvora-0.1.13.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
memvora_cli
|
memvora_cli/__init__.py
ADDED
memvora_cli/__main__.py
ADDED