Settings.ExternalConfigs (fnord v0.9.24)

View Source

Per-project toggles controlling whether fnord loads Cursor rules, Cursor skills, Claude Code skills, and Claude Code subagents from the project's source tree and the user's home directory.

All toggles default to false - external configs are opt-in per project. Flags live under ["projects"][name]["external_configs"] in settings.json and are keyed in colon-namespaced form for both CLI input and on-disk persistence:

"external_configs": {
  "cursor:rules":  true,
  "cursor:skills": false,
  "claude:skills": true,
  "claude:agents": true
}

Internally, sources are Elixir atoms (:cursor_rules etc.); the colon form is a boundary representation only. See source_to_string/1 and source_from_string/1.

Summary

Functions

Is the source enabled for the currently selected project?

Is the source enabled for the named project?

Returns the flags for the currently selected project, or an all-false map when no project is selected.

Returns the flags for the named project, or an all-false map when the project has no external_configs settings.

Enable or disable a source for the named project. Returns the new flags.

Parse a colon-namespaced source string into its internal atom. Returns {:ok, source} on a known value, {:error, {:invalid_source, raw}} otherwise.

The list of valid source strings, in declaration order.

Render a source atom as its user-facing colon-namespaced string.

All supported external-config sources.

Types

flags()

@type flags() :: %{
  cursor_rules: boolean(),
  cursor_skills: boolean(),
  claude_skills: boolean(),
  claude_agents: boolean()
}

source()

@type source() :: :cursor_rules | :cursor_skills | :claude_skills | :claude_agents

Functions

enabled?(source)

@spec enabled?(source()) :: boolean()

Is the source enabled for the currently selected project?

enabled?(project_name, source)

@spec enabled?(String.t(), source()) :: boolean()

Is the source enabled for the named project?

flags()

@spec flags() :: flags()

Returns the flags for the currently selected project, or an all-false map when no project is selected.

flags(project_name)

@spec flags(String.t()) :: flags()

Returns the flags for the named project, or an all-false map when the project has no external_configs settings.

set(project_name, source, value)

@spec set(String.t(), source(), boolean()) ::
  {:ok, flags()} | {:error, :project_not_found}

Enable or disable a source for the named project. Returns the new flags.

source_from_string(raw)

@spec source_from_string(String.t()) ::
  {:ok, source()} | {:error, {:invalid_source, String.t()}}

Parse a colon-namespaced source string into its internal atom. Returns {:ok, source} on a known value, {:error, {:invalid_source, raw}} otherwise.

source_strings()

@spec source_strings() :: [String.t()]

The list of valid source strings, in declaration order.

source_to_string(source)

@spec source_to_string(source()) :: String.t()

Render a source atom as its user-facing colon-namespaced string.

sources()

@spec sources() :: [source()]

All supported external-config sources.