# `MishkaChelekom.MCP.PathHelper`
[🔗](https://github.com/mishka-group/mishka_chelekom/blob/v0.0.9/lib/mishka_chelekom/mcp/path_helper.ex#L1)

Helper module for resolving file paths that works both when:
1. Running directly inside the mishka_chelekom library (development/testing)
2. Installed as a dependency in a user's Phoenix project

Uses `:code.priv_dir/1` for installed dependency, falls back to local paths for development.

# `component_config_path`

Returns the path to a component config file in priv/components/.

# `component_doc_path`

Returns the path to a component documentation file in usage-rules/components/.

# `file_exists?`

Checks if a file exists at the given path.

# `js_hook_doc_path`

Returns the path to a JS hook documentation file in usage-rules/js/.

# `lib_doc_path`

Returns the path to a library documentation file in usage-rules/docs/.

# `mix_tasks_doc_path`

Returns the path to mix-tasks.md documentation.

# `package_root`

Returns the package root directory for mishka_chelekom.
This is where usage-rules/ folder is located.

In development: returns File.cwd!() since we're working in the source tree
As dependency: returns the deps path where usage-rules/ is located

# `priv_dir`

Returns the priv directory path for mishka_chelekom.
Works both in development and when installed as a dependency.

# `read_file`

Reads a file, returning {:ok, content} or {:error, reason}.

# `usage_rules_dir`

Returns the path to usage-rules directory.
Located at package root, not inside priv.

# `user_config_path`

Returns the path to the user's config file in their project.
This always uses File.cwd!() since it's in the user's project, not the library.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
