Use the command line
Run reports, create and import companies, verify, back up and export from a terminal with hisaab-cli.
hisaab-cli is installed alongside the app and works on the same company folders. Run hisaab-cli help to see the usage text.
On Windows, tick Add hisaab-cli to PATH in the installer. On macOS the tool is inside the app at /Applications/Hisaab.app/Contents/Resources/hisaab-cli. With the AppImage, run Hisaab-<version>-x86_64.AppImage --cli followed by the command.
Reports#
SOURCE is a company folder or a legacy XML file. A file is loaded in memory and not saved.
| Command | What it does |
|---|---|
hisaab-cli reports |
List every report name |
hisaab-cli report <SOURCE> <NAME> [options] |
Print or export one report |
| Option | Meaning |
|---|---|
--from D, --to D |
Period. Default is the period shown by company info |
--ledger L |
Ledger for ledger-based reports |
--group G |
Group for Group Summary |
--item I |
Stock item for Item Movement |
--query TEXT |
Filter rows, as the search box does in the app |
--summary |
Summary instead of detailed |
--csv, --html, --json |
Output format. Default is plain text |
--xlsx |
An Excel workbook, with amounts as numbers. Needs --out FILE |
--out FILE |
Write to a file instead of the screen |
Dates may be written 20250401, 1-4-2025 or 1-Apr-25. Short names work for common reports: tb, pl, bs, daybook, stock, gstr1, gstr3b.
Companies#
| Command | What it does |
|---|---|
hisaab-cli companies [ROOT] |
List companies under ROOT. Default is the app's companies folder |
hisaab-cli company new <DIR> <NAME> |
Create a company folder. Refuses if one exists there |
hisaab-cli company import <DIR> <FILE>... |
Import one or more legacy XML files. Re-imports never duplicate |
hisaab-cli company info <DIR> |
Period, counts and a data-health summary |
hisaab-cli company log <DIR> [N] |
The edit log, newest first. Default 30 entries |
hisaab-cli company verify <DIR> |
Check every journal entry's checksum and sequence |
hisaab-cli company backup <DIR> |
Take a backup now. It is kept like one taken with Back up now. Accountant or Admin access is needed |
hisaab-cli company export <DIR> <FORMAT> [--from D] [--to D] [--out FILE] |
Export. FORMAT is one of --xml (legacy XML), --json (whole company) or --gstr1 (GSTR-1 JSON) |
For a company with users, set HISAAB_USER and HISAAB_PASSWORD first. For an encrypted company, set HISAAB_PASSPHRASE.
Legacy-format tools#
| Command | What it does |
|---|---|
hisaab-cli import <file> |
Read a legacy XML, SDB or TSF file and list what it holds. Nothing is saved |
hisaab-cli render <file> [--tdl F] [--report NAME] |
Render a report over a legacy file, optionally from your own definition file. Default is a voucher register |
hisaab-cli push <file> [--host H] [--port P] [--company NAME] |
Send a file to a live legacy XML server as an import |
hisaab-cli live [HOST] [PORT] [--report NAME] [--company NAME] [--from YYYYMMDD] [--to YYYYMMDD] |
Pull a report from a live legacy XML server. Default report is Day Book |
hisaab-cli version |
Print the version |
push and live default to host localhost and port 9000. Their dates must be eight digits.
Examples#
Create a company and import an export file twice. The second run adds nothing:
$ hisaab-cli company new books "Acme Traders"
created 'Acme Traders' at books
$ hisaab-cli company import books export.xml
export.xml: 9 added, 0 already present, 0 failed
$ hisaab-cli company import books export.xml
export.xml: 0 added, 9 already present, 0 failed
Print the Trial Balance:
$ hisaab-cli report books tb
TRIAL BALANCE — 01-Apr-25 to 31-Mar-26
Particulars Debit Credit
---------------------------------------------
Current Assets 16,764.00
Bank Accounts 16,764.00
Practice Bank 3,236.00
Practice Bank 2 20,000.00
...
Grand Total 1,25,000.00 1,25,000.00
Verify and back up:
$ hisaab-cli company verify books
ok — 10 journal entries, checksums and sequence intact
$ hisaab-cli company backup books
backup 20261119-062156-manual (8871 bytes) at books/backups/20261119-062156-manual
Save the Trial Balance as an Excel workbook:
$ hisaab-cli report books tb --xlsx --out tb.xlsx
wrote tb.xlsx (2315 bytes)
Limits#
company importreads legacy XML only. Import CSV and Excel sheets in the app.- There is no command to enter or alter vouchers, restore a backup or manage users.
company export --xmlcovers vouchers of all dates unless you give--fromand--to.--jsonis always the whole company.--gstr1uses the period shown bycompany infounless you give dates.
Next#
Something here wrong or missing? Open a ticket and mention this page.
