You can give a password to KeePassXC through standard input on the command line with the option
--pw-stdin. Thus, in a most simple way, you can automatically open a KeePassXC database with a command like:
echo <yourpassword> | keepassxc --pw-stdin <path-to-your-database>.kdbx
This compromises security quite seriously compared to entering the password on opening directly, because your password is stored unencrypted in a file on your system.
A more secure option is to use another password vault, such as Gnome Keyring (Source). Your password is stored in an unreadable form, and one needs to be logged in as your user to be able to open KeePassXC or read the password.
You will need to install
libsecret-tools for this to work.
First you need to store the KeypassCX password in the Gnome keyring. You can do this with the "Passwords and Keys" tool or with the command:
secret-tool store --label="KeePass <database_name>" keepass <database_name>
Next to a label, you are providing an attribute (here we choose "keepass") and a value (you can use the name of your database () or another string that should not contain spaces).
After login, you can then launch and unlock KeepassXC with the command
secret-tool lookup keepass <database_name> | keepassxc --pw-stdin <path-to-your-database>.kbdx
Still, this option is significantly less secure than supplying the password yourself while using KeepPassXC, but the well informed user should have the freedom to make the balance between security and convenience.