iModel utility
npm install @rschili/melodi-cliiModel repository utility
This is a command line interface (CLI) for disecting and troubleshooting iModels.
The name is an anagram of the word iModel.
It provides a fluent interactive interface that prompts the user with a series of options to guide them through the process.
It uses local directories referred to as workspaces to store the iModels and their metadata.
When called in an empty directory, it will create a new workspace.
When called in a directory that already contains a workspace, it will use that workspace.
- Node.js 22.14 or later
``bash`
npm install -g @rschili/melodi-cli
`bash`
melodi
- Windows: %USERPROFILE%\Documents\melodi\$3
Global options, like logging behavior
- Linux/macOS: $XDG_CONFIG_HOME/melodi or $HOME/.config/melodi/
- Windows: %LOCALAPPDATA%\melodi\config\$3
Cached data (e.g. downloaded schemas and known etags) are stored in:
- Linux: $XDG_CACHE_HOME/melodi or $HOME/.cache/melodi/
- macOS: $XDG_CACHE_HOME/melodi or $HOME/Library/Caches/melodi/
- Windows: %LOCALAPPDATA%\melodi\cache\Can be deleted without affecting application behavior.
$3
The daily update checker stores its cache in $XDG_CONFIG_HOME/simple-update-notifier/ or $HOME/.config/simple-update-notifier/ (The package simple-update-notifier is used to check for updates).$3
You can override the default directory locations using these environment variables:
-
MELODI_CONFIG - Override the configuration directory
- MELODI_CACHE - Override the cache directory
- MELODI_ROOT - Override the default workspace/documents directoryContributing
If you want to contribute, please fork the repository and submit a pull request.
I'm using make to wrap all my commands, you can use that, or just call npm directly.`bash
git clone https://github.com/rschili/melodi-cli.git
npm install
make build
make run
``Next TODO:
- [x] Create new empty DB
- [x] Query ECDb
- [x] Unified Db type that wraps specialities of each Db [e.g. Sqlite, ECDb, Briefcase, Standalone]
- [x] Pretty print query results
- [x] ESM
- [x] Show available iTwins and iModels
- [x] Download iModel seeds from Hub
- [x] Pull Changesets
- [ ] Remove local working directory use global workspace instead
- [ ] Remove database API selection step, use a Unified DB approach and auto selection
- [ ] Apply Changesets
- [ ] Named Versions
- [ ] Sqlite queries
- [ ] Schema Management / Schema Import
- [ ] Troubleshooter / integrity checker
- [ ] Sync existing Briefcase with online iModels
- [ ] Insert/Update/Delete
- [ ] Transactions
- [ ] Snapshots
- [ ] Test and document how to use this with a local itwinjs-core/backend or imodeljs-native build