← 返回命令列表

Linux command

gnucash-cli 命令

文件

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

常用示例

Update quotes for all securities

gnucash-cli --quotes get [file.gnucash]

Show Finance::Quote version and sources

gnucash-cli --quotes info

Dump quotes for specific securities

gnucash-cli --quotes dump [namespace] [symbol1] [symbol2]

List available reports

gnucash-cli --report list

Run a report

gnucash-cli --report run --name "[Balance Sheet]" [file.gnucash]

Export report to file

gnucash-cli --report run --name "[report]" --output-file [output.html] [file.gnucash]

说明

gnucash-cli is the command-line interface for GnuCash, a personal and small business financial accounting application. It operates in two modes: quotes mode for fetching and updating security prices, and report mode for generating financial reports. This allows automation of price updates and report generation without opening the GUI.

参数

-h, --help
Show help message.
-v, --version
Show GnuCash version.
-Q, --quotes _command_
Quotes mode: info, get, dump.
--namespace _regexp_
Regular expression for commodity namespace (for quotes dump).
-R, --report _command_
Report mode: run, show, list.
--name _name_
Report name for run command.
--output-file _file_
Output file for report.
--export-type _type_
Export format type.
--debug
Enable debugging mode.
--extra
Enable developer/debugging features.
--log _arg_
Log level overrides (can be specified multiple times).
--logto _file_
File to log into (use "stderr" or "stdout" for those streams).
-V, --verbose
Show extended Finance::Quote parameters (with quotes dump).

FAQ

What is the gnucash-cli command used for?

gnucash-cli is the command-line interface for GnuCash, a personal and small business financial accounting application. It operates in two modes: quotes mode for fetching and updating security prices, and report mode for generating financial reports. This allows automation of price updates and report generation without opening the GUI.

How do I run a basic gnucash-cli example?

Run `gnucash-cli --quotes get [file.gnucash]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -h, --help do in gnucash-cli?

Show help message.