LinuxCommandLibrary

gnucash-cli

A command-line version of GnuCash.

TLDR

Get quotes for currencies and stocks specified in a file and print them

$ gnucash-cli --quotes get [path/to/file.gnucash]
copy


Generate a financial report of a specific type, specified by --name
$ gnucash-cli --report run --name "[Balance Sheet]" [path/to/file.gnucash]
copy

SYNOPSIS

gnucash-cli [options] [ accounts.gnc ]

DESCRIPTION

gnucash-cli enables certain intraction with a gnucash datafile directly from the command line.

It has two modes: quotes mode and report mode.

Quotes Mode (activated with --quotes <cmd>)

This mode has options to get online quotes for foreign currencies and stocks in the given data file. It supports the following command:

get

Retrieves online quotes. Note this requires Finance::Quote to be properly configured for your system.

The get command takes the following options:

--namespace=REGEXP

Regular expression determining which namespace commodities will be retrieved.

Report Mode (activated with --report <cmd>)

This mode has options to work with reports in the given data file. It supports the following command:

run

Runs a report on the given data file.

The run command takes the following options:

--name=REPORT_NAME

Name of the report to run

--export-type=TYPE

Specify export type

General Options

--version

Show GnuCash version

--help

Show this help message

--debug

Enable debugging mode: increasing logging to provide deep detail.

--extra

Enable extra/development/debugging features.

--log

Log level overrides, of the form "log.ger.path={debug,info,warn,crit,error}" This option can be specified multiple times.

--logto

File to log into; defaults to "/tmp/gnucash.trace"; can be "stderr" or "stdout".

FILES

~/.gnucash/config.auto

Automatically generated per-user configuration file. DO NOT EDIT MANUALLY!

ENVIRONMENT

GNC_DEBUG

Enable debugging output. This allows you to turn on the debugging earlier in the startup process than you can with --debug.

GUILE_LOAD_PATH

An override for the GnuCash scheme load path. You shouldn't need to alter this. For more information see the README file.

GNC_MODULE_PATH

An override for the GnuCash scheme load path for Gnucash modules. You shouldn't need to alter this. For more information see the README file.

BUGS

Please report any bugs using the bug reporting form on the GnuCash web site.

SEE ALSO

GnuCash has extensive on-line help available from the "help" menu. Additional information and the latest version is available at the web site: https://www.gnucash.org

AUTHOR

Robert Merkel <rgmerk@mira.net> wrote this manpage.

GnuCash was written by Robin Clark, Linas Vepstas, and a cast of thousands.

Copied to clipboard