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.
- 🏢 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.
- 🔐 Secure Configuration: Uses
.envfiles for managing server credentials.
Ensure you have Composer installed.
-
Clone the repository:
git clone https://github.com/VitexSoftware/abraflexi-cli.git cd abraflexi-cli -
Install dependencies:
composer install
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-clinote: Change trixie to your debian/ubuntu distribution name (bookworm, jammy, sid, etc. )
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_deNote: The tool supports both ABRAFLEXI_LOGIN and ABRAFLEXI_USER variables.
You can specify a custom environment file using the --envfile global option:
bin/abraflexi-cli --envfile=/path/to/your.env list-companiesThe main executable is located at bin/abraflexi-cli.
bin/abraflexi-cli listGet a list of all companies accessible on the server:
bin/abraflexi-cli list-companiesList all available evidences (endpoints) and their descriptions:
bin/abraflexi-cli list-evidencesList records from a specific evidence (e.g., adresar for Addresses):
bin/abraflexi-cli record adresar listCommon 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
Show all fields for a specific record by its ID or Code:
bin/abraflexi-cli record adresar show "code:AAA"- PHP 8.1 or higher
- Composer
- Access to an AbraFlexi server
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.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Vitex Software.