@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 +21 -0
- package/README.md +196 -0
- package/docs/cc/hook-integration.md +125 -0
- package/docs/obsidian/06-official-cli-research.md +178 -0
- package/docs/obsidian/README.md +19 -0
- package/package.json +34 -0
- package/scripts/postinstall.mjs +27 -0
- package/src/claude-settings.ts +102 -0
- package/src/cli.ts +419 -0
- package/src/config.ts +41 -0
- package/src/detect.ts +88 -0
- package/src/hook.ts +74 -0
- package/src/note-writer.ts +255 -0
- package/src/obsidian-cli.ts +86 -0
- package/src/schema/daily-note.ts +84 -0
- package/src/schema/hook-input.ts +108 -0
- package/src/schema/pretty-prompt.ts +91 -0
- package/src/types.ts +23 -0
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
|
+
`);
|