View Source mix magma.vault.init (Magma v0.2.0)

A Mix task for initializing the Magma vault directory.

This task is responsible for creating a new Magma vault for your project. The vault is initialized with a given project name, and optionally with a BaseVault which is an Obsidian vault preconfigured with Obsidian themes and plugins. If no BaseVault is specified, the default BaseVault is used. The vault is stored by default under the docs.magma directory within your project, this can be configured in the config.exs file.

During initialization, the task creates a concept document and artefact prompt for the project, concept documents and artefact prompts for all public modules of the project and for their moduledocs via a code sync, and a custom prompt template.

Example

$ mix magma.vault.init "Your project name"

Configuration

The location where the Magma vault is stored can be changed by setting the dir application key in the magma app in config.exs.

config :magma,  
  dir: "your_magma_vault/"

A set of tags to be added on all generated documents can be configured with the default_tags application key. This can be useful for separating Magma documents from other documents in your vault. e.g. to filter them.

config :magma,  
  default_tags: ["magma-vault"]

Command line options

  • --force: If specified, forces the initialization even if a Magma vault already exists.
  • --base-vault: The name of a BaseVault to be used for initialization. If not specified, the default BaseVault is used.
  • --base-vault-path: The local path to a self-defined BaseVault to be used for initialization.
  • --no-code-sync: If specified, the code sync that creates concept documents and artefact prompts for all public modules of the project is skipped.

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

Callback implementation for Mix.Task.run/1.