cli-mem 0.1.0__tar.gz → 0.2.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.
Files changed (31) hide show
  1. {cli_mem-0.1.0 → cli_mem-0.2.0}/.github/workflows/release.yml +13 -0
  2. {cli_mem-0.1.0 → cli_mem-0.2.0}/PKG-INFO +1 -1
  3. {cli_mem-0.1.0 → cli_mem-0.2.0}/hooks/mem.zsh +3 -3
  4. {cli_mem-0.1.0 → cli_mem-0.2.0}/pyproject.toml +1 -1
  5. {cli_mem-0.1.0 → cli_mem-0.2.0}/src/mem/__init__.py +1 -1
  6. cli_mem-0.2.0/src/mem/cli.py +813 -0
  7. cli_mem-0.2.0/src/mem/groups.py +315 -0
  8. {cli_mem-0.1.0 → cli_mem-0.2.0}/src/mem/models.py +31 -0
  9. {cli_mem-0.1.0 → cli_mem-0.2.0}/src/mem/storage.py +48 -1
  10. {cli_mem-0.1.0 → cli_mem-0.2.0}/tests/conftest.py +4 -0
  11. cli_mem-0.2.0/tests/test_groups.py +1224 -0
  12. cli_mem-0.1.0/src/mem/cli.py +0 -342
  13. {cli_mem-0.1.0 → cli_mem-0.2.0}/.github/workflows/ci.yml +0 -0
  14. {cli_mem-0.1.0 → cli_mem-0.2.0}/.gitignore +0 -0
  15. {cli_mem-0.1.0 → cli_mem-0.2.0}/ARCHITECTURE.md +0 -0
  16. {cli_mem-0.1.0 → cli_mem-0.2.0}/LICENSE +0 -0
  17. {cli_mem-0.1.0 → cli_mem-0.2.0}/PHILOSOPHY.md +0 -0
  18. {cli_mem-0.1.0 → cli_mem-0.2.0}/README.md +0 -0
  19. {cli_mem-0.1.0 → cli_mem-0.2.0}/assets/.gitkeep +0 -0
  20. {cli_mem-0.1.0 → cli_mem-0.2.0}/docs/decisions/001-jsonl-over-sqlite.md +0 -0
  21. {cli_mem-0.1.0 → cli_mem-0.2.0}/docs/decisions/002-apple-fm-sdk-for-patterns.md +0 -0
  22. {cli_mem-0.1.0 → cli_mem-0.2.0}/docs/decisions/003-no-daemon.md +0 -0
  23. {cli_mem-0.1.0 → cli_mem-0.2.0}/docs/decisions/004-per-repo-jsonl.md +0 -0
  24. {cli_mem-0.1.0 → cli_mem-0.2.0}/install.sh +0 -0
  25. {cli_mem-0.1.0 → cli_mem-0.2.0}/src/mem/capture.py +0 -0
  26. {cli_mem-0.1.0 → cli_mem-0.2.0}/src/mem/patterns.py +0 -0
  27. {cli_mem-0.1.0 → cli_mem-0.2.0}/src/mem/search.py +0 -0
  28. {cli_mem-0.1.0 → cli_mem-0.2.0}/tests/test_capture.py +0 -0
  29. {cli_mem-0.1.0 → cli_mem-0.2.0}/tests/test_patterns.py +0 -0
  30. {cli_mem-0.1.0 → cli_mem-0.2.0}/tests/test_search.py +0 -0
  31. {cli_mem-0.1.0 → cli_mem-0.2.0}/tests/test_storage.py +0 -0
@@ -14,6 +14,19 @@ jobs:
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
 
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+
21
+ - name: Build and publish to PyPI
22
+ env:
23
+ TWINE_USERNAME: __token__
24
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
25
+ run: |
26
+ pip install build twine
27
+ python -m build
28
+ twine upload dist/*
29
+
17
30
  - name: Create GitHub Release
18
31
  env:
19
32
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-mem
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Privacy-first CLI that turns shell history into searchable memory
5
5
  Project-URL: GitHub, https://github.com/matinsaurralde/mem
6
6
  Author: Matias Insaurralde
@@ -10,14 +10,14 @@
10
10
 
11
11
  _mem_preexec() {
12
12
  _mem_cmd="$1"
13
- _mem_start=$(date +%s%3N)
13
+ _mem_start=$SECONDS
14
14
  }
15
15
 
16
16
  _mem_precmd() {
17
17
  local exit_code=$?
18
18
  if [[ -n "$_mem_cmd" ]]; then
19
- local end=$(date +%s%3N)
20
- local duration=$(( end - _mem_start ))
19
+ integer duration
20
+ (( duration = (SECONDS - _mem_start) * 1000 ))
21
21
  mem _capture "$_mem_cmd" "$PWD" "$exit_code" "$duration" 2>/dev/null &!
22
22
  _mem_cmd=""
23
23
  fi
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cli-mem"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "Privacy-first CLI that turns shell history into searchable memory"
9
9
  license = "MIT"
10
10
  readme = "README.md"
@@ -1,3 +1,3 @@
1
1
  """mem — your shell history, understood."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.2.0"