← 返回命令列表

Linux command

jrnl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Write a quick journal entry

jrnl [Today was a good day.]

Write entry with specific date

jrnl [yesterday]: [Had a great meeting.]

Open editor

jrnl

List recent entries

jrnl -n [10]

Search entries

jrnl -contains "[search term]"

Show entries with specific tag

jrnl @[tag]

Show entries from a date range

jrnl -from "[2024-01-01]" -to "[2024-01-31]"

Edit the last entry

jrnl --edit -1

说明

jrnl is a simple command-line journal application for recording daily thoughts, notes, and ideas. It stores entries in plain text, making them portable and future-proof. Entries consist of a date, optional title (first sentence), and body text. Tags are created by prefixing words with @ (e.g., @work, @idea). The first line or sentence before a period becomes the entry title, displayed in listings. Quick entries can be typed directly on the command line. Running jrnl without arguments opens your configured editor for longer entries. Date parsing is natural language aware: "yesterday", "last friday", "2 days ago" work as expected. Configuration is stored in ~/.config/jrnl/jrnl.yaml, defining the journal file location, editor, encryption settings, and multiple journals. You can maintain separate journals (work, personal, etc.) and switch between them. Encryption with AES-256 is available for sensitive journals, requiring a password to read or write entries. Entries can be exported to various formats for backup or migration.

参数

-n, --limit _count_
Show only the last n entries.
-from _date_
Show entries from this date onwards.
-to _date_
Show entries up to this date.
-on _date_
Show entries on specific date.
-contains _text_
Show entries containing text.
-and
Require all filter conditions (default: any).
-starred
Show only starred entries.
--edit
Open entries in editor.
--delete
Delete matching entries.
--export _format_
Export entries (json, markdown, text, xml, yaml, tags).
--import _file_
Import entries from file.
--format _format_
Output format for display.
--tags
List all tags.
--short
Show only entry titles.
--config-override _key value_
Override config setting.
-ls
List available journals.

FAQ

What is the jrnl command used for?

jrnl is a simple command-line journal application for recording daily thoughts, notes, and ideas. It stores entries in plain text, making them portable and future-proof. Entries consist of a date, optional title (first sentence), and body text. Tags are created by prefixing words with @ (e.g., @work, @idea). The first line or sentence before a period becomes the entry title, displayed in listings. Quick entries can be typed directly on the command line. Running jrnl without arguments opens your configured editor for longer entries. Date parsing is natural language aware: "yesterday", "last friday", "2 days ago" work as expected. Configuration is stored in ~/.config/jrnl/jrnl.yaml, defining the journal file location, editor, encryption settings, and multiple journals. You can maintain separate journals (work, personal, etc.) and switch between them. Encryption with AES-256 is available for sensitive journals, requiring a password to read or write entries. Entries can be exported to various formats for backup or migration.

How do I run a basic jrnl example?

Run `jrnl [Today was a good day.]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n, --limit _count_ do in jrnl?

Show only the last n entries.