ai-cli-log 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -2,7 +2,31 @@
2
2
 
3
3
  Seamlessly log your AI-powered coding conversations. This command-line interface (CLI) tool captures your terminal interactions with AI models like Gemini and Claude, saving entire sessions as clean Markdown documents for easy review and documentation.
4
4
 
5
- ## Features:
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g ai-cli-log
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Wrap any command with `ai-cli-log` to start a logging session. The session will be saved to a Markdown file in the `.ai-cli-logs` directory.
14
+
15
+ For example, to log a session with Google's Gemini CLI (`gemini`):
16
+
17
+ ```bash
18
+ ai-cli-log gemini
19
+ ```
20
+
21
+ Or to log a session with another tool, like `claude`:
22
+
23
+ ```bash
24
+ ai-cli-log claude
25
+ ```
26
+
27
+ The recorded session will be saved to a file like `.ai-cli-logs/session-YYYYMMDD-HH:mm:ss.md`.
28
+
29
+ ## Features
6
30
 
7
31
  * **Interactive Session Capture:** Acts as a wrapper for other CLI tools, capturing full interactive sessions, including user input and the "rendered" output (what you actually see on the terminal after backspaces, cursor movements, etc.).
8
32
  * **Accurate Logging:** Utilizes `node-pty` for pseudo-terminal emulation and `@xterm/headless` to parse ANSI escape codes, ensuring the captured log accurately reflects the final state of the terminal screen.
@@ -11,13 +35,52 @@ Seamlessly log your AI-powered coding conversations. This command-line interface
11
35
 
12
36
  ---
13
37
 
14
- # ai-cli-log
38
+ # ai-cli-log (中文说明)
39
+
40
+ 无缝记录您与 AI 进行的编程对话。本命令行工具 (CLI) 能捕获您在终端中与 Gemini、Claude 等 AI 模型的交互过程,并将整个会话保存为清晰的 Markdown 文档,便于后续查阅和归档。
41
+
42
+ ## 安装
43
+
44
+ ```bash
45
+ npm install -g ai-cli-log
46
+ ```
47
+
48
+ ## 使用方法
49
+
50
+ 使用 `ai-cli-log` 命令来包装任何您想记录的命令。会话日志将被保存到当前目录下的 `.ai-cli-logs` 文件夹中。
51
+
52
+ 例如,记录与 Google Gemini CLI (`gemini`) 的会话:
53
+
54
+ ```bash
55
+ ai-cli-log gemini
56
+ ```
57
+
58
+ 或者记录与其他工具(如 `claude`)的会话:
59
+
60
+ ```bash
61
+ ai-cli-log claude
62
+ ```
63
+
64
+ 记录的会话将保存为类似 `.ai-cli-logs/session-YYYYMMDD-HH:mm:ss.md` 的文件。
65
+
66
+ ## 快捷提示:使用别名
67
+
68
+ 为了简化您的工作流程,您可以为常用命令创建 shell 别名。例如,快速记录您的 Gemini CLI 会话:
69
+
70
+ ```bash
71
+ alias gemini-log='ai-cli-log gemini'
72
+ # 将此行添加到您的 shell 配置文件中(例如 ~/.bashrc, ~/.zshrc)
73
+ ```
74
+
75
+ 然后,您只需运行:
15
76
 
16
- 无缝记录您的 AI 驱动的编码对话。这个命令行界面 (CLI) 工具捕获您与 Gemini 和 Claude 等 AI 模型的终端交互,并将整个会话保存为整洁的 Markdown 文档,以便于回顾和归档。
77
+ ```bash
78
+ gemini-log
79
+ ```
17
80
 
18
- ## 功能特点:
81
+ ## 功能特性
19
82
 
20
- * **交互式会话捕获:** 作为其他 CLI 工具的包装器,捕获完整的交互式会话,包括用户输入和“渲染后”的输出(即在退格、光标移动等操作后您在终端上实际看到的内容)。
21
- * **精确日志记录:** 利用 `node-pty` 进行伪终端模拟,并使用 `@xterm/headless` 解析 ANSI 转义码,确保捕获的日志准确反映终端屏幕的最终状态。
22
- * **Markdown 输出:** 将记录的会话保存为整洁的 Markdown 文件,便于阅读和文档化。
23
- * **TypeScript 实现:** 使用 Node.js 和 TypeScript 构建,利用强大的生态系统进行 CLI 开发和类型安全。
83
+ * **交互式会话捕获:** 作为其他 CLI 工具的包装器,能够捕获完整的交互式会话,包括用户输入和最终“渲染”在屏幕上的输出(即处理了退格、光标移动等控制字符后的真实显示内容)。
84
+ * **精确日志记录:** 利用 `node-pty` 进行伪终端模拟,并结合 `@xterm/headless` 解析 ANSI 转义码,确保日志精确还原终端的最终显示状态。
85
+ * **Markdown 输出:** 将会话保存为干净、易读的 Markdown 文件,方便查阅和整理。
86
+ * **TypeScript 实现:** 基于 Node.js 和 TypeScript 构建,确保了代码的健壮性和类型安全。
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/index.js');
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "ai-cli-log",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Seamlessly log your AI-powered coding conversations. This command-line interface (CLI) tool captures your terminal interactions with AI models like Gemini and Claude, saving entire sessions as clean Markdown documents for easy review and documentation.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "ai-cli-log": "dist/index.js"
7
+ "ai-cli-log": "bin/ai-cli-log.js"
8
8
  },
9
9
  "scripts": {
10
10
  "build": "tsc",
Binary file