@albireo3754/agentlog 0.1.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pray
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.md ADDED
@@ -0,0 +1,196 @@
1
+ # AgentLog
2
+
3
+ Claude Code prompts โ†’ Obsidian Daily Note, automatically.
4
+
5
+ Every time you type a prompt in Claude Code, AgentLog captures it and appends it to your Obsidian Daily Note โ€” with timestamps, grouped by project and session.
6
+
7
+ ```
8
+ npx agentlog init ~/Obsidian
9
+ ```
10
+
11
+ That's it. Start using Claude Code and your Daily Note fills itself.
12
+
13
+ ## What It Does
14
+
15
+ ```
16
+ Claude Code prompt โ†’ UserPromptSubmit hook โ†’ Daily Note append
17
+ ```
18
+
19
+ **Before:** You finish a 3-hour Claude Code session. Your Daily Note is empty.
20
+
21
+ **After:**
22
+
23
+ ```markdown
24
+ ## AgentLog
25
+ > ๐Ÿ• 11:21 โ€” js/agentlog โ€บ git initํ•˜๊ณ  vscode๋กœ ์—ด์–ด๋ด
26
+
27
+ #### 10:53 ยท js/agentlog
28
+ <!-- cwd=/Users/you/work/js/agentlog -->
29
+ - - - - [[ses_a1b2c3d4]]
30
+ - 10:53 agentlog ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ์ž‘์—… ์ง„ํ–‰
31
+ - 11:07 ์ŠคํŽ™ ๋ฌธ์„œ ์—ด์–ด๋ด
32
+ - - - - [[ses_e5f6a7b8]]
33
+ - 11:21 git initํ•˜๊ณ  vscode๋กœ ์—ด์–ด๋ด
34
+ ```
35
+
36
+ | Element | Role |
37
+ |---------|------|
38
+ | `> ๐Ÿ• HH:MM โ€” project โ€บ prompt` | Latest entry (always updated) |
39
+ | `#### HH:MM ยท project` | Project subsection (grouped by cwd) |
40
+ | `<!-- cwd=... -->` | Section matching key (Reading view์—์„œ ์ˆจ๊น€) |
41
+ | `- - - - [[ses_...]]` | Session boundary (Obsidian wiki-link) |
42
+ | `- HH:MM prompt` | Individual log entry |
43
+
44
+ No manual logging. No copy-paste. No AI summarization overhead.
45
+
46
+ ## Install
47
+
48
+ ```bash
49
+ # With Bun
50
+ bunx agentlog init ~/path/to/vault
51
+
52
+ # With npm
53
+ npx agentlog init ~/path/to/vault
54
+ ```
55
+
56
+ ### Requirements
57
+
58
+ - [Claude Code](https://claude.ai/code) (hook integration)
59
+ - [Obsidian](https://obsidian.md) (Daily Note target)
60
+ - [Bun](https://bun.sh) (>=1.0.0) or [Node.js](https://nodejs.org) >=20
61
+
62
+ ## Usage
63
+
64
+ ### Setup
65
+
66
+ ```bash
67
+ # Point to your Obsidian vault
68
+ agentlog init ~/Obsidian
69
+
70
+ # Or use any folder (no Obsidian required)
71
+ agentlog init --plain ~/notes
72
+ ```
73
+
74
+ This does two things:
75
+ 1. Creates `~/.agentlog/config.json` with your vault path
76
+ 2. Registers a hook in `~/.claude/settings.json`
77
+
78
+ Run `agentlog init` without arguments to auto-detect installed vaults.
79
+
80
+ ### That's It
81
+
82
+ Use Claude Code normally. Every prompt you type gets logged to your Daily Note.
83
+
84
+ ### How It Works
85
+
86
+ 1. You type a prompt in Claude Code
87
+ 2. Claude Code fires the `UserPromptSubmit` hook
88
+ 3. AgentLog reads the prompt from stdin and sanitizes it
89
+ 4. Finds your Daily Note: `{vault}/Daily/YYYY-MM-DD-์š”์ผ.md` (๊ฒฝ๋กœ ํ•˜๋“œ์ฝ”๋”ฉ, Obsidian Daily Notes ํด๋” ์„ค์ •๊ณผ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์Œ)
90
+ 5. Finds or creates a `## AgentLog` section
91
+ 6. Finds or creates a `#### project` subsection matching the current working directory
92
+ 7. Inserts a session divider `[[ses_...]]` if the session changed, then appends the entry
93
+ 8. Updates the `> ๐Ÿ•` latest-entry line at the top of the section
94
+
95
+ Total overhead: < 50ms per prompt. Fire-and-forget, never blocks Claude Code.
96
+
97
+ ## Daily Note Format
98
+
99
+ ### Obsidian Mode (default)
100
+
101
+ Entries go to `{vault}/Daily/YYYY-MM-DD-์š”์ผ.md` under a `## AgentLog` section. Daily Notes ํด๋”๊ฐ€ `Daily/`๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ `init` ์‹œ vault ๊ฒฝ๋กœ๋ฅผ ์กฐ์ •ํ•˜๊ฑฐ๋‚˜, Obsidian Daily Notes ํด๋” ์„ค์ •์„ `Daily/`๋กœ ๋งž์ถฐ์•ผ ํ•ฉ๋‹ˆ๋‹ค.
102
+
103
+ Each working directory gets its own `#### project` subsection. Session changes insert a `[[ses_...]]` wiki-link divider. The `> ๐Ÿ•` blockquote at the top always shows the latest entry across all projects.
104
+
105
+ ```markdown
106
+ ## AgentLog
107
+ > ๐Ÿ• 14:30 โ€” kotlin/message-gate โ€บ API ์‘๋‹ต ์ˆ˜์ •
108
+
109
+ #### 10:53 ยท js/agentlog
110
+ <!-- cwd=/Users/you/work/js/agentlog -->
111
+ - - - - [[ses_a1b2c3d4]]
112
+ - 10:53 agentlog ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ์ž‘์—… ์ง„ํ–‰
113
+ - 11:07 ์ŠคํŽ™ ๋ฌธ์„œ ์—ด์–ด๋ด
114
+
115
+ #### 14:00 ยท kotlin/message-gate
116
+ <!-- cwd=/Users/you/work/kotlin/message-gate -->
117
+ - - - - [[ses_e5f6a7b8]]
118
+ - 14:00 API ์‘๋‹ต ์ˆ˜์ •
119
+ - 14:30 ํ…Œ์ŠคํŠธ ์‹คํ–‰
120
+ ```
121
+
122
+ ### Plain Mode
123
+
124
+ With `--plain`, entries go to `{folder}/YYYY-MM-DD.md`:
125
+
126
+ ```markdown
127
+ # 2026-03-02
128
+ - 10:53 agentlog ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ์ž‘์—… ์ง„ํ–‰
129
+ ```
130
+
131
+ ## CLI Reference
132
+
133
+ | Command | Description |
134
+ |---------|-------------|
135
+ | `agentlog init [vault] [--plain]` | Vault ๊ฒฝ๋กœ ์„ค์ • + Claude Code hook ๋“ฑ๋ก. ์ธ์ž ์—†์œผ๋ฉด ์ž๋™ ๊ฐ์ง€ |
136
+ | `agentlog detect` | ์„ค์น˜๋œ Obsidian vault ๋ชฉ๋ก + CLI ์ƒํƒœ ํ‘œ์‹œ |
137
+ | `agentlog doctor` | ์„ค์น˜ ์ƒํƒœ ํ—ฌ์Šค์ฒดํฌ (binary, vault, hook, Obsidian CLI ๋“ฑ) |
138
+ | `agentlog open` | ์˜ค๋Š˜์˜ Daily Note๋ฅผ Obsidian์—์„œ ์—ด๊ธฐ (CLI 1.12+ ํ•„์š”) |
139
+ | `agentlog uninstall [-y]` | Hook ์ œ๊ฑฐ + `~/.agentlog/` ์‚ญ์ œ. `-y`๋กœ ํ™•์ธ ์ƒ๋žต |
140
+ | `agentlog hook` | Claude Code๊ฐ€ ์ž๋™ ํ˜ธ์ถœ (์‚ฌ์šฉ์ž ์ง์ ‘ ์‹คํ–‰ X) |
141
+
142
+ ## Configuration
143
+
144
+ `~/.agentlog/config.json`:
145
+
146
+ | Field | Default | Description |
147
+ |-------|---------|-------------|
148
+ | `vault` | (required) | Obsidian vault ๋˜๋Š” plain ํด๋” ๊ฒฝ๋กœ |
149
+ | `plain` | `false` | Plain ๋ชจ๋“œ (Obsidian ์—†์ด ๋‹จ์ˆœ ํŒŒ์ผ ๊ธฐ๋ก) |
150
+
151
+ ํ™˜๊ฒฝ๋ณ€์ˆ˜:
152
+
153
+ | Variable | Description |
154
+ |----------|-------------|
155
+ | `AGENTLOG_CONFIG_DIR` | Config ๋””๋ ‰ํ† ๋ฆฌ ์˜ค๋ฒ„๋ผ์ด๋“œ (๊ธฐ๋ณธ: `~/.agentlog`) |
156
+ | `OBSIDIAN_BIN` | Obsidian CLI ๋ฐ”์ด๋„ˆ๋ฆฌ ๊ฒฝ๋กœ ์˜ค๋ฒ„๋ผ์ด๋“œ |
157
+
158
+ ## Uninstall
159
+
160
+ ```bash
161
+ agentlog uninstall
162
+ ```
163
+
164
+ Hook์„ `~/.claude/settings.json`์—์„œ ์ œ๊ฑฐํ•˜๊ณ  `~/.agentlog/`๋ฅผ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.
165
+
166
+ ## Development
167
+
168
+ ```bash
169
+ bun install
170
+ bun test # 120 pass / 120 tests
171
+ bun run typecheck # tsc --noEmit
172
+ bun run build # compile to dist/ (optional)
173
+ ```
174
+
175
+ `bin`์ด `src/cli.ts`๋ฅผ ์ง์ ‘ ๊ฐ€๋ฆฌํ‚ค๋ฏ€๋กœ ๊ฐœ๋ฐœ ์ค‘ ๋นŒ๋“œ ๋ถˆํ•„์š” โ€” Bun์ด TypeScript๋ฅผ ๋„ค์ดํ‹ฐ๋ธŒ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
176
+
177
+ ```bash
178
+ # ๊ธ€๋กœ๋ฒŒ ์ปค๋งจ๋“œ๋กœ ๋งํฌ
179
+ bun link
180
+
181
+ # ์†Œ์Šค ์ˆ˜์ • โ†’ ์ฆ‰์‹œ ๋ฐ˜์˜
182
+ agentlog doctor
183
+
184
+ # Watch ๋ชจ๋“œ
185
+ bun run dev:watch
186
+ ```
187
+
188
+ ## Roadmap
189
+
190
+ - **Phase 2:** Obsidian plugin with timeline visualization UI
191
+ - **Phase 3:** Git log integration (commits โ†’ Daily Note)
192
+ - **Future:** `agentlog run` command for session replay from JSONL captures
193
+
194
+ ## License
195
+
196
+ MIT
@@ -0,0 +1,125 @@
1
+ # AgentLog โ€” Hook Integration Guide
2
+
3
+ ## Overview
4
+
5
+ AgentLog uses the Claude Code `UserPromptSubmit` hook to capture every prompt
6
+ you type in Claude Code and append it to your Obsidian Daily Note.
7
+
8
+ ---
9
+
10
+ ## Hook Input Format (Source of Truth)
11
+
12
+ When Claude Code fires the `UserPromptSubmit` hook, it sends a JSON object via
13
+ **stdin**. The canonical shape is:
14
+
15
+ ```json
16
+ {
17
+ "hook_event_name": "UserPromptSubmit",
18
+ "session_id": "abc-123",
19
+ "cwd": "/path/to/working/dir",
20
+ "prompt": "user prompt text",
21
+ "message": { "content": "user prompt text" },
22
+ "parts": [{ "type": "text", "text": "user prompt text" }]
23
+ }
24
+ ```
25
+
26
+ ### Required Fields
27
+
28
+ | Field | Type | Description |
29
+ |------------------|--------|---------------------------------------|
30
+ | `hook_event_name`| string | Always `"UserPromptSubmit"` |
31
+ | `session_id` | string | Unique Claude Code session identifier |
32
+ | `cwd` | string | Working directory of the Claude session |
33
+
34
+ ### Prompt Extraction (priority order)
35
+
36
+ AgentLog extracts the user prompt using this fallback chain:
37
+
38
+ 1. `input.prompt` โ€” direct string field (preferred)
39
+ 2. `input.message.content` โ€” nested message object
40
+ 3. `input.parts[0].text` โ€” first text part in parts array
41
+
42
+ If none of these yield a non-empty string, the hook exits silently (no write).
43
+
44
+ ### Type Definitions
45
+
46
+ See [`src/schema/hook-input.ts`](../src/schema/hook-input.ts) for the full
47
+ TypeScript interface and `parseHookInput()` runtime validator.
48
+
49
+ ---
50
+
51
+ ## Hook Registration
52
+
53
+ After running `npx agentlog init <vault>`, the hook is registered in
54
+ `~/.claude/settings.json`:
55
+
56
+ ```json
57
+ {
58
+ "hooks": {
59
+ "UserPromptSubmit": [
60
+ {
61
+ "matcher": "",
62
+ "hooks": [
63
+ {
64
+ "type": "command",
65
+ "command": "agentlog hook"
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ }
71
+ }
72
+ ```
73
+
74
+ The `matcher` is empty string to match all prompts regardless of content.
75
+
76
+ ---
77
+
78
+ ## Daily Note Format
79
+
80
+ AgentLog appends to `{vault}/Daily/{YYYY-MM-DD}-{์š”์ผ}.md`.
81
+
82
+ ### With time-block sections (Korean Daily Note format)
83
+
84
+ If the file contains time-block checkbox lines, the entry is inserted under the
85
+ matching 2-hour block:
86
+
87
+ ```markdown
88
+ ## ์˜ค์ „ (08-13)
89
+ - [ ] 08 - 10
90
+ - [x] 10 - 12
91
+ - 10:53 agentlog ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ์ž‘์—… ์ง„ํ–‰
92
+ - 11:07 ์ŠคํŽ™ ๋ฌธ์„œ ์—ด์–ด๋ด
93
+ - [ ] 12 - 13
94
+ ```
95
+
96
+ ### Without time-block sections (fallback)
97
+
98
+ If no time-block pattern is found, appended to an `## AgentLog` section at
99
+ end of file:
100
+
101
+ ```markdown
102
+ ## AgentLog
103
+ - 10:53 agentlog ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ์ž‘์—… ์ง„ํ–‰
104
+ - 11:07 ์ŠคํŽ™ ๋ฌธ์„œ ์—ด์–ด๋ด
105
+ ```
106
+
107
+ ### `--plain` mode
108
+
109
+ With `--plain` flag during init, writes to `{dir}/{YYYY-MM-DD}.md` with no
110
+ time-block logic:
111
+
112
+ ```markdown
113
+ - 10:53 agentlog ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ ์ž‘์—… ์ง„ํ–‰
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Error Handling
119
+
120
+ The hook script is designed to **fail silently** โ€” Claude Code must not be
121
+ interrupted by logging errors. All errors are written to stderr only.
122
+
123
+ Exit codes:
124
+ - `0` โ€” success or silent skip (no config, empty prompt)
125
+ - `1` โ€” unexpected fatal error (also silent to Claude Code user)
@@ -0,0 +1,178 @@
1
+ # 06) Obsidian ๊ณต์‹ CLI ์กฐ์‚ฌ (Local REST API ๋Œ€์ฒด ๊ด€์ )
2
+
3
+ - ์ž‘์„ฑ์ผ: 2026-03-01
4
+ - ๋ฒ”์œ„: AgentLog ํ”„๋กœ์ ํŠธ์—์„œ `Local REST API` ์ค‘์‹ฌ ์ž๋™ํ™”๋ฅผ `Obsidian ๊ณต์‹ CLI` ์ค‘์‹ฌ์œผ๋กœ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์กฐ์‚ฌ
5
+ - ๊ธฐ์ค€: **๊ณต์‹ ๋ฌธ์„œ/๊ณต์‹ changelog ์šฐ์„ **, ๋ณด์กฐ๋กœ ๊ธฐ์กด Local REST API ๋ ˆํฌ ์ฐธ๊ณ 
6
+
7
+ ---
8
+
9
+ ## TL;DR
10
+
11
+ - **๊ฒฐ๋ก (๊ถŒ์žฅ):** AgentLog ๋ฌธ์„œ/์šด์˜ ์ž๋™ํ™”๋Š” **CLI ์šฐ์„ **์ด ๋งž๋‹ค.
12
+ - ๋‹ค๋งŒ, ๋ชจ๋“  ์‚ฌ์šฉ์ž์—๊ฒŒ ์ž๋™์œผ๋กœ ๋˜๋Š” ๊ฑด ์•„๋‹ˆ๊ณ  ์•„๋ž˜ ์ „์ œ๊ฐ€ ํ•„์š”ํ•˜๋‹ค.
13
+ 1. Obsidian ๋ฐ์Šคํฌํ†ฑ ์•ฑ ๋ฒ„์ „/์„ค์น˜๋ณธ ์ตœ์‹ ํ™”
14
+ 2. Settings์—์„œ CLI ํ™œ์„ฑํ™” + OS๋ณ„ ๋“ฑ๋ก(PATH/symlink)
15
+ 3. Obsidian ์•ฑ ์‹คํ–‰ ์ƒํƒœ
16
+ - HTTP ์—”๋“œํฌ์ธํŠธ๊ฐ€ ๊ผญ ํ•„์š”ํ•œ ํ†ตํ•ฉ(์›๊ฒฉ ํ˜ธ์ถœ, ์›นํ›…, ์™ธ๋ถ€ ์„œ๋น„์Šค pull/push)์€ Local REST API๋ฅผ ๋ณด์กฐ๋กœ ์œ ์ง€.
17
+
18
+ ---
19
+
20
+ ## 1. ์ตœ์‹  ์ƒํƒœ(๋‚ ์งœ ๊ธฐ์ค€ ์ •๋ฆฌ)
21
+
22
+ ### 1.1 ๊ณต์‹ CLI ๋„์ž… ์‹œ์ 
23
+
24
+ - 2026-02-10 ๊ณต๊ฐœ๋œ `Desktop 1.12.0 (catalyst)` changelog์—์„œ CLI๊ฐ€ ์‹ ๊ทœ ๊ธฐ๋Šฅ์œผ๋กœ ์†Œ๊ฐœ๋จ.
25
+ - 2026-02-27 ๊ณต๊ฐœ๋œ `Desktop 1.12 (public)` changelog์—์„œ๋„ CLI๊ฐ€ ํ•ต์‹ฌ ์‹ ๊ทœ ๊ธฐ๋Šฅ์œผ๋กœ ๋ช…์‹œ๋จ.
26
+
27
+ ์ฆ‰, **2026-03-01 ์‹œ์  ๊ธฐ์ค€์œผ๋กœ๋Š” โ€œ์‹คํ—˜์  ์ปจ์…‰โ€์ด ์•„๋‹ˆ๋ผ public ๋ฆด๋ฆฌ์Šค ๋ผ์ธ์— ํฌํ•จ๋œ ๊ธฐ๋Šฅ**์œผ๋กœ ๋ณด๋Š” ๊ฒŒ ํƒ€๋‹นํ•˜๋‹ค.
28
+
29
+ > ์ถ”๋ก  ๊ทผ๊ฑฐ: changelog์˜ ๋‚ ์งœ/์ฑ„๋„(early access โ†’ public) ์ˆœ์„œ.
30
+
31
+ ### 1.2 ๋ฌธ์„œ ์ƒํƒœ ์ฃผ์˜
32
+
33
+ `help.obsidian.md/cli`์—๋Š” early access/Catalyst ๊ด€๋ จ ๋ฌธ๊ตฌ๊ฐ€ ์ผ๋ถ€ ๋‚จ์•„์žˆ๊ณ , ๋™์‹œ์— troubleshooting์—๋Š” installer `1.12.4+` ์š”๊ตฌ๊ฐ€ ๋ช…์‹œ๋˜์–ด ์žˆ๋‹ค.
34
+
35
+ - ์šด์˜ ํŒ๋‹จ์€ **help ๋ฌธ๊ตฌ ๋‹จํŽธ๋ณด๋‹ค changelog + ํ˜„์žฌ ์•ฑ ๋ฒ„์ „**์œผ๋กœ ์ตœ์ข… ํ™•์ธํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅ.
36
+
37
+ ---
38
+
39
+ ## 2. ๊ณต์‹ CLI ์‚ฌ์šฉ ์ „์ œ ์กฐ๊ฑด
40
+
41
+ ๊ณต์‹ ๋ฌธ์„œ ๊ธฐ์ค€ ํ•ต์‹ฌ ์กฐ๊ฑด:
42
+
43
+ 1. Obsidian ์•ฑ์—์„œ `Settings โ†’ General โ†’ Command line interface` ํ™œ์„ฑํ™”
44
+ 2. CLI ๋“ฑ๋ก ์ ˆ์ฐจ ์ˆ˜ํ–‰(OS๋ณ„ PATH/symlink ์ฒ˜๋ฆฌ)
45
+ 3. Obsidian ์•ฑ ์‹คํ–‰ ์ƒํƒœ ํ•„์š” (์ฒซ ์ปค๋งจ๋“œ๊ฐ€ ์•ฑ์„ ๋„์šธ ์ˆ˜ ์žˆ์Œ)
46
+ 4. installer ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์žˆ์Œ
47
+
48
+ OS๋ณ„ ํฌ์ธํŠธ(๋ฌธ์„œ ๊ธฐ์ค€):
49
+ - macOS: `~/.zprofile` PATH ๋“ฑ๋ก ํ™•์ธ
50
+ - Linux: `/usr/local/bin/obsidian` symlink(๋˜๋Š” `~/.local/bin` fallback)
51
+ - Windows: redirector/installer ๊ด€๋ จ ์ถ”๊ฐ€ ์š”๊ตฌ์‚ฌํ•ญ ํ™•์ธ ํ•„์š”
52
+
53
+ ---
54
+
55
+ ## 3. ๊ธฐ๋Šฅ ๋ฒ”์œ„: REST API ์—†์ด๋„ ๊ฐ€๋Šฅํ•œ ๊ฒƒ
56
+
57
+ ๊ณต์‹ CLI ๋ฌธ์„œ์—์„œ ํ™•์ธ๋˜๋Š” ์ฃผ์š” ๋ฒ”์ฃผ:
58
+
59
+ - ์ผ๋ฐ˜ ์ œ์–ด: `help`, `version`, `reload`, `restart`
60
+ - Daily: `daily`, `daily:read`, `daily:append`, `daily:prepend`, `daily:path`
61
+ - ๊ฒ€์ƒ‰/ํŒŒ์ผ: `search`, `read`, `create`, `rename` ๋“ฑ
62
+ - ๋ช…๋ น ํŒ”๋ ˆํŠธ: `commands`, `command id=...` (ํ”Œ๋Ÿฌ๊ทธ์ธ ๋“ฑ๋ก ๋ช…๋ น ํฌํ•จ)
63
+ - ์ž‘์—…/ํƒœ๊ทธ: `tasks`, `task`, `tags`, `tag`
64
+ - ๊ฐœ๋ฐœ์ž ์ž๋™ํ™”: devtools, screenshot, plugin reload, eval/CDP ๊ณ„์—ด
65
+
66
+ ์ฆ‰, 3๋ฒˆ ๋ฌธ์„œ์— ์žˆ๋˜ REST API ๊ธฐ๋ฐ˜ `open/read/command` ํ๋ฆ„ ์ƒ๋‹น์ˆ˜๋Š” CLI๋กœ ๋Œ€์ฒด ๊ฐ€๋Šฅ.
67
+
68
+ ---
69
+
70
+ ## 4. Local REST API vs ๊ณต์‹ CLI ๋น„๊ต
71
+
72
+ | ํ•ญ๋ชฉ | Obsidian ๊ณต์‹ CLI | Local REST API ํ”Œ๋Ÿฌ๊ทธ์ธ |
73
+ |---|---|---|
74
+ | ์ œ๊ณต ์ฃผ์ฒด | Obsidian ๊ณต์‹ | ์ปค๋ฎค๋‹ˆํ‹ฐ ํ”Œ๋Ÿฌ๊ทธ์ธ |
75
+ | ์ ‘๊ทผ ๋ฐฉ์‹ | ๋กœ์ปฌ ํ”„๋กœ์„ธ์Šค/ํ„ฐ๋ฏธ๋„ ๋ช…๋ น | HTTPS + API Key ์—”๋“œํฌ์ธํŠธ |
76
+ | ์„ค์น˜ ์˜์กด์„ฑ | Obsidian ์•ฑ + CLI ๋“ฑ๋ก | ์ปค๋ฎค๋‹ˆํ‹ฐ ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜/ํ™œ์„ฑํ™” |
77
+ | ์›๊ฒฉ ํ†ตํ•ฉ ์ ํ•ฉ์„ฑ | ๋‚ฎ์Œ(๋กœ์ปฌ ์…ธ ์ค‘์‹ฌ) | ๋†’์Œ(HTTP ์—ฐ๋™ ์‰ฌ์›€) |
78
+ | ๋ณด์•ˆ ํ‘œ๋ฉด | ๋กœ์ปฌ ๋ช…๋ น ๊ถŒํ•œ ์ค‘์‹ฌ | ๋„คํŠธ์›Œํฌ/API key ๋…ธ์ถœ๋ฉด ์กด์žฌ |
79
+ | ๊ฐœ๋ฐœ์ž ์ž๋™ํ™” | ๊ฐ•ํ•จ(๋ช…๋ น/๋””๋ฒ„๊ทธ/TUI) | ๊ฐ•ํ•จ(HTTP ํ˜ธ์ถœ/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๋™) |
80
+
81
+ ๋ณด์•ˆ ์ธก๋ฉด์—์„œ Obsidian ๊ณต์‹ ๋ฌธ์„œ๋Š” ์ปค๋ฎค๋‹ˆํ‹ฐ ํ”Œ๋Ÿฌ๊ทธ์ธ์— ๋Œ€ํ•ด โ€œ๊ถŒํ•œ ์ œํ•œ์ด ๋ณธ์งˆ์ ์œผ๋กœ ์ œํ•œ์ โ€์ด๊ณ  ์‹ ๋ขฐ ๊ฒ€์ฆ์ด ํ•„์š”ํ•˜๋‹ค๊ณ  ์•ˆ๋‚ดํ•œ๋‹ค. ๋”ฐ๋ผ์„œ **๊ฐ€๋Šฅํ•˜๋ฉด ๊ณต์‹ ๊ธฐ๋Šฅ ์šฐ์„ **์ด ๋ณด์ˆ˜์ ์ด๋‹ค.
82
+
83
+ ---
84
+
85
+ ## 5. AgentLog ๊ธฐ์ค€ ์‹ค๋ฌด ๊ถŒ์žฅ์•ˆ
86
+
87
+ ### 5.1 ํ˜„์žฌ ๊ตฌ์กฐ์™€์˜ ๊ด€๊ณ„
88
+
89
+ - AgentLog ํ•ต์‹ฌ(`agentlog hook`)์€ ์ด๋ฏธ ํŒŒ์ผ ์ง์ ‘ ์“ฐ๊ธฐ๋ผ REST API ์˜์กด์ด ์—†๋‹ค.
90
+ - ์˜ํ–ฅ ๋ฒ”์œ„๋Š” ์ฃผ๋กœ ๋ฌธ์„œ/์šด์˜ ์ž๋™ํ™” ๋ ˆ์ด์–ด(`obs`, `obs-daily`, `obs-cmd`, `obs-open`๋ฅ˜)๋‹ค.
91
+
92
+ ### 5.2 ๊ถŒ์žฅ ์ „๋žต
93
+
94
+ 1. **๊ธฐ๋ณธ ๊ฒฝ๋กœ: ๊ณต์‹ CLI ์šฐ์„ **
95
+ - Daily ์—ด๊ธฐ/์ฝ๊ธฐ/์ถ”๊ฐ€, ๋ช…๋ น ์‹คํ–‰, ๊ฒ€์ƒ‰์€ CLI๋กœ ํ‘œ์ค€ํ™”
96
+ 2. **์˜ˆ์™ธ ๊ฒฝ๋กœ: REST API ๋ณด์กฐ ์œ ์ง€**
97
+ - ์›นํ›…/์™ธ๋ถ€ ์„œ๋ฒ„์—์„œ HTTP๋กœ ํ˜ธ์ถœํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๋งŒ ์œ ์ง€
98
+ 3. **์„œ๋ฒ„/CI ๋ฌดGUI ์š”๊ตฌ ์‹œ**
99
+ - CLI ๋Œ€์‹  `Obsidian Headless` ๊ฒ€ํ†  (Node 22+, Sync ๊ตฌ๋… ํ•„์š”)
100
+
101
+ ---
102
+
103
+ ## 6. ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๋งคํ•‘ (๊ธฐ์กด REST ๋ฌธ์„œ โ†’ CLI)
104
+
105
+ | ๊ธฐ์กด(REST ์‚ฌ๊ณ ๋ฐฉ์‹) | CLI ๋Œ€์ฒด ์˜ˆ์‹œ |
106
+ |---|---|
107
+ | ์˜ค๋Š˜ Daily ์—ด๊ธฐ | `obsidian daily` |
108
+ | ์˜ค๋Š˜ Daily ๋‚ด์šฉ ์ฝ๊ธฐ | `obsidian daily:read` |
109
+ | ์˜ค๋Š˜ Daily์— ํ…์ŠคํŠธ ์ถ”๊ฐ€ | `obsidian daily:append content="..."` |
110
+ | ํŠน์ • ๋ช…๋ น ์‹คํ–‰ | `obsidian command id="..."` |
111
+ | ๋ช…๋ น ๋ชฉ๋ก ์กฐํšŒ | `obsidian commands` |
112
+ | vault ๊ฒ€์ƒ‰ | `obsidian search query="..."` |
113
+ | Daily ๊ฒฝ๋กœ ํ™•์ธ | `obsidian daily:path` |
114
+
115
+ > ์ฐธ๊ณ : ์‹ค์ œ ๋ช…๋ น/ํŒŒ๋ผ๋ฏธํ„ฐ๋Š” 1.12.x์—์„œ ๋น ๋ฅด๊ฒŒ ๋ณ€๊ฒฝ๋œ ์ด๋ ฅ์ด ์žˆ์œผ๋‹ˆ, ๋„์ž… ์‹œ์ ์— `obsidian help`๋กœ ์žฌ๊ฒ€์ฆ ํ•„์š”.
116
+
117
+ ---
118
+
119
+ ## 7. ์šด์˜ ๋ฆฌ์Šคํฌ ๋ฐ ์™„ํ™”
120
+
121
+ 1. **๋ฌธ์„œ/๋ฆด๋ฆฌ์Šค ๋ถˆ์ผ์น˜ ๋ฆฌ์Šคํฌ**
122
+ - ์™„ํ™”: changelog ๋‚ ์งœ + ๋กœ์ปฌ `obsidian version` + `obsidian help` 3์ค‘ ํ™•์ธ
123
+ 2. **์ดˆ๊ธฐ 1.12.x ๊ตฌ๊ฐ„์˜ CLI ๋ณ€๊ฒฝ ์†๋„**
124
+ - ์™„ํ™”: ํŒ€ ํ‘œ์ค€ ์ตœ์†Œ ๋ฒ„์ „ ๊ณ ์ •(์˜ˆ: 1.12.4+), ๋ช…๋ น ์Šค๋ชจํฌ ํ…Œ์ŠคํŠธ ์œ ์ง€
125
+ 3. **์•ฑ ์‹คํ–‰ ์˜์กด**
126
+ - ์™„ํ™”: ์ž๋™ํ™” ์Šคํฌ๋ฆฝํŠธ ์‹œ์ž‘ ์‹œ ์•ฑ ์ƒํƒœ ํ™•์ธ ๋˜๋Š” ์ฒซ ์ปค๋งจ๋“œ๋กœ ๊ธฐ๋™ ์œ ๋„
127
+ 4. **์›๊ฒฉ ์ž๋™ํ™” ๊ณต๋ฐฑ**
128
+ - ์™„ํ™”: HTTP ํ•„์š” ์ž‘์—…๋งŒ REST API fallback ๊ฒฝ๋กœ ์œ ์ง€
129
+
130
+ ---
131
+
132
+ ## 8. ๋„์ž… ์ฒดํฌ๋ฆฌ์ŠคํŠธ (ํŒ€ ํ‘œ์ค€)
133
+
134
+ - [ ] Obsidian ๋ฐ์Šคํฌํ†ฑ ์ตœ์‹  installer ์ ์šฉ
135
+ - [ ] `Settings > General > Command line interface` ํ™œ์„ฑํ™”
136
+ - [ ] `obsidian help` ์ •์ƒ ์ถœ๋ ฅ
137
+ - [ ] `obsidian daily:path` / `daily:read` / `daily:append` ์Šค๋ชจํฌ ํ…Œ์ŠคํŠธ ํ†ต๊ณผ
138
+ - [ ] ๋ฌธ์„œ 03์˜ REST ์˜ˆ์‹œ๋ฅผ CLI ์šฐ์„  ์˜ˆ์‹œ๋กœ ๋‹จ๊ณ„์  ๋Œ€์ฒด
139
+ - [ ] HTTP ํ•„์ˆ˜ ์—ฐ๋™๋งŒ REST API ์ž”์กด ๊ทผ๊ฑฐ ๋ฌธ์„œํ™”
140
+
141
+ ---
142
+
143
+ ## 9. ์ฐธ๊ณ  ๋ ˆํผ๋Ÿฐ์Šค
144
+
145
+ ### ๊ณต์‹(์šฐ์„ )
146
+
147
+ 1. Obsidian CLI (Help)
148
+ https://help.obsidian.md/cli
149
+ 2. Obsidian 1.12.0 Desktop (Early access) โ€” CLI ๋„์ž…
150
+ https://obsidian.md/changelog/2026-02-10-desktop-v1.12.0/
151
+ 3. Obsidian 1.12 Desktop (Public) โ€” CLI public ๋ฆด๋ฆฌ์Šค ๋ผ์ธ ํฌํ•จ
152
+ https://obsidian.md/changelog/2026-02-27-desktop-v1.12.4/
153
+ 4. Obsidian 1.12.1 Desktop (EA) โ€” CLI ํŒŒ๋ผ๋ฏธํ„ฐ/`daily:prepend` ์ˆ˜์ •
154
+ https://obsidian.md/changelog/2026-02-10-desktop-v1.12.1/
155
+ 5. Obsidian 1.12.2 Desktop (EA) โ€” `daily:path`, `help <command>` ๋“ฑ ์ถ”๊ฐ€
156
+ https://obsidian.md/changelog/2026-02-18-desktop-v1.12.2/
157
+ 6. Obsidian 1.12.3 Desktop (EA) โ€” ๊ธด content์—์„œ CLI hang ์ˆ˜์ •
158
+ https://obsidian.md/changelog/2026-02-23-desktop-v1.12.3/
159
+ 7. Obsidian 1.12.4 Desktop (EA) โ€” Windows CLI ๊ฐ์ง€ ์ด์Šˆ ์ˆ˜์ •/installer ๊ฒฝ๊ณ 
160
+ https://obsidian.md/changelog/2026-02-24-desktop-v1.12.4/
161
+ 8. Update Obsidian (installer update ๊ฐ€์ด๋“œ)
162
+ https://help.obsidian.md/updates
163
+ 9. Plugin security (์ปค๋ฎค๋‹ˆํ‹ฐ ํ”Œ๋Ÿฌ๊ทธ์ธ ์‹ ๋ขฐ ๋ชจ๋ธ)
164
+ https://help.obsidian.md/plugin-security
165
+ 10. Obsidian Headless (CLI์™€ ๊ตฌ๋ถ„๋˜๋Š” ์„œ๋ฒ„ํ˜• ๋Œ€์•ˆ)
166
+ https://help.obsidian.md/headless
167
+ 11. Headless Sync
168
+ https://help.obsidian.md/sync/headless
169
+
170
+ ### ๋น„๊ต ์ฐธ๊ณ (๋น„๊ณต์‹/์ปค๋ฎค๋‹ˆํ‹ฐ)
171
+
172
+ 12. Local REST API for Obsidian (GitHub)
173
+ https://github.com/coddingtonbear/obsidian-local-rest-api
174
+ 13. Local REST API manifest (๋ฒ„์ „/desktop-only)
175
+ https://raw.githubusercontent.com/coddingtonbear/obsidian-local-rest-api/main/manifest.json
176
+ 14. Local REST API README (HTTPS+API key ๋ชจ๋ธ)
177
+ https://raw.githubusercontent.com/coddingtonbear/obsidian-local-rest-api/main/README.md
178
+
@@ -0,0 +1,19 @@
1
+ # Obsidian Docs Index
2
+
3
+ ์ด ๋””๋ ‰ํ„ฐ๋ฆฌ๋Š” AgentLog + Obsidian ์šด์˜ ๋ฌธ์„œ ๋ชจ์Œ์ž…๋‹ˆ๋‹ค.
4
+
5
+ ## ๋ฌธ์„œ ๋ชฉ๋ก
6
+
7
+ 1. [01-obsidian-agentlog-quickstart.md](./01-obsidian-agentlog-quickstart.md)
8
+ - Obsidian ์—ฐ๋™ ๋น ๋ฅธ ์‹œ์ž‘, init/detect/doctor, FAQ
9
+ 2. [02-dailylog-settings-and-commands.md](./02-dailylog-settings-and-commands.md)
10
+ - dailylog ์šด์˜ ์Šคํ‚ฌ ๋ช…๋ น, agentlog CLI์™€์˜ ๊ด€๊ณ„, idempotent ๊ทœ์น™
11
+ 3. [03-llm-code-integration.md](./03-llm-code-integration.md)
12
+ - LLM/์ฝ”๋“œ/Obsidian ์ž๋™ํ™” ์—ฐ๋™ ๊ฒฝ๋กœ
13
+ 4. [04-obsidian-plugin-deep-dive.md](./04-obsidian-plugin-deep-dive.md)
14
+ - ํ•„์ˆ˜/๊ถŒ์žฅ/์„ ํƒ ํ”Œ๋Ÿฌ๊ทธ์ธ ์ƒ์„ธ, ๋ฆฌ์Šคํฌ/์™„ํ™”
15
+ 5. [05-project-judgement-extra-docs.md](./05-project-judgement-extra-docs.md)
16
+ - ์šด์˜/ํ™•์žฅ ๋ฌธ์„œ ๋ฐฑ๋กœ๊ทธ ๋ฐ 2์ฃผ ๋กœ๋“œ๋งต
17
+ 6. [06-official-cli-research.md](./06-official-cli-research.md)
18
+ - Obsidian ๊ณต์‹ CLI ์กฐ์‚ฌ, REST API ๋Œ€๋น„, AgentLog ๊ถŒ์žฅ ์šด์˜์•ˆ
19
+
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@albireo3754/agentlog",
3
+ "version": "0.1.0",
4
+ "description": "Claude Code prompts โ†’ Obsidian Daily Note auto-logger",
5
+ "type": "module",
6
+ "bin": {
7
+ "agentlog": "./src/cli.ts"
8
+ },
9
+ "scripts": {
10
+ "build": "bun build src/cli.ts src/hook.ts --outdir dist --target node",
11
+ "dev": "bun run src/cli.ts",
12
+ "dev:watch": "bun run --watch src/cli.ts",
13
+ "prepublishOnly": "bun run typecheck",
14
+ "test": "bun test",
15
+ "typecheck": "tsc --noEmit",
16
+ "postinstall": "node scripts/postinstall.mjs"
17
+ },
18
+ "engines": {
19
+ "node": ">=20",
20
+ "bun": ">=1.0.0"
21
+ },
22
+ "files": [
23
+ "src",
24
+ "!src/__tests__",
25
+ "scripts",
26
+ "README.md",
27
+ "LICENSE",
28
+ "docs"
29
+ ],
30
+ "devDependencies": {
31
+ "@types/bun": "latest",
32
+ "typescript": "^5.4.0"
33
+ }
34
+ }
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Skip in CI environments
4
+ if (process.env.CI) process.exit(0);
5
+
6
+ // Only print for global installs (npm install -g sets npm_config_global=true)
7
+ const isGlobalNpm = process.env.npm_config_global === "true";
8
+
9
+ if (!isGlobalNpm) process.exit(0);
10
+
11
+ console.log(`
12
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
13
+ โ•‘ agentlog installed! One more step: โ•‘
14
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
15
+
16
+ Initialize your Obsidian vault:
17
+
18
+ agentlog init ~/path/to/vault
19
+
20
+ No Obsidian? Use plain mode:
21
+
22
+ agentlog init --plain ~/Documents/notes
23
+
24
+ Auto-detect vaults:
25
+
26
+ agentlog detect
27
+ `);