oh-my-til 0.7.0
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.
- package/LICENSE +21 -0
- package/README.ko.md +209 -0
- package/README.md +209 -0
- package/dist/cli.js +39548 -0
- package/main.js +47918 -0
- package/manifest.json +10 -0
- package/package.json +63 -0
- package/styles.css +664 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SongYunSeop
|
|
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.
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Oh My TIL
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://obsidian.md)
|
|
5
|
+
[](https://github.com/SongYunSeop/oh-my-til/releases)
|
|
6
|
+
|
|
7
|
+
[English](README.md) | **한국어**
|
|
8
|
+
|
|
9
|
+
AI 기반 TIL(Today I Learned) 학습 워크플로우를 위한 Claude Code 플러그인입니다. 독립 CLI(`npx oh-my-til`)로 실행하거나, Obsidian 플러그인으로 사이드바에 Claude Code 터미널을 임베딩하여 사용할 수 있습니다.
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## 기능
|
|
14
|
+
|
|
15
|
+
- **터미널 임베딩** — Obsidian 사이드바에서 Claude Code 터미널 실행 (xterm.js + node-pty)
|
|
16
|
+
- **MCP 서버 내장** — Claude Code가 HTTP로 vault에 직접 접근 (별도 플러그인 불필요)
|
|
17
|
+
- **학습 대시보드** — TIL 통계, 카테고리별 학습 현황을 한눈에
|
|
18
|
+
- **스킬 자동 설치** — `/til`, `/research`, `/backlog`, `/save`, `/migrate-links` 명령을 바로 사용 가능
|
|
19
|
+
- **마크다운 링크 감지** — 터미널의 `[텍스트](경로)` 링크를 클릭하면 노트 열기 (CJK 문자 지원)
|
|
20
|
+
- **백로그 → TIL 연동** — 빈 백로그 링크 클릭 시 TIL 학습 세션 시작 제안
|
|
21
|
+
- **파일 자동 열기** — 새로 생성된 TIL 파일을 에디터에서 자동으로 열기
|
|
22
|
+
|
|
23
|
+
## 핵심 흐름
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
커맨드 팔레트 → 터미널 열기 → Claude Code 자동 시작
|
|
27
|
+
→ /til, /backlog, /research, /save, /dashboard, /migrate-links 스킬 실행
|
|
28
|
+
→ Claude가 리서치 → 대화형 학습 → TIL 마크다운 저장
|
|
29
|
+
→ 새 파일 감지 → 에디터에서 자동 열기
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Standalone 사용법 (Obsidian 없이)
|
|
33
|
+
|
|
34
|
+
`npx`로 Obsidian 없이 MCP 서버를 설치하고 실행할 수 있습니다:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx oh-my-til init # 스킬/규칙/CLAUDE.md 섹션 설치
|
|
38
|
+
npx oh-my-til serve # MCP 서버 시작 (기본 포트 22360)
|
|
39
|
+
npx oh-my-til serve --port 3000 --til-path my-til
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
이후 Claude Code에서 MCP 서버를 연결합니다:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
claude mcp add --transport http oh-my-til http://localhost:22360/mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 시작하기 (Obsidian 플러그인)
|
|
49
|
+
|
|
50
|
+
### 요구 사항
|
|
51
|
+
|
|
52
|
+
- [Obsidian](https://obsidian.md) v1.5.0 이상
|
|
53
|
+
- [Node.js](https://nodejs.org) 18 이상
|
|
54
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude`)
|
|
55
|
+
|
|
56
|
+
### 설치
|
|
57
|
+
|
|
58
|
+
#### 방법 A: Claude Code (권장)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/SongYunSeop/oh-my-til.git
|
|
62
|
+
cd oh-my-til
|
|
63
|
+
claude
|
|
64
|
+
# 실행 후: /install-plugin /path/to/your/vault
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Claude Code가 Electron 버전을 자동 감지하고 네이티브 모듈 재빌드를 처리합니다.
|
|
68
|
+
|
|
69
|
+
#### 방법 B: 수동 설치
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git clone https://github.com/SongYunSeop/oh-my-til.git
|
|
73
|
+
cd oh-my-til
|
|
74
|
+
npm install
|
|
75
|
+
ELECTRON_VERSION=<Electron-버전> npm run deploy -- /path/to/your/vault
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
> Electron 버전 확인: Obsidian 개발자 도구(Ctrl+Shift+I)에서 `process.versions.electron` 실행
|
|
79
|
+
|
|
80
|
+
Obsidian을 재시작한 뒤 설정 > Community plugins에서 **Oh My TIL**을 활성화합니다.
|
|
81
|
+
|
|
82
|
+
### MCP 서버 연결 (선택)
|
|
83
|
+
|
|
84
|
+
플러그인이 HTTP 기반 MCP 서버를 내장하고 있어 Claude Code가 vault에 직접 접근할 수 있습니다:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
claude mcp add --transport http oh-my-til http://localhost:22360/mcp
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 설정
|
|
91
|
+
|
|
92
|
+
| 설정 | 기본값 | 설명 |
|
|
93
|
+
|------|--------|------|
|
|
94
|
+
| Shell 경로 | 시스템 기본 셸 | 터미널에서 사용할 셸 |
|
|
95
|
+
| Claude 자동 실행 | `true` | 터미널 열릴 때 `claude` 명령 자동 실행 |
|
|
96
|
+
| 이전 세션 재개 | `false` | 이전 Claude 세션 이어서 시작 (`--continue`) |
|
|
97
|
+
| 글꼴 크기 | `13` | 터미널 글꼴 크기 (px) |
|
|
98
|
+
| 글꼴 | `Menlo` | 터미널 글꼴 (Menlo, SF Mono, Fira Code, JetBrains Mono 등) |
|
|
99
|
+
| 행간 | `1.0` | 터미널 행간 (1.0 = 기본, 최대 2.0) |
|
|
100
|
+
| 새 TIL 파일 자동 열기 | `true` | til/ 폴더에 새 파일 생성 시 자동 오픈 |
|
|
101
|
+
| MCP 서버 활성화 | `true` | 내장 MCP 서버 실행 여부 |
|
|
102
|
+
| MCP 포트 | `22360` | MCP 서버 포트 |
|
|
103
|
+
|
|
104
|
+
## MCP 도구
|
|
105
|
+
|
|
106
|
+
MCP 서버 연결 시 Claude Code에서 사용할 수 있는 도구:
|
|
107
|
+
|
|
108
|
+
| 도구 | 설명 |
|
|
109
|
+
|------|------|
|
|
110
|
+
| `vault_read_note` | 경로로 노트 내용 읽기 |
|
|
111
|
+
| `vault_list_files` | 폴더 내 파일 목록 (필터링 가능) |
|
|
112
|
+
| `vault_search` | vault 전체 텍스트 검색 |
|
|
113
|
+
| `vault_get_active_file` | 현재 열린 파일 가져오기 |
|
|
114
|
+
| `til_list` | 카테고리별 TIL 파일 목록 |
|
|
115
|
+
| `til_backlog_status` | 백로그 진행률 요약 (체크박스 카운트) |
|
|
116
|
+
| `til_get_context` | 주제 관련 기존 학습 컨텍스트 (파일, 링크 관계, 미작성 주제) |
|
|
117
|
+
| `til_recent_context` | 최근 학습 활동을 날짜별로 조회 |
|
|
118
|
+
|
|
119
|
+
## Claude 스킬
|
|
120
|
+
|
|
121
|
+
플러그인이 `.claude/skills/`에 자동 설치하는 스킬:
|
|
122
|
+
|
|
123
|
+
| 스킬 | 명령 | 설명 |
|
|
124
|
+
|------|------|------|
|
|
125
|
+
| **til** | `/til <주제> [카테고리]` | 주제 리서치 → 대화형 학습 → TIL 저장 |
|
|
126
|
+
| **research** | `/research <주제> [카테고리]` | 주제를 리서치하여 학습 백로그 생성 |
|
|
127
|
+
| **backlog** | `/backlog [카테고리]` | 학습 백로그 조회 및 진행 상황 요약 |
|
|
128
|
+
| **save** | *(/til에서 자동 호출)* | TIL 마크다운 저장 + Daily 노트, MOC, 백로그 연동 |
|
|
129
|
+
| **migrate-links** | `/migrate-links` | `[[wikilink]]`를 표준 마크다운 링크로 일괄 변환 |
|
|
130
|
+
|
|
131
|
+
## 개발
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm run dev # 워치 모드 (esbuild)
|
|
135
|
+
npm test # 테스트 실행 (vitest)
|
|
136
|
+
npm run rebuild-pty # Obsidian Electron용 node-pty 재빌드
|
|
137
|
+
npm run deploy -- /path # vault에 배포
|
|
138
|
+
npm run deploy -- --refresh-skills /path # 스킬/규칙 강제 재설치 포함
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### 프로젝트 구조
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
src/
|
|
145
|
+
├── core/ # 플랫폼 독립 순수 로직
|
|
146
|
+
│ ├── backlog.ts # 백로그 파싱/포맷 순수 함수
|
|
147
|
+
│ ├── context.ts # 학습 컨텍스트 헬퍼 (순수 함수)
|
|
148
|
+
│ ├── stats.ts # TIL 통계 순수 함수
|
|
149
|
+
│ ├── migrate-links.ts # Wikilink [[]] → [](path) 변환
|
|
150
|
+
│ ├── keyboard.ts # Shift+Enter → \n (멀티라인 지원)
|
|
151
|
+
│ ├── env.ts # macOS PATH 보정 (Homebrew)
|
|
152
|
+
│ ├── skills.ts # 버전 비교/플레이스홀더 치환 순수 함수
|
|
153
|
+
│ └── index.ts # barrel export
|
|
154
|
+
├── ports/ # 어댑터 인터페이스
|
|
155
|
+
│ ├── storage.ts # FileStorage 인터페이스
|
|
156
|
+
│ └── metadata.ts # MetadataProvider 인터페이스
|
|
157
|
+
├── adapters/ # 포트 구현체
|
|
158
|
+
│ ├── fs-adapter.ts # node:fs 기반 (standalone)
|
|
159
|
+
│ └── obsidian-adapter.ts # Obsidian App 기반
|
|
160
|
+
├── mcp/ # MCP 서버 (포트 의존, Obsidian 무관)
|
|
161
|
+
│ ├── server.ts # HTTP 서버 + Streamable HTTP 트랜스포트
|
|
162
|
+
│ └── tools.ts # MCP 도구 정의 (FileStorage + MetadataProvider 사용)
|
|
163
|
+
├── cli/ # 독립 CLI 진입점
|
|
164
|
+
│ └── index.ts # npx oh-my-til init / serve
|
|
165
|
+
└── obsidian/ # Obsidian 플랫폼 어댑터
|
|
166
|
+
├── main.ts # 플러그인 진입점
|
|
167
|
+
├── settings.ts # 설정 탭 + 인터페이스
|
|
168
|
+
├── watcher.ts # 파일 감시 → 에디터에서 열기
|
|
169
|
+
├── skills.ts # 스킬/규칙 자동 설치
|
|
170
|
+
├── terminal/
|
|
171
|
+
│ ├── TerminalView.ts # 사이드바 터미널 (ItemView + xterm.js)
|
|
172
|
+
│ ├── MarkdownLinkProvider.ts # 3개 ILinkProvider: 마크다운, 파일경로, OSC 8
|
|
173
|
+
│ └── pty.ts # PTY 프로세스 관리 (node-pty)
|
|
174
|
+
└── dashboard/
|
|
175
|
+
└── DashboardView.ts # 학습 대시보드 (ItemView)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### 기술 스택
|
|
179
|
+
|
|
180
|
+
| | |
|
|
181
|
+
|---|---|
|
|
182
|
+
| **런타임** | TypeScript, Obsidian Plugin API |
|
|
183
|
+
| **터미널** | xterm.js, node-pty |
|
|
184
|
+
| **MCP** | @modelcontextprotocol/sdk |
|
|
185
|
+
| **빌드** | esbuild |
|
|
186
|
+
| **테스트** | vitest |
|
|
187
|
+
|
|
188
|
+
## 로드맵
|
|
189
|
+
|
|
190
|
+
- [x] Claude Code 터미널 임베딩
|
|
191
|
+
- [x] MCP 서버 내장
|
|
192
|
+
- [x] 학습 대시보드 (기본 통계)
|
|
193
|
+
- [x] 독립 CLI (`npx oh-my-til`) — Obsidian 없이 사용
|
|
194
|
+
- [ ] 대시보드 백로그 진행률 바
|
|
195
|
+
- [ ] TIL 폴더 경로 커스터마이즈
|
|
196
|
+
- [ ] 리치 대시보드 — 최근 TIL 목록, 학습 스트릭, 주간 요약
|
|
197
|
+
- [ ] 동적 코드 블록 (`til-moc`, `til-daily`) — Dataview 없이 TIL 목록 자동 렌더링
|
|
198
|
+
- [ ] 멀티 터미널 탭 — 여러 Claude Code 세션 동시 실행
|
|
199
|
+
- [ ] 노트 링크 통합 — 관련 노트에 백링크 자동 삽입
|
|
200
|
+
|
|
201
|
+
## 감사의 글
|
|
202
|
+
|
|
203
|
+
- [claude-code-terminal](https://github.com/dternyak/claude-code-terminal) — xterm.js + node-pty Obsidian 통합 패턴의 원본
|
|
204
|
+
- [Obsidian Developer Docs](https://docs.obsidian.md/Home)
|
|
205
|
+
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
206
|
+
|
|
207
|
+
## 라이선스
|
|
208
|
+
|
|
209
|
+
[MIT](LICENSE)
|
package/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Oh My TIL
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://obsidian.md)
|
|
5
|
+
[](https://github.com/SongYunSeop/oh-my-til/releases)
|
|
6
|
+
|
|
7
|
+
**English** | [한국어](README.ko.md)
|
|
8
|
+
|
|
9
|
+
A Claude Code plugin for AI-powered TIL (Today I Learned) learning workflow. Works as a standalone CLI (`npx oh-my-til`) or as an Obsidian plugin with embedded Claude Code terminal.
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Embedded Terminal** — Claude Code terminal in Obsidian sidebar (xterm.js + node-pty)
|
|
16
|
+
- **Built-in MCP Server** — Claude Code can directly access your vault via HTTP
|
|
17
|
+
- **Learning Dashboard** — TIL statistics and category breakdown at a glance
|
|
18
|
+
- **Auto-installed Skills** — `/til`, `/research`, `/backlog`, `/save`, `/migrate-links` commands ready out of the box
|
|
19
|
+
- **Markdown Link Detection** — `[text](path)` links in terminal are clickable and open notes (CJK-aware)
|
|
20
|
+
- **Backlog-to-TIL Trigger** — Click an empty backlog link to start a TIL session
|
|
21
|
+
- **File Watcher** — Newly created TIL files open automatically in the editor
|
|
22
|
+
|
|
23
|
+
## How It Works
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Command Palette → Open Terminal → Claude Code starts
|
|
27
|
+
→ Run /til, /backlog, /research, /save, /dashboard, /migrate-links skills
|
|
28
|
+
→ Claude researches → interactive learning → saves TIL markdown
|
|
29
|
+
→ New file detected → opens in editor
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Standalone Usage (without Obsidian)
|
|
33
|
+
|
|
34
|
+
Install and run the MCP server without Obsidian using `npx`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx oh-my-til init # Install skills, rules, and CLAUDE.md section
|
|
38
|
+
npx oh-my-til serve # Start MCP server (default port 22360)
|
|
39
|
+
npx oh-my-til serve --port 3000 --til-path my-til
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then connect Claude Code to the MCP server:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
claude mcp add --transport http oh-my-til http://localhost:22360/mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Getting Started (Obsidian Plugin)
|
|
49
|
+
|
|
50
|
+
### Prerequisites
|
|
51
|
+
|
|
52
|
+
- [Obsidian](https://obsidian.md) v1.5.0+
|
|
53
|
+
- [Node.js](https://nodejs.org) 18+
|
|
54
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude`)
|
|
55
|
+
|
|
56
|
+
### Installation
|
|
57
|
+
|
|
58
|
+
#### Option A: Claude Code (Recommended)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/SongYunSeop/oh-my-til.git
|
|
62
|
+
cd oh-my-til
|
|
63
|
+
claude
|
|
64
|
+
# Then run: /install-plugin /path/to/your/vault
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Claude Code automatically detects Electron version and handles native module rebuilding.
|
|
68
|
+
|
|
69
|
+
#### Option B: Manual
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git clone https://github.com/SongYunSeop/oh-my-til.git
|
|
73
|
+
cd oh-my-til
|
|
74
|
+
npm install
|
|
75
|
+
ELECTRON_VERSION=<your-electron-version> npm run deploy -- /path/to/your/vault
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
> To find your Electron version, open Obsidian's Developer Tools (Ctrl+Shift+I) and run `process.versions.electron`.
|
|
79
|
+
|
|
80
|
+
Restart Obsidian, then enable **Oh My TIL** in Settings > Community plugins.
|
|
81
|
+
|
|
82
|
+
### MCP Server Setup (Optional)
|
|
83
|
+
|
|
84
|
+
The plugin runs an HTTP-based MCP server so Claude Code can access your vault directly:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
claude mcp add --transport http oh-my-til http://localhost:22360/mcp
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
| Setting | Default | Description |
|
|
93
|
+
|---------|---------|-------------|
|
|
94
|
+
| Shell Path | System default | Shell to use in the terminal |
|
|
95
|
+
| Auto Launch Claude | `true` | Run `claude` when terminal opens |
|
|
96
|
+
| Resume Last Session | `false` | Resume previous Claude session (`--continue`) |
|
|
97
|
+
| Font Size | `13` | Terminal font size (px) |
|
|
98
|
+
| Font Family | `Menlo` | Terminal font (Menlo, SF Mono, Fira Code, JetBrains Mono, etc.) |
|
|
99
|
+
| Line Height | `1.0` | Terminal line spacing (1.0 = default, up to 2.0) |
|
|
100
|
+
| Auto Open New TIL | `true` | Open new TIL files in editor automatically |
|
|
101
|
+
| MCP Server | `true` | Enable built-in MCP server |
|
|
102
|
+
| MCP Port | `22360` | MCP server port |
|
|
103
|
+
|
|
104
|
+
## MCP Tools
|
|
105
|
+
|
|
106
|
+
When the MCP server is connected, Claude Code can use these tools:
|
|
107
|
+
|
|
108
|
+
| Tool | Description |
|
|
109
|
+
|------|-------------|
|
|
110
|
+
| `vault_read_note` | Read note content by path |
|
|
111
|
+
| `vault_list_files` | List files in a folder with optional filtering |
|
|
112
|
+
| `vault_search` | Full-text search across the vault |
|
|
113
|
+
| `vault_get_active_file` | Get the currently open file |
|
|
114
|
+
| `til_list` | List TIL files grouped by category |
|
|
115
|
+
| `til_backlog_status` | Backlog progress summary with checkbox counts |
|
|
116
|
+
| `til_get_context` | Get existing knowledge context for a topic (files, links, unresolved mentions) |
|
|
117
|
+
| `til_recent_context` | Recent learning activity grouped by date |
|
|
118
|
+
|
|
119
|
+
## Claude Skills
|
|
120
|
+
|
|
121
|
+
The plugin auto-installs these skills to `.claude/skills/`:
|
|
122
|
+
|
|
123
|
+
| Skill | Command | Description |
|
|
124
|
+
|-------|---------|-------------|
|
|
125
|
+
| **til** | `/til <topic> [category]` | Research a topic → interactive learning → save TIL |
|
|
126
|
+
| **research** | `/research <topic> [category]` | Research a topic and create a learning backlog |
|
|
127
|
+
| **backlog** | `/backlog [category]` | View learning backlog and progress |
|
|
128
|
+
| **save** | *(auto-invoked by /til)* | Save TIL markdown with Daily note, MOC, and backlog updates |
|
|
129
|
+
| **migrate-links** | `/migrate-links` | Batch-convert `[[wikilinks]]` to standard markdown links |
|
|
130
|
+
|
|
131
|
+
## Development
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm run dev # Watch mode (esbuild)
|
|
135
|
+
npm test # Run tests (vitest)
|
|
136
|
+
npm run rebuild-pty # Rebuild node-pty for Obsidian's Electron
|
|
137
|
+
npm run deploy -- /path # Deploy to vault
|
|
138
|
+
npm run deploy -- --refresh-skills /path # Deploy with skill/rule refresh
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Project Structure
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
src/
|
|
145
|
+
├── core/ # Platform-independent pure logic
|
|
146
|
+
│ ├── backlog.ts # Backlog parsing/formatting (pure functions)
|
|
147
|
+
│ ├── context.ts # Learning context helpers (pure functions)
|
|
148
|
+
│ ├── stats.ts # TIL statistics (pure functions)
|
|
149
|
+
│ ├── migrate-links.ts # Wikilink [[]] → [](path) conversion
|
|
150
|
+
│ ├── keyboard.ts # Shift+Enter → \n (multiline support)
|
|
151
|
+
│ ├── env.ts # macOS PATH resolution (Homebrew)
|
|
152
|
+
│ ├── skills.ts # Version comparison / placeholder substitution
|
|
153
|
+
│ └── index.ts # Barrel export
|
|
154
|
+
├── ports/ # Adapter interfaces
|
|
155
|
+
│ ├── storage.ts # FileStorage interface
|
|
156
|
+
│ └── metadata.ts # MetadataProvider interface
|
|
157
|
+
├── adapters/ # Port implementations
|
|
158
|
+
│ ├── fs-adapter.ts # node:fs based (standalone)
|
|
159
|
+
│ └── obsidian-adapter.ts # Obsidian App based
|
|
160
|
+
├── mcp/ # MCP server (port-dependent, Obsidian-free)
|
|
161
|
+
│ ├── server.ts # HTTP server + Streamable HTTP transport
|
|
162
|
+
│ └── tools.ts # MCP tool definitions (FileStorage + MetadataProvider)
|
|
163
|
+
├── cli/ # Standalone CLI entry point
|
|
164
|
+
│ └── index.ts # npx oh-my-til init / serve
|
|
165
|
+
└── obsidian/ # Obsidian platform adapter
|
|
166
|
+
├── main.ts # Plugin entry point
|
|
167
|
+
├── settings.ts # Settings tab & interface
|
|
168
|
+
├── watcher.ts # File watcher → open in editor
|
|
169
|
+
├── skills.ts # Skill/rule auto-installer
|
|
170
|
+
├── terminal/
|
|
171
|
+
│ ├── TerminalView.ts # Sidebar terminal (ItemView + xterm.js)
|
|
172
|
+
│ ├── MarkdownLinkProvider.ts # 3 ILinkProviders: Markdown, Filepath, OSC 8
|
|
173
|
+
│ └── pty.ts # PTY process manager (node-pty)
|
|
174
|
+
└── dashboard/
|
|
175
|
+
└── DashboardView.ts # Learning dashboard (ItemView)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Tech Stack
|
|
179
|
+
|
|
180
|
+
| | |
|
|
181
|
+
|---|---|
|
|
182
|
+
| **Runtime** | TypeScript, Obsidian Plugin API |
|
|
183
|
+
| **Terminal** | xterm.js, node-pty |
|
|
184
|
+
| **MCP** | @modelcontextprotocol/sdk |
|
|
185
|
+
| **Build** | esbuild |
|
|
186
|
+
| **Test** | vitest |
|
|
187
|
+
|
|
188
|
+
## Roadmap
|
|
189
|
+
|
|
190
|
+
- [x] Embedded Claude Code terminal
|
|
191
|
+
- [x] Built-in MCP server
|
|
192
|
+
- [x] Learning dashboard (basic stats)
|
|
193
|
+
- [x] Standalone CLI (`npx oh-my-til`) — use without Obsidian
|
|
194
|
+
- [ ] Backlog progress bars in dashboard
|
|
195
|
+
- [ ] Configurable TIL folder path
|
|
196
|
+
- [ ] Rich dashboard — recent TILs, streaks, weekly summary
|
|
197
|
+
- [ ] Dynamic code blocks (`til-moc`, `til-daily`) — auto-render TIL lists without Dataview
|
|
198
|
+
- [ ] Multi-terminal tabs — run multiple Claude Code sessions
|
|
199
|
+
- [ ] Note linking — auto-insert backlinks to related notes
|
|
200
|
+
|
|
201
|
+
## Acknowledgments
|
|
202
|
+
|
|
203
|
+
- [claude-code-terminal](https://github.com/dternyak/claude-code-terminal) — Original xterm.js + node-pty Obsidian integration pattern
|
|
204
|
+
- [Obsidian Developer Docs](https://docs.obsidian.md/Home)
|
|
205
|
+
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
[MIT](LICENSE)
|