Console commands
Run with php bin/console … — inside Docker:
docker compose exec app php bin/console …
| Command | Purpose |
|---|---|
app:import <file> |
Import a strichliste 1 database.sqlite. Wipes the target database first. |
app:user:status <user> <true|false> |
Enable/disable an account by name or id. |
app:user:cleanup |
Bulk-disable accounts inactive for longer than an interval. |
app:retire-data |
Delete transactions older than an interval — the data-privacy tool. |
app:ldapimport |
Create/update users from an LDAP directory (cron-able). |
cache:clear |
Apply strichliste.yaml changes (bare metal; the Docker entrypoint does this on boot). |
doctrine:migrations:migrate |
Apply schema migrations (automatic in Docker). |
Import a strichliste 1 database
php bin/console app:import database.sqlite
This wipes the target database first — all existing users, transactions and articles are deleted — so only run it on a fresh install. It imports users and transactions; the product list is entered by hand afterwards. After the import the terminal outputs “Import done!”.
Importing into Docker — the file must be inside the container:
docker compose cp database.sqlite app:/tmp/old.sqlite
docker compose exec app php bin/console app:import /tmp/old.sqlite
There is no CSV / paper-list importer. The practical route is a small
shell loop over the API: POST /api/user per member, then
POST /api/user/{id}/transaction with the opening balance.
User status
Deactivates or activates a user account based on user id or name:
php bin/console app:user:status <userId> <active>
| argument | description |
|---|---|
| userId | username or id |
| active | true or false to activate or deactivate |
Cleanup accounts
Bulk-disable older unused accounts to clean up your list of stale users:
php bin/console app:user:cleanup --days=3 --months=10 --maxBalance=300 --confirm
| option | description |
|---|---|
| days / months / years | Inactivity interval |
| minBalance / maxBalance | Only touch accounts within this balance range (cents) |
| confirm | Skip the confirmation question |
Retire data
Deletes transactions older than the given interval — useful for data privacy (GDPR retention). Check your bookkeeping retention duties before deleting financial records.
php bin/console app:retire-data --days=3 --months=10 --confirm
| option | description |
|---|---|
| days / months / years | Age threshold |
| confirm | Skip the confirmation question |
Import from LDAP
Attention: this command needs the symfony/ldap package, which is not
included by default (and not available in the stock Docker image). Inside
your installation run:
composer require symfony/ldap
Bare minimum example:
php bin/console app:ldapimport --host=ldap.company.tld \
--bindDn="cn=reader,ou=ldapuser,dc=company" \
--password="yourpass" --baseDn="ou=employee,dc=company"
| option | description |
|---|---|
| host | hostname or IP |
| port | port of your LDAP server (default: 636) |
| ssl | none, ssl or tls (default: ssl) |
| bindDn | LDAP user |
| password | Password |
| baseDn | LDAP base DN |
| query | LDAP filter query (default: ($userField=*)) |
| userField | Username field (default: uid) |
| emailField | Mail address field (default: off) |
| update | Update the mail address if the user exists (default: off) |
You can run this command as a cronjob to pick up changes in your LDAP directory, e.g. new members or changed mail addresses.
Getting data out
For backups and exports, see the backup commands in the README (SQL dump / SQLite file) — or read everything as JSON via the API. There is no dedicated export command.