Initialize a new Fluree project directory.
fluree init [OPTIONS]| Option | Description |
|---|---|
--global |
Create global config and data directories instead of a local .fluree/ directory |
Creates a .fluree/ directory in the current working directory (or global directories with --global). This directory stores:
active- The currently active ledger nameconfig.toml- Configuration settingsprefixes.json- IRI prefix mappings for compact IRIsstorage/- Ledger data
Running init is idempotent - it won't overwrite existing configuration.
# Initialize in current directory
fluree init
# Initialize global config
fluree init --globalWith --global, the directories are determined by:
$FLUREE_HOMEenvironment variable (if set) — both config and data go in this single directory.- Platform directories (when
$FLUREE_HOMEis not set):
| Content | Linux | macOS | Windows |
|---|---|---|---|
Config (config.toml) |
$XDG_CONFIG_HOME/fluree (default: ~/.config/fluree) |
~/Library/Application Support/fluree |
%LOCALAPPDATA%\fluree |
Data (storage/, active, prefixes.json) |
$XDG_DATA_HOME/fluree (default: ~/.local/share/fluree) |
~/Library/Application Support/fluree |
%LOCALAPPDATA%\fluree |
On macOS and Windows both resolve to the same directory (unified); on Linux config and data are separated per XDG conventions.
The generated config.toml will contain an absolute storage_path pointing to the data directory when the directories are split.
- create - Create a new ledger after initialization