KontoCloud

Help / Rules and tools

kc CLI

The kc command-line tool works with the same API and the same rules as the application; signing in, choosing a legal entity and the main commands.

On this page

kc is a command-line tool for KontoCloud. It uses the same SDK as the web and desktop application and talks to the same API. That is why the same roles and the same rules in the database apply. What you may not do in the application, you may not do with kc either. Error messages are the same, with the prefix “Грешка:” (Error:).

The CLI asks for consent before it counts commands. Set KC_CLI_NO_ANALYTICS=1 to turn it off.

Installation

On macOS and Linux (aarch64 and x86_64), install kc with one command in a terminal:

curl -fsSL -u kc https://get.kc.mk/install.sh | bash

The script downloads the file for your system from get.kc.mk, checks it with SHA-256 and puts it in ~/.local/bin, without sudo. Set another folder with KC_INSTALL_DIR and an exact version with KC_VERSION (for example KC_VERSION=0.1.0). If ~/.local/bin is not in PATH, the script warns you. The desktop app does not include kc; it is installed separately.

While KontoCloud is in a closed trial, get.kc.mk asks for a password, the same one as for app.kc.mk. curl asks for it for the script and the script asks once more for the package; to skip the prompt, put it in KC_GET_PASSWORD.

From the source code, with Rust: cargo build --release -p kc-cli produces the file target/release/kc.

Windows (WSL 2)

On Windows, use the same Linux package in WSL 2. If you do not have a WSL 2 Linux distribution, install Ubuntu 24.04 from Windows Terminal with administrator rights.

wsl --install -d Ubuntu-24.04

Restart Windows if prompted. After installation, open the Ubuntu profile in Windows Terminal and complete the initial setup.

If curl is missing, install it in Ubuntu with sudo apt update && sudo apt install curl.

Install and verify kc in the Ubuntu terminal.

curl -fsSL -u kc https://get.kc.mk/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
kc --version

Run subsequent kc commands in the Ubuntu terminal. Microsoft’s WSL installation guide.

Settings

Option Variable Meaning
--api KC_API Address of the API. Default https://api.kontocloud.mk.
--tenant, -t KC_TENANT The legal entity (id) for the command. The list is in kc tenants.
— KC_TOKEN Sign-in token instead of the saved session.
— KC_PASSWORD Password for register, login, password and the password confirmations in 2fa. If it is missing, kc asks for it in the terminal, without showing it.
— KC_NEW_PASSWORD New password for password and password-reset. If it is missing, kc asks for it in the terminal, without showing it.

Most commands work in one legal entity. If none is given, kc prints “недостасува –tenant (или KC_TENANT)” (missing –tenant or KC_TENANT).

Important: Do not put a password or token in scripts that you keep or share.

  1. kc register [email protected] "Ана" — new user.
  2. kc login [email protected] — sign in. The session is stored in ~/.config/kontocloud/session, readable only by you (0600). It is valid only for the API you signed in to.
  3. kc tenants — list of your legal entities. kc tenant-add "Име ДООЕЛ" <EDB> creates a new legal entity, with the prescribed chart of accounts (Official Gazette 174/2011).
  4. Set KC_TENANT to the id that kc prints (for example export KC_TENANT=…) or add -t <id> to every command.
Command What it does
kc health Checks whether the API is running.
kc me The signed-in user.
kc logout Sign out; the session is also invalidated in the database.
kc members Members of the legal entity and their roles.
kc member <email> <role> Grant a role (super_admin, admin, sales, accountant, operator, reviewer, viewer) or revoke access with --remove. Administrator only.
kc invite <email> <role> Invitation with a one-time code valid for 7 days. Administrator only.
kc invitations, kc invite-cancel <id> The invitations and cancelling an invitation.
kc join <code> Accept an invitation; you are signed in with the invited email.
kc mfa-policy status|on|off Required second step for members; on and off need --reason. Only the administrator changes it.
kc logo Logo of the legal entity: --set <png>, --out <file>, --clear. Only the administrator changes it.
kc contact-email Contact email of the legal entity: --set <email>, --clear. Replies to signing messages go there. Only the administrator changes it.

Roles are explained in Roles and permissions, and invitations in Invitations.

Account and security

Command What it does
kc profile show|name|avatar Your profile: full name, photo (PNG, JPEG or WebP up to 256 KB; --remove takes it off).
kc password Changes the password; other sessions are invalidated.
kc password-reset [email] Requests a forgotten-password link. With --code <code> (the part after „=“ in the link) it sets a new password and invalidates all sessions.
kc verify-email [code] Without a code it sends a new email confirmation link; with a code it confirms the email.
kc 2fa status State of the second step: authenticator app, passkeys, recovery codes.
kc 2fa totp, kc 2fa enable <code> New secret for the authenticator app, then switching it on with the first code; prints the recovery codes.
kc 2fa disable|recovery-codes|passkey-remove Switches the app off, makes new recovery codes, removes a passkey; they ask for the password.
kc activity Every request you made to the API (--limit, --before for older ones); with --tenant the requests in the legal entity, only for the administrator.

A new passkey is added only in the app; see Profile and security.

Main commands

The descriptions come from the tool itself (kc <command> --help).

Bookkeeping and reports

Command What it does
kc accounts, kc account-add Chart of accounts; a new sub-account under a synthetic account.
kc journal Journal (latest lines).
kc show <id> Show an entry.
kc post Post an entry; lines are --line account:debit:credit.
kc storno <id> --date … --reason … Reversal (red storno) of an entry.
kc attach, kc attachments, kc download Attachments: upload, list, download with SHA-256 check.
kc draft, kc approve Draft entries and their review (four eyes).
kc scheme Posting schemes.
kc tb, kc card, kc cash Trial balance, account card, cash book.
kc export-journal Export of the journal to CSV (UTF-8, ;).
kc numbering Check of entry numbering (gaps, duplicates).
kc invoice Invoices: list, show, add, cancel, print (HTML of an outgoing invoice). Outgoing and incoming, advances and credit notes, with the entry and the VAT record.
kc series Counters for the numbers of outgoing invoices and stock documents: list, add, edit (a new version from a date, with a reason), next. See Document numbering.
kc reconcile Reconciliation of the cash register and fixed assets with the general ledger.

Records

Command What it does
kc partner, kc open-items, kc ios, kc ageing Partners, open items, IOS, ageing.
kc bank Bank accounts, statement import, closing open items and posting.
kc pay PP30 / PP50 payment orders, payment plan and e-banking package.
kc comp Set-offs.
kc interest, kc dunning Late interest and dunning letters.
kc agreement Contracts with documents, electronic signatures and seals.
kc assets, kc asset-add, kc asset, kc depreciate Fixed assets and depreciation.
kc fx Exchange rates (manual entry, CSV, NBRM).
kc ujp, kc efaktura, kc signer e-Invoice and local signer.

VAT, payroll and inventory

Command What it does
kc vat-registrations, kc vat-register VAT registrations.
kc vat-book, kc invoice-book, kc vat-summary Book of outgoing/incoming invoices and imports, KIF / KUF, VAT totals.
kc vat-return, kc vat-returns VAT calculation for a tax period.
kc employee, kc payroll, kc payslip HR records, payroll, payslip.
kc other-income, kc profit-tax Other income (e-PDD) and profit tax.
kc item, kc warehouse, kc stock, kc stocktake Items, warehouses, stock documents, stocktake.

Control and annual accounts

Command What it does
kc close Month-end close: seven steps in order for the month.
kc board <YYYY-MM> Workboard: your legal entities × the close steps.
kc deadlines Deadlines, overview only, without email.
kc calendar <year> Working calendar: public holidays and number of working days.
kc responsible Register of responsible persons.
kc filing Filings to the state.
kc lock Period lock: without a date it shows the state.
kc year Business year and year-end closing.
kc size, kc allocate, kc allocations Size of the entity per year; allocation of partial accounts to a position (AOP).
kc report, kc reports, kc report-show Annual accounts: overview, or assembling with --generate (the year must be locked).
kc audit Audit trail (latest events).

Archive and administration

Command What it does
kc archive --out <file> Complete archive (ZIP) for an auditor/UJP.
kc verify-archive <file> Verification of a previously downloaded archive (CRC and SHA-256).
kc subscription Subscription status (active or read-only).
kc clients My clients: the legal entities where you have a role, with drafts and deadlines.
kc bureau Accounting bureau: staff and clients. Does not give access to the books.

Example: end of the month

kc close show 2026-03
kc close done 2026-03 bank
kc lock --until 2026-03-31 --reason "March is closed"
kc archive --out arhiva-2026-03.zip

The month is written as YYYY-MM, and dates as YYYY-MM-DD.

Something unclear or wrong? Write to us at [email protected].