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
flexmeasures [command] --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 users, roles and asset types. |
|
Create a FlexMeasures tenant account role. |
|
Create a FlexMeasures tenant account. |
|
Create a FlexMeasures user. |
|
Create a new asset type. |
|
Create a new asset. |
|
Add a new sensor. |
|
Load beliefs from file. |
|
Add a new data source. |
|
Create forecasts. |
|
Create a charging schedule for a storage asset. |
|
Create a schedule for a process asset. |
|
Add holiday annotations to accounts and/or assets. |
|
Add annotation to accounts, assets and/or sensors. |
|
Create a toy account, for tutorials and trying things. |
|
Create a report. |
show
- Show data
|
List accounts. |
|
Show an account, its users and assets. |
|
List available asset types. |
|
Show an asset and its sensors. |
|
List available account- and user roles. |
|
List available data sources. |
|
Plot time series data. |
|
List available reporters. |
|
List available schedulers. |
edit
- Edit data
|
Edit (or add) an asset attribute or sensor attribute. |
|
Assign a new event resolution to an existing sensor
and resample its data accordingly.
|
|
Transfer the ownership of an asset and its children to
a different account.
|
delete
- Delete data
|
Delete all structural (non time-series) data,
like assets (types), roles and users.
|
|
Delete a tenant account role. |
|
Delete a tenant account & also their users
(with assets and power measurements).
|
|
Delete a user & also their assets and power measurements. |
|
Delete an asset & also its sensors and data. |
|
Delete a sensor and all beliefs about it. |
|
Delete measurements (with horizon <= 0). |
|
Delete forecasts and schedules (forecasts > 0). |
|
Delete unchanged beliefs. |
|
Delete NaN beliefs. |
jobs
- Job queueing
|
Start a worker process for forecasting and/or scheduling jobs. |
|
List job queues. |
|
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. |