Add RattailV2RattailCommands

Lance Edgar 2025-10-19 09:10:50 -05:00
parent e62f68926a
commit 28dae7b82d

@ -0,0 +1,32 @@
# Rattail Commands
Rattail ships with a command line / options framework. More on that can be found [[http://rattail.edbob.org/docs/rattail-0.2/rattail.commands.html|here]] and [[http://rattail.edbob.org/docs/rattail-0.2/howto.create_command.html|here]].
The following commands are part of the core `rattail` package.
## rattail shell
This command will launch a Python shell with the `rattail` package pre-imported and optionally pre-initialized:
```
lance@alfalfa:~/src/rattail2$ rattail -v shell
rattail.conf: INFO: Reading config file(s): ['/etc/rattail.conf']
rattail.conf: INFO: Reading config file(s): ['/etc/rattail/rattail.conf']
rattail.conf: INFO: Reading config file(s): ['/usr/local/etc/rattail.conf']
rattail.conf: INFO: Reading config file(s): ['/usr/local/etc/rattail/rattail.conf']
rattail.conf: INFO: Reading config file(s): ['/home/lance/.rattail.conf']
rattail.conf: INFO: Reading config file(s): ['/home/lance/.rattail/rattail.conf']
Launching Python shell...
conf file(s): ['/home/lance/.rattail.conf']
>>> config.get('shrubbery', 'max_branches')
'420'
>>>
```
## rattail uuid
This command will generate an UUID and print it to the console.
If you specify the `--gui` option, instead of printing an UUID it will display a small wxPython application:
![rattail uuid screenshot](https://rattailproject.org/images/rattail-gen-uuid.png)