MemoFSMemoFS
CLI

Config Commands

CLI commands for inspecting and initializing local .memofs/ configuration files.

The config command family manages the project-local .memofs/config.json configuration file. config.json stores persistent runtime preferences and cloud endpoints without storing secrets.

memofs config get

Prints the resolved runtime configuration for the active workspace, merging defaults, .memofs/config.json, and active environment variables.

memofs config get
memofs config get --json

Output Example

{
  "mode": "hybrid",
  "projectId": "frozen-crest",
  "workspaceId": "ws_12345",
  "cloud": {
    "configured": true
  }
}

memofs config init

Creates or updates .memofs/config.json with portable $schema validation and default runtime settings.

memofs config init
memofs config init --runtime hybrid --cloud-url https://memofs.dev/api/v1 --project-id my-project
memofs config init --force

Options

FlagDescriptionDefault
-f, --forceOverwrite existing .memofs/config.jsonfalse
--runtime <mode>Runtime mode: local or hybridlocal
--cloud-url <url>MemoFS Cloud API URL
--workspace-id <id>Default cloud workspace ID
--project-id <id>Default cloud project ID

Schema Resolution & Structure

config init automatically resolves a portable relative $schema pointer:

  1. If node_modules/@memofs/cli/schema/config.json exists relative to the workspace root, writes ../node_modules/@memofs/cli/schema/config.json.
  2. Otherwise, falls back to the hosted URL https://docs.memofs.dev/schema/config.json.
.memofs/config.json
{
  "$schema": "../node_modules/@memofs/cli/schema/config.json",
  "runtime": "hybrid",
  "root": ".",
  "cloud": {
    "baseUrl": "https://memofs.dev/api/v1",
    "workspaceId": "ws_12345",
    "projectId": "my-project",
    "timeoutMs": 15000
  },
  "recall": {
    "engine": "hybrid",
    "localEmbeddings": true,
    "embeddingModel": "Xenova/bge-small-en-v1.5"
  }
}

On this page