| .github/workflows | ||
| bin | ||
| debian | ||
| man | ||
| nbproject | ||
| src/Command | ||
| tests | ||
| .gitignore | ||
| .php-cs-fixer.dist.php | ||
| abraflexi-cli.svg | ||
| AGENTS.md | ||
| commandline.svg | ||
| composer.json | ||
| composer.lock | ||
| example.env | ||
| LICENSE | ||
| Makefile | ||
| phpstan-default-baseline.neon | ||
| phpstan-default.neon.dist | ||
| phpunit.xml | ||
| README.md | ||
AbraFlexi CLI
A powerful, Symfony-based Command Line Interface for AbraFlexi, allowing you to interact with your accounting data directly from the terminal. This tool is built on top of the robust spojenet/flexibee library.
Features
- 🏢 Multi-company Support: Easily list and switch between available companies.
- 📂 Evidence Discovery: Browse all available API endpoints (evidences) on your server.
- 🔍 Record Inspection: List records from any evidence with custom columns and limits.
- 📄 Detail View: Show full details for specific records.
- ✏️ Record Creation: Create records with mandatory-field validation and dry-run support.
- 📡 Connection Status: Verify server reachability and company configuration at a glance.
- 🔐 Secure Configuration: Uses
.envfiles for managing server credentials.
Installation
Ensure you have Composer installed.
-
Clone the repository:
git clone https://github.com/VitexSoftware/abraflexi-cli.git cd abraflexi-cli -
Install dependencies:
composer install
Deb package repository
https://repo.vitexsoftware.com/
sudo curl -fsSL http://repo.vitexsoftware.com/KEY.gpg -o /usr/share/keyrings/vitexsoftware-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/vitexsoftware-archive-keyring.gpg] http://repo.vitexsoftware.com/debian/ trixie main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo apt update
sudo apt install abraflexi-cli
note: Change trixie to your debian/ubuntu distribution name (bookworm, jammy, sid, etc. )
Configuration
The CLI uses environment variables for authentication. Create a .env file in the project root:
ABRAFLEXI_URL=https://demo.flexibee.eu:5434
ABRAFLEXI_LOGIN=winstrom
ABRAFLEXI_PASSWORD=winstrom
ABRAFLEXI_COMPANY=demo_de
Note: The tool supports both ABRAFLEXI_LOGIN and ABRAFLEXI_USER variables.
Custom Environment File
You can specify a custom environment file using the --envfile global option:
bin/abraflexi-cli --envfile=/path/to/your.env list-companies
Usage
The main executable is located at bin/abraflexi-cli.
After installing the Debian package the binary is available system-wide as abraflexi-cli.
A full manpage is installed alongside the package — read it with:
man abraflexi-cli
General Help
bin/abraflexi-cli list
0. Check Connection Status
Verify the configured server and company are reachable:
bin/abraflexi-cli status
1. List Available Companies
Get a list of all companies accessible on the server:
bin/abraflexi-cli list-companies
2. List Evidences
List all available evidences (endpoints) and their descriptions:
bin/abraflexi-cli list-evidences
3. List Records from Evidence
List records from a specific evidence (e.g., adresar for Addresses):
bin/abraflexi-cli record adresar list
Common Options:
--columnsor-c: Comma-separated list of columns to display (default:id,kod,nazev).--limitor-l: Number of records to retrieve (default:20).--startor-s: Offset for pagination.--orderor-o: Sorting (e.g.,nazev@Afor ascending,nazev@Dfor descending).--filteror-f: Filtering query (e.g.,nazev BEGINS 'A').--detailor-d: Level of detail (summary,full,id,mini,custom).
Examples:
-
Filtering & Limiting:
bin/abraflexi-cli record adresar list --filter "nazev BEGINS 'A'" --limit 5 -
Sorting:
bin/abraflexi-cli record faktura-vydana list --order sumCelkem@D --columns id,kod,sumCelkem -
Pagination:
bin/abraflexi-cli record adresar list --limit 10 --start 20
4. Show Record Details
Show all fields for a specific record by its ID or Code:
bin/abraflexi-cli record adresar show "code:AAA"
5. Create a Record
Create a new record using JSON data:
bin/abraflexi-cli record adresar create --data='{"nazev":"ACME s.r.o.","ic":"12345678"}'
Or supply fields as individual options:
bin/abraflexi-cli record adresar create --nazev="ACME s.r.o." --ic=12345678
Use --dry-run to validate without writing to the server:
bin/abraflexi-cli record faktura-vydana create --dry-run --data='{"kod":"TESTINV","datVyst":"2026-01-01"}'
Mandatory fields are checked automatically; use --force to bypass that check.
Requirements
- PHP 8.1 or higher
- Composer
- Access to an AbraFlexi server
Development
The project is structured following PSR-4 autoloading:
bin/abraflexi-cli: CLI entry point.src/Command/: Symfony Console command implementations.src/Command/BaseCommand.php: Shared logic for authentication.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Vitex Software.