CLI Commands¶
FlexMeasures comes with a command-line utility, which helps to manage data. Below, we list all available commands.
Each command has more extensive documentation if you call it with --help
.
We keep track of changes to these commands in FlexMeasures CLI Changelog. You can also get the current overview over the commands you have available by:
flexmeasures --help
This also shows admin commands made available through Flask and installed extensions (such as Flask-Security and Flask-Migrate), of which some are referred to in this documentation.
add
- Add data¶
|
Initialize structural data like asset types, market types and weather sensor types. |
|
Create a FlexMeasures tenant account. |
|
Create a FlexMeasures user. |
|
Create a new asset. |
|
Add a weather sensor. |
|
Collect weather forecasts from the DarkSky API. |
|
Create forecasts. |
delete
- Delete data¶
|
Delete all structural (non time-series) data like assets (types), markets (types) and weather sensors (types) and users. |
|
Delete a tenant account & also their users (with assets and power measurements). |
|
Delete a user & also their assets and power measurements. |
|
Delete measurements (with horizon <= 0). |
|
Delete forecasts and schedules (forecasts > 0). |
jobs
- Job queueing¶
|
Start a worker process for forecasting and/or scheduling jobs. |
|
Clear a job queue. |
db-ops
- Operations on the whole database¶
|
Create a dump of all current data (using pg_dump). |
|
Load backed-up contents (see db-ops save), run reset first. |
|
Reset database data and re-create tables from data model. |
|
Restore the dump file, see db-ops dump (run reset first). |
|
Backup db content to files. |