Skip to content

Commit 81f5bca

Browse files
mstuartclaude
andcommitted
Initial release of Code Memory v0.1.0
Persistent memory for AI coding with: - Semantic search (fastembed + tantivy) - Git history analysis with decision extraction - Dependency graph analyzer (16 languages) - Session tracking and pattern learning - MCP server with 7 tools - CLI with 8 commands Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0 parents  commit 81f5bca

42 files changed

Lines changed: 11667 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- run: cargo check
16+
17+
test:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: dtolnay/rust-toolchain@stable
22+
- run: cargo test
23+
24+
clippy:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dtolnay/rust-toolchain@stable
29+
with:
30+
components: clippy
31+
- run: cargo clippy -- -D warnings
32+
33+
format:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dtolnay/rust-toolchain@stable
38+
with:
39+
components: rustfmt
40+
- run: cargo fmt --check

.github/workflows/ci.yml.bak

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- run: cargo check
16+
17+
test:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: dtolnay/rust-toolchain@stable
22+
- run: cargo test
23+
24+
clippy:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dtolnay/rust-toolchain@stable
29+
with:
30+
components: clippy
31+
- run: cargo clippy -- -D warnings
32+
33+
format:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dtolnay/rust-toolchain@stable
38+
with:
39+
components: rustfmt
40+
- run: cargo fmt --check

.github/workflows/release.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: macos-latest
17+
target: x86_64-apple-darwin
18+
artifact: code-memory
19+
- os: macos-latest
20+
target: aarch64-apple-darwin
21+
artifact: code-memory
22+
- os: ubuntu-latest
23+
target: x86_64-unknown-linux-gnu
24+
artifact: code-memory
25+
- os: ubuntu-latest
26+
target: aarch64-unknown-linux-gnu
27+
artifact: code-memory
28+
- os: windows-latest
29+
target: x86_64-pc-windows-msvc
30+
artifact: code-memory.exe
31+
32+
runs-on: ${{ matrix.os }}
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@stable
39+
with:
40+
targets: ${{ matrix.target }}
41+
42+
- name: Install cross-compilation tools (Linux ARM64)
43+
if: matrix.target == 'aarch64-unknown-linux-gnu'
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
47+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
48+
49+
- name: Build
50+
run: cargo build --release --target ${{ matrix.target }}
51+
52+
- name: Package (Unix)
53+
if: runner.os != 'Windows'
54+
run: |
55+
cd target/${{ matrix.target }}/release
56+
tar czf ../../../code-memory-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.artifact }}
57+
58+
- name: Package (Windows)
59+
if: runner.os == 'Windows'
60+
run: |
61+
cd target/${{ matrix.target }}/release
62+
7z a ../../../code-memory-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.artifact }}
63+
64+
- name: Upload artifact
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: code-memory-${{ matrix.target }}
68+
path: code-memory-${{ github.ref_name }}-${{ matrix.target }}.*
69+
70+
release:
71+
needs: build
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Download all artifacts
77+
uses: actions/download-artifact@v4
78+
with:
79+
path: artifacts
80+
81+
- name: Create GitHub Release
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
files: artifacts/**/*
85+
generate_release_notes: true
86+
87+
publish-npm:
88+
needs: release
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@v4
92+
93+
- uses: actions/setup-node@v4
94+
with:
95+
node-version: '20'
96+
registry-url: 'https://registry.npmjs.org'
97+
98+
- name: Update npm package version
99+
run: |
100+
cd npm
101+
VERSION="${{ github.ref_name }}"
102+
VERSION="${VERSION#v}"
103+
node -e "const p=require('./package.json');p.version='${VERSION}';require('fs').writeFileSync('./package.json',JSON.stringify(p,null,2)+'\n')"
104+
105+
- name: Publish to npm
106+
run: cd npm && npm publish --access public
107+
env:
108+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml.bak

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: macos-latest
17+
target: x86_64-apple-darwin
18+
artifact: claude-context
19+
- os: macos-latest
20+
target: aarch64-apple-darwin
21+
artifact: claude-context
22+
- os: ubuntu-latest
23+
target: x86_64-unknown-linux-gnu
24+
artifact: claude-context
25+
- os: ubuntu-latest
26+
target: aarch64-unknown-linux-gnu
27+
artifact: claude-context
28+
- os: windows-latest
29+
target: x86_64-pc-windows-msvc
30+
artifact: claude-context.exe
31+
32+
runs-on: ${{ matrix.os }}
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@stable
39+
with:
40+
targets: ${{ matrix.target }}
41+
42+
- name: Install cross-compilation tools (Linux ARM64)
43+
if: matrix.target == 'aarch64-unknown-linux-gnu'
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
47+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
48+
49+
- name: Build
50+
run: cargo build --release --target ${{ matrix.target }}
51+
52+
- name: Package (Unix)
53+
if: runner.os != 'Windows'
54+
run: |
55+
cd target/${{ matrix.target }}/release
56+
tar czf ../../../claude-context-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.artifact }}
57+
58+
- name: Package (Windows)
59+
if: runner.os == 'Windows'
60+
run: |
61+
cd target/${{ matrix.target }}/release
62+
7z a ../../../claude-context-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.artifact }}
63+
64+
- name: Upload artifact
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: claude-context-${{ matrix.target }}
68+
path: claude-context-${{ github.ref_name }}-${{ matrix.target }}.*
69+
70+
release:
71+
needs: build
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Download all artifacts
77+
uses: actions/download-artifact@v4
78+
with:
79+
path: artifacts
80+
81+
- name: Create GitHub Release
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
files: artifacts/**/*
85+
generate_release_notes: true
86+
87+
publish-npm:
88+
needs: release
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@v4
92+
93+
- uses: actions/setup-node@v4
94+
with:
95+
node-version: '20'
96+
registry-url: 'https://registry.npmjs.org'
97+
98+
- name: Update npm package version
99+
run: |
100+
cd npm
101+
VERSION="${{ github.ref_name }}"
102+
VERSION="${VERSION#v}"
103+
node -e "const p=require('./package.json');p.version='${VERSION}';require('fs').writeFileSync('./package.json',JSON.stringify(p,null,2)+'\n')"
104+
105+
- name: Publish to npm
106+
run: cd npm && npm publish --access public
107+
env:
108+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)