nmem-cli 0.5.9__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.
@@ -0,0 +1 @@
1
+ config.env
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.4
2
+ Name: nmem-cli
3
+ Version: 0.5.9
4
+ Summary: CLI and TUI for Nowledge Mem - AI memory management
5
+ Project-URL: Homepage, https://github.com/nowledge-co/mem
6
+ Project-URL: Repository, https://github.com/nowledge-co/mem
7
+ Project-URL: Documentation, https://github.com/nowledge-co/mem#readme
8
+ Author: Nowledge Labs
9
+ License-Expression: MIT
10
+ Keywords: ai,cli,knowledge-graph,mcp,memory,tui
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: httpx>=0.25.0
23
+ Requires-Dist: pyperclip>=1.9.0
24
+ Requires-Dist: rich>=13.0.0
25
+ Requires-Dist: textual>=0.50.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: black>=23.0.0; extra == 'dev'
28
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
29
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # nmem-cli
34
+
35
+ A lightweight CLI and TUI for [Nowledge Mem](https://github.com/nowledge-co/mem) - AI memory management that works with any AI agent.
36
+
37
+ ## Installation Options
38
+
39
+ ### Option 1: Standalone PyPI Package (Recommended for CLI-only users)
40
+
41
+ ```bash
42
+ pip install nmem-cli
43
+ ```
44
+
45
+ Or with uv:
46
+ ```bash
47
+ uv pip install nmem-cli
48
+ ```
49
+
50
+ ### Option 2: Nowledge Mem Desktop App
51
+
52
+ If you're using the [Nowledge Mem desktop app](https://github.com/nowledge-co/mem), the `nmem` CLI is bundled and can be installed via:
53
+ - **macOS**: Settings → Install CLI (creates `/usr/local/bin/nmem`)
54
+ - **Linux**: Automatically installed via package postinstall
55
+ - **Windows**: Automatically added to PATH during installation
56
+
57
+ The desktop app includes a bundled Python environment, so no separate Python installation is required.
58
+
59
+ ## Requirements
60
+
61
+ - Python 3.11+ (for PyPI package)
62
+ - A running Nowledge Mem server (default: `http://127.0.0.1:14242`)
63
+
64
+ ## Quick Start
65
+
66
+ ```bash
67
+ # Check server status
68
+ nmem status
69
+
70
+ # Launch interactive TUI
71
+ nmem tui
72
+
73
+ # List memories
74
+ nmem m
75
+
76
+ # Search memories
77
+ nmem m search "python programming"
78
+
79
+ # List threads
80
+ nmem t
81
+ ```
82
+
83
+ ## Commands
84
+
85
+ ### Core Commands
86
+
87
+ | Command | Description |
88
+ |---------|-------------|
89
+ | `nmem status` | Check server connection status |
90
+ | `nmem stats` | Show database statistics |
91
+ | `nmem tui` | Launch interactive terminal UI |
92
+
93
+ ### Memory Commands
94
+
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `nmem m` / `nmem memories` | List recent memories |
98
+ | `nmem m search "query"` | Search memories |
99
+ | `nmem m show <id>` | Show memory details |
100
+ | `nmem m add "content"` | Add a new memory |
101
+ | `nmem m update <id>` | Update a memory |
102
+ | `nmem m delete <id>` | Delete a memory |
103
+
104
+ ### Thread Commands
105
+
106
+ | Command | Description |
107
+ |---------|-------------|
108
+ | `nmem t` / `nmem threads` | List threads |
109
+ | `nmem t search "query"` | Search threads |
110
+ | `nmem t show <id>` | Show thread with messages |
111
+ | `nmem t create -t "Title" -c "content"` | Create a thread |
112
+ | `nmem t delete <id>` | Delete a thread |
113
+
114
+ ## Options
115
+
116
+ ### Global Options
117
+
118
+ ```bash
119
+ nmem --json <command> # Output in JSON format (for scripting)
120
+ nmem --api-url <url> # Override API URL
121
+ nmem --version # Show version
122
+ ```
123
+
124
+ ### Search Filters (memories)
125
+
126
+ ```bash
127
+ nmem m search "query" -l label1 -l label2 # Filter by labels
128
+ nmem m search "query" -t week # Time range: today/week/month/year
129
+ nmem m search "query" --importance 0.7 # Minimum importance
130
+ ```
131
+
132
+ ## Environment Variables
133
+
134
+ | Variable | Description | Default |
135
+ |----------|-------------|---------|
136
+ | `NMEM_API_URL` | API server URL | `http://127.0.0.1:14242` |
137
+
138
+ ## TUI Features
139
+
140
+ The interactive TUI provides:
141
+
142
+ - **Dashboard**: Overview with statistics and recent activity
143
+ - **Memories**: Browse, search, and manage memories
144
+ - **Threads**: View conversation threads
145
+ - **Graph**: Explore the knowledge graph
146
+ - **Settings**: Configure the application
147
+
148
+ ### TUI Keybindings
149
+
150
+ | Key | Action |
151
+ |-----|--------|
152
+ | `1-5` | Switch tabs |
153
+ | `/` | Focus search |
154
+ | `?` | Show help |
155
+ | `q` | Quit |
156
+
157
+ ## Examples
158
+
159
+ ### Script Integration (JSON mode)
160
+
161
+ ```bash
162
+ # Get memories as JSON
163
+ nmem --json m search "meeting notes" | jq '.memories[].title'
164
+
165
+ # Check if server is running
166
+ if nmem --json status | jq -e '.status == "ok"' > /dev/null; then
167
+ echo "Server is running"
168
+ fi
169
+ ```
170
+
171
+ ### Adding Memories
172
+
173
+ ```bash
174
+ # Simple memory
175
+ nmem m add "Remember to review the PR tomorrow"
176
+
177
+ # With title and importance
178
+ nmem m add "The deployment process requires SSH access" \
179
+ -t "Deployment Notes" \
180
+ -i 0.8
181
+ ```
182
+
183
+ ### Creating Threads
184
+
185
+ ```bash
186
+ # From content
187
+ nmem t create -t "Debug Session" -c "Started investigating the memory leak"
188
+
189
+ # From file
190
+ nmem t create -t "Code Review" -f review-notes.md
191
+ ```
192
+
193
+ ## Related
194
+
195
+ - [Nowledge Mem](https://github.com/nowledge-co/mem) - The full Nowledge Mem application
196
+ - This CLI is also bundled with the main Nowledge Mem desktop app
197
+
198
+ ## Author
199
+
200
+ [Nowledge Labs](https://github.com/nowledge-co)
201
+
202
+ ## License
203
+
204
+ MIT
@@ -0,0 +1,172 @@
1
+ # nmem-cli
2
+
3
+ A lightweight CLI and TUI for [Nowledge Mem](https://github.com/nowledge-co/mem) - AI memory management that works with any AI agent.
4
+
5
+ ## Installation Options
6
+
7
+ ### Option 1: Standalone PyPI Package (Recommended for CLI-only users)
8
+
9
+ ```bash
10
+ pip install nmem-cli
11
+ ```
12
+
13
+ Or with uv:
14
+ ```bash
15
+ uv pip install nmem-cli
16
+ ```
17
+
18
+ ### Option 2: Nowledge Mem Desktop App
19
+
20
+ If you're using the [Nowledge Mem desktop app](https://github.com/nowledge-co/mem), the `nmem` CLI is bundled and can be installed via:
21
+ - **macOS**: Settings → Install CLI (creates `/usr/local/bin/nmem`)
22
+ - **Linux**: Automatically installed via package postinstall
23
+ - **Windows**: Automatically added to PATH during installation
24
+
25
+ The desktop app includes a bundled Python environment, so no separate Python installation is required.
26
+
27
+ ## Requirements
28
+
29
+ - Python 3.11+ (for PyPI package)
30
+ - A running Nowledge Mem server (default: `http://127.0.0.1:14242`)
31
+
32
+ ## Quick Start
33
+
34
+ ```bash
35
+ # Check server status
36
+ nmem status
37
+
38
+ # Launch interactive TUI
39
+ nmem tui
40
+
41
+ # List memories
42
+ nmem m
43
+
44
+ # Search memories
45
+ nmem m search "python programming"
46
+
47
+ # List threads
48
+ nmem t
49
+ ```
50
+
51
+ ## Commands
52
+
53
+ ### Core Commands
54
+
55
+ | Command | Description |
56
+ |---------|-------------|
57
+ | `nmem status` | Check server connection status |
58
+ | `nmem stats` | Show database statistics |
59
+ | `nmem tui` | Launch interactive terminal UI |
60
+
61
+ ### Memory Commands
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `nmem m` / `nmem memories` | List recent memories |
66
+ | `nmem m search "query"` | Search memories |
67
+ | `nmem m show <id>` | Show memory details |
68
+ | `nmem m add "content"` | Add a new memory |
69
+ | `nmem m update <id>` | Update a memory |
70
+ | `nmem m delete <id>` | Delete a memory |
71
+
72
+ ### Thread Commands
73
+
74
+ | Command | Description |
75
+ |---------|-------------|
76
+ | `nmem t` / `nmem threads` | List threads |
77
+ | `nmem t search "query"` | Search threads |
78
+ | `nmem t show <id>` | Show thread with messages |
79
+ | `nmem t create -t "Title" -c "content"` | Create a thread |
80
+ | `nmem t delete <id>` | Delete a thread |
81
+
82
+ ## Options
83
+
84
+ ### Global Options
85
+
86
+ ```bash
87
+ nmem --json <command> # Output in JSON format (for scripting)
88
+ nmem --api-url <url> # Override API URL
89
+ nmem --version # Show version
90
+ ```
91
+
92
+ ### Search Filters (memories)
93
+
94
+ ```bash
95
+ nmem m search "query" -l label1 -l label2 # Filter by labels
96
+ nmem m search "query" -t week # Time range: today/week/month/year
97
+ nmem m search "query" --importance 0.7 # Minimum importance
98
+ ```
99
+
100
+ ## Environment Variables
101
+
102
+ | Variable | Description | Default |
103
+ |----------|-------------|---------|
104
+ | `NMEM_API_URL` | API server URL | `http://127.0.0.1:14242` |
105
+
106
+ ## TUI Features
107
+
108
+ The interactive TUI provides:
109
+
110
+ - **Dashboard**: Overview with statistics and recent activity
111
+ - **Memories**: Browse, search, and manage memories
112
+ - **Threads**: View conversation threads
113
+ - **Graph**: Explore the knowledge graph
114
+ - **Settings**: Configure the application
115
+
116
+ ### TUI Keybindings
117
+
118
+ | Key | Action |
119
+ |-----|--------|
120
+ | `1-5` | Switch tabs |
121
+ | `/` | Focus search |
122
+ | `?` | Show help |
123
+ | `q` | Quit |
124
+
125
+ ## Examples
126
+
127
+ ### Script Integration (JSON mode)
128
+
129
+ ```bash
130
+ # Get memories as JSON
131
+ nmem --json m search "meeting notes" | jq '.memories[].title'
132
+
133
+ # Check if server is running
134
+ if nmem --json status | jq -e '.status == "ok"' > /dev/null; then
135
+ echo "Server is running"
136
+ fi
137
+ ```
138
+
139
+ ### Adding Memories
140
+
141
+ ```bash
142
+ # Simple memory
143
+ nmem m add "Remember to review the PR tomorrow"
144
+
145
+ # With title and importance
146
+ nmem m add "The deployment process requires SSH access" \
147
+ -t "Deployment Notes" \
148
+ -i 0.8
149
+ ```
150
+
151
+ ### Creating Threads
152
+
153
+ ```bash
154
+ # From content
155
+ nmem t create -t "Debug Session" -c "Started investigating the memory leak"
156
+
157
+ # From file
158
+ nmem t create -t "Code Review" -f review-notes.md
159
+ ```
160
+
161
+ ## Related
162
+
163
+ - [Nowledge Mem](https://github.com/nowledge-co/mem) - The full Nowledge Mem application
164
+ - This CLI is also bundled with the main Nowledge Mem desktop app
165
+
166
+ ## Author
167
+
168
+ [Nowledge Labs](https://github.com/nowledge-co)
169
+
170
+ ## License
171
+
172
+ MIT
@@ -0,0 +1,79 @@
1
+ [project]
2
+ name = "nmem-cli"
3
+ version = "0.5.9"
4
+ description = "CLI and TUI for Nowledge Mem - AI memory management"
5
+ authors = [
6
+ {name = "Nowledge Labs"}
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.11"
10
+ license = "MIT"
11
+ keywords = ["cli", "tui", "memory", "ai", "knowledge-graph", "mcp"]
12
+ classifiers = [
13
+ "Development Status :: 4 - Beta",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Utilities",
23
+ ]
24
+ dependencies = [
25
+ # CLI framework and output
26
+ "rich>=13.0.0",
27
+ # HTTP client for API communication
28
+ "httpx>=0.25.0",
29
+ # TUI framework
30
+ "textual>=0.50.0",
31
+ # Clipboard support
32
+ "pyperclip>=1.9.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "pytest>=7.4.0",
38
+ "pytest-asyncio>=0.21.0",
39
+ "black>=23.0.0",
40
+ "ruff>=0.1.0",
41
+ ]
42
+
43
+ [project.scripts]
44
+ nmem = "nmem_cli:main"
45
+
46
+ [project.urls]
47
+ Homepage = "https://github.com/nowledge-co/mem"
48
+ Repository = "https://github.com/nowledge-co/mem"
49
+ Documentation = "https://github.com/nowledge-co/mem#readme"
50
+
51
+ [build-system]
52
+ requires = ["hatchling"]
53
+ build-backend = "hatchling.build"
54
+
55
+ [tool.hatch.build.targets.wheel]
56
+ packages = ["src/nmem_cli"]
57
+
58
+ [tool.hatch.build.targets.sdist]
59
+ include = [
60
+ "/src",
61
+ "/README.md",
62
+ ]
63
+
64
+ [tool.black]
65
+ line-length = 88
66
+ target-version = ['py311']
67
+
68
+ [tool.ruff]
69
+ target-version = "py311"
70
+ line-length = 88
71
+ lint.select = [
72
+ "E", # pycodestyle errors
73
+ "W", # pycodestyle warnings
74
+ "F", # pyflakes
75
+ "I", # isort
76
+ "B", # flake8-bugbear
77
+ "C4", # flake8-comprehensions
78
+ "UP", # pyupgrade
79
+ ]
@@ -0,0 +1,24 @@
1
+ """
2
+ nmem-cli - CLI and TUI for Nowledge Mem
3
+
4
+ A lightweight command-line interface and terminal UI for interacting
5
+ with the Nowledge Mem server.
6
+
7
+ Usage:
8
+ nmem status Check server connection
9
+ nmem stats Show database statistics
10
+ nmem tui Launch interactive TUI
11
+ nmem m List memories (alias for 'memories')
12
+ nmem m search "q" Search memories
13
+ nmem t List threads (alias for 'threads')
14
+
15
+ Environment:
16
+ NMEM_API_URL Override API URL (default: http://127.0.0.1:14242)
17
+ """
18
+
19
+ __version__ = "0.5.9"
20
+ __author__ = "Nowledge Labs"
21
+
22
+ from .cli import main
23
+
24
+ __all__ = ["__version__", "main"]