CLI

CLI to manage Trilium by exposing SDK functionality.

trilium-alchemy

trilium-alchemy Usage: trilium-alchemy [OPTIONS] COMMAND [ARGS]... TriliumAlchemy CLI Toolkit                                                     ╭─ Options ────────────────────────────────────────────────────────────────────╮ --helpShow this message and exit.                                  ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────╮ db   Database maintenance operations                                       tree Tree maintenance operations                                           ╰──────────────────────────────────────────────────────────────────────────────╯

db

db Usage: trilium-alchemy db [OPTIONS] COMMAND [ARGS]... Database maintenance operations                                                ╭─ Options ────────────────────────────────────────────────────────────────────╮ --helpShow this message and exit.                                  ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────╮ backup  Backup database to file                                            restore Restore database from file                                         ╰──────────────────────────────────────────────────────────────────────────────╯

backup

backup Usage: trilium-alchemy db backup [OPTIONS] PATH Backup database to file                                                        ╭─ Arguments ──────────────────────────────────────────────────────────────────╮ *pathPATHDestination database file or folder; if folder,         filename will be generated using current datetime       [default: None]                                         [required]                                              ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Options ────────────────────────────────────────────────────────────────────╮ --nameTEXTName of backup in Trilum data  dir to generate, e.g. 'now'    will write 'backup-now.db'     [default: now]                 --overwrite--no-overwriteWhether to overwrite           destination file if it already exists                         [default: no-overwrite]        --hostTEXTTrilium host, e.g.             http://localhost:8080          [env var: TRILIUM_HOST]        [default: None]                --tokenTEXTETAPI token                    [env var: TRILIUM_TOKEN]       [default: None]                --passwordTEXTTrilium password               [env var: TRILIUM_PASSWORD]    [default: None]                --trilium_data_dirPATHDirectory containing Trilium   database                       [env var: TRILIUM_DATA_DIR]    [default: None]                --helpShow this message and exit.    ╰──────────────────────────────────────────────────────────────────────────────╯ Trilium options can be passed in the following order of precedence:             • CLI options                                                                  • Environment variables                                                        • .env file                                                                  

restore

restore Usage: trilium-alchemy db restore [OPTIONS] PATH Restore database from file                                                     ╭─ Arguments ──────────────────────────────────────────────────────────────────╮ *pathPATHSource database file                                    [default: None]                                         [required]                                              ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Options ────────────────────────────────────────────────────────────────────╮ --trilium_data_dirPATHDirectory containing Trilium database        [env var: TRILIUM_DATA_DIR]                  [default: None]                              --helpShow this message and exit.                  ╰──────────────────────────────────────────────────────────────────────────────╯ Trilium options can be passed in the following order of precedence:             • CLI options                                                                  • Environment variables                                                        • .env file                                                                  

tree

tree Usage: trilium-alchemy tree [OPTIONS] COMMAND [ARGS]... Tree maintenance operations                                                    ╭─ Options ────────────────────────────────────────────────────────────────────╮ --helpShow this message and exit.                                  ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────╮ export Export subtree to .zip file                                         import Import subtree from .zip file                                       ╰──────────────────────────────────────────────────────────────────────────────╯

export

export Usage: trilium-alchemy tree export [OPTIONS] PATH Export subtree to .zip file                                                    ╭─ Arguments ──────────────────────────────────────────────────────────────────╮ *pathPATHDestination .zip file                                   [default: None]                                         [required]                                              ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Options ────────────────────────────────────────────────────────────────────╮ --format[html|markdown]Export format              [default: html]            --overwrite--no-overwriteWhether to overwrite       destination file if it     already exists             [default: no-overwrite]    --hostTEXT           Trilium host, e.g.         http://localhost:8080      [env var: TRILIUM_HOST]    [default: None]            --tokenTEXT           ETAPI token                [env var: TRILIUM_TOKEN]   [default: None]            --passwordTEXT           Trilium password           [env var:                  TRILIUM_PASSWORD]          [default: None]            --labelTEXT           Select note uniquely       identified by label        [default: None]            --helpShow this message and      exit.                      ╰──────────────────────────────────────────────────────────────────────────────╯ Trilium options can be passed in the following order of precedence:             • CLI options                                                                  • Environment variables                                                        • .env file                                                                  

import

import Usage: trilium-alchemy tree import [OPTIONS] PATH Import subtree from .zip file                                                  ╭─ Arguments ──────────────────────────────────────────────────────────────────╮ *pathPATHSource .zip file                                        [default: None]                                         [required]                                              ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Options ────────────────────────────────────────────────────────────────────╮ --hostTEXTTrilium host, e.g. http://localhost:8080             [env var: TRILIUM_HOST]                              [default: None]                                      --tokenTEXTETAPI token                                          [env var: TRILIUM_TOKEN]                             [default: None]                                      --passwordTEXTTrilium password                                     [env var: TRILIUM_PASSWORD]                          [default: None]                                      --labelTEXTSelect note uniquely identified by label             [default: None]                                      --helpShow this message and exit.                          ╰──────────────────────────────────────────────────────────────────────────────╯ Trilium options can be passed in the following order of precedence:             • CLI options                                                                  • Environment variables                                                        • .env file