A command-line tool for quick note taking | 一个用来快速记录的命令行工具
npm install @vtxf/quick-noteA command-line tool for quick note-taking.
qn -s command to automatically generate a summary of the day's notes.Additionally, you can configure the notes directory directly as a folder in your Obsidian repository, allowing content recorded through quick-note to be seamlessly viewed and managed in Obsidian, achieving a perfect combination of lightweight quick recording and deep note management.
qn command, and the tool will format the content and append it to today's misc file.qn -g command, and the tool will call the OpenAI API to generate a summary of today's notes.bash
npm -g i @vtxf/quick-note
`
2. Usage
`bash
qn
`
For example:
`bash
qn I worked for an hour at the company today.
`
3. Summary
`bash
qn -g
`
For example:
`bash
qn -g 20251015
`Configuration File
On first use, the tool will create a configuration file in the user directory:
- Windows: %USERPROFILE%\.quick-note\config.json
- Linux/macOS: ~/.quick-note/config.jsonContent in config.json:
`
{
"env": {
"QUICKNOTE_NOTE_DIR": "~/.quick-note/default-note",
"QUICKNOTE_OPENAI_BASE_URL": "http://localhost:1234/v1",
"QUICKNOTE_OPENAI_API_KEY": "",
"QUICKNOTE_OPENAI_MODEL": "qwen/qwen3-4b-thinking-2507",
"QUICKNOTE_EDITOR": 'code -r '
}
}
`
Where
is the notes storage directory
is the misc file path$3
In addition to using the default code editor, you can configure other editors as needed:- Using notepad editor:
`
"QUICKNOTE_EDITOR": 'notepad '
`
- Using vim editor:
`
"QUICKNOTE_EDITOR": 'vim '
`Note: is the history file path, used to open the history record file.
Project Directory Structure
`
quick-note/
├── bin/ # Command-line tool entry
│ └── qn.js # Main execution file
├── src/ # Source code directory
│ ├── config.js # Configuration file handling
│ ├── note.js # Note processing logic
│ ├── summary.js # Note summary functionality
│ ├── summary_prompt.js # Prompts for note summary functionality
│ └── utils.js # Utility functions
├── package.json # Project configuration and dependencies
└── README.md # Project documentation
`Note Storage Specification
1. Quick notes are stored here: {QUICKNOTE_NOTE_DIR}/YYYY/YYYYMM/YYYYMMDD_misc/YYYYMMDD_misc.md. Images are stored in the images directory of the current note's directory.
- YYYY: Four-digit year, e.g., 2025
- MM: Two-digit month, e.g., 10 for October
- DD: Two-digit date, e.g., 15 for the 15th day of the month
- Example: If today is October 15, 2025, notes will be stored in
~/.quick-note/default-note/2025/202510/20251015_misc/20251015_misc.md2. Summary files are stored here: {QUICKNOTE_NOTE_DIR}/YYYY/YYYYMM/YYYYMMDD_summary/YYYYMMDD_summary.md. Images are stored in the images directory of the current note's directory.
- Example: If today is October 15, 2025, the summary file will be stored in
~/.quick-note/default-note/2025/202510/20251015_summary/20251015_summary.mdYYYYMMDD_misc.md File Content Format
Format Description
1. Each note is recorded as a Markdown title with the format # YYYYMMDD_HHMMSS
- YYYYMMDD: Four-digit year, two-digit month, two-digit date, e.g., 20251011 represents October 11, 2025
- HHMMSS: Two-digit hour, two-digit minute, two-digit second, e.g., 151812 represents 15:18:12
2. Below the title is the specific content of the note, which can be plain text, links, code snippets, etc.
3. Each note is separated by a blank line
4. New notes are appended to the end of the file in chronological orderExample
`markdown
20251011_151812
Today I learned new markdown programming skills.20251011_152000
claude code documentation: https://docs.claude.com/en/docs/claude-code/claude_code_docs_map.md`Command Parameters
1. qn [note]: Quickly record a note, note is a sentence.
2. qn -e: Use the editor {QUICKNOTE_EDITOR} to open the YYYYMMDD_misc.md file.
3. qn -g: Summarize and organize files in the misc folder, then generate a YYYYMMDD_summary.md file. The summary content is divided into three parts: knowledge points, daily records, and others.
- Knowledge points: Knowledge points and collections unrelated to the author themselves
- Daily records: Daily records, feelings, evaluations, to-do items, etc. related to the author themselves
- Others: Other content not belonging to the above two categories
4. qn -p: Use the editor to open the summary prompt configuration file (~/.quick-note/summary_prompt.md), allowing you to customize the AI summary prompt.Summary Prompt Configuration
The tool supports customizing AI summary prompts to better control the format and content of summaries.
Prompt File Location
- Windows:
%USERPROFILE%\.quick-note\summary_prompt.md
- Linux/macOS: ~/.quick-note/summary_prompt.mdPrompt File Format
The prompt file is a Markdown file containing custom summary prompts. If this file does not exist, the tool will automatically create a default prompt file.
Default prompt content is as follows:
`markdown
Summary Prompt
You are a professional note organization assistant. Please generate a structured summary report based on the user's daily note content.
Requirements:
1. Divide the content into the following parts:
- Knowledge points: Knowledge points, collections, technical materials, learning methods, etc. unrelated to the author themselves
- Daily records: Daily records, feelings, evaluations, to-do items, personal thoughts, etc. related to the author themselves
- Others: Other content not belonging to the above two categories (only show when there is content)
2. Content requirements for each part:
- Extract core points, avoid redundancy
- Preserve important information from the original text
- Use concise and clear language
- If a part has no content, do not display that part
3. Output format:
- Use Markdown format
- Use second-level headings (##) for each part
- Use unordered lists (-) for items
- Important content can be appropriately bolded
4. Special notes:
- Maintain an objective and neutral tone
- Do not add information not present in the original text
- For technical content, maintain accurate professional terminology
- For personal feeling content, maintain the original meaning
- Do not include any thought processes or analysis explanations
- Only output the final summary content
Please generate a summary based on the following note content:
`Custom Prompts
You can modify the prompt file as needed, for example:
- Add new summary categories
- Modify summary format
- Add specific summary requirements
- Adjust the AI's tone and style
After modifying the prompt, the next time you execute the
qn -g command, the new prompt will be used to generate the summary.Usage Examples
`bash
Quickly record a note
qn Today I learned new programming skillsOpen today's note file with an editor
qn -eGenerate today's note summary
qn -gGenerate a note summary for a specific date
qn -g 20251015
``