Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ConfigFileName = "mit.yaml" DataDir = ".mit" ModelsDir = ".mit/models" )
var DefaultIndexIgnore = []string{ ".git", ".sl", "node_modules", "vendor", ".next", "dist", "build", "__pycache__", ".cache", "target", DataDir, DataDir + "-worktrees", "package-lock.json", "yarn.lock", "pnpm-lock.yaml", "go.sum", "Gemfile.lock", "poetry.lock", "composer.lock", "Cargo.lock", "Pipfile.lock", ".env", }
DefaultIndexIgnore contains names (dirs and files) always skipped during indexing.
var SchemaComment = "# yaml-language-server: $schema=https://raw.githubusercontent.com/gabemeola/mit/refs/heads/main/mit.schema.json\n"
Functions ¶
func FindRoot ¶
FindRoot walks up from dir looking for mit.yaml, returns the directory containing it.
Types ¶
type Config ¶
type Config struct {
Version string `yaml:"version"`
Workspace WorkspaceConfig `yaml:"workspace"`
Repos map[string]Repo `yaml:"repos"`
Index IndexConfig `yaml:"index,omitempty"`
}
Config represents the top-level mit.yaml configuration.
func (*Config) IndexIgnoreSet ¶
IndexIgnoreSet returns a set of all directories to ignore during indexing, combining defaults with user-configured ignores.
func (*Config) ResolveAll ¶
func (c *Config) ResolveAll() []ResolvedRepo
ResolveAll returns all repos with defaults applied.
type IndexConfig ¶
type IndexConfig struct {
Ignore []string `yaml:"ignore,omitempty"`
Model *ModelConfig `yaml:"model,omitempty"`
}
IndexConfig holds configuration for the semantic index.
type ModelConfig ¶
type ModelConfig struct {
URL string `yaml:"url"`
}
ModelConfig specifies a custom embedding model.
type Repo ¶
type Repo struct {
URL string `yaml:"url"`
Path string `yaml:"path,omitempty"`
Branch string `yaml:"branch,omitempty"`
Forge string `yaml:"forge,omitempty"` // overrides workspace.forge
}
Repo represents a single repository declaration in mit.yaml.
func (Repo) Resolve ¶
func (r Repo) Resolve(name, workspaceForge string) ResolvedRepo
Resolve applies defaults to the repo configuration. name is the key from the repos map. workspaceForge is the workspace-level forge default (may be empty).
type ResolvedRepo ¶
type ResolvedRepo struct {
Name string
URL string
Path string
Branch string
Forge string // resolved: repo.Forge || workspace.Forge || ""
}
ResolvedRepo is a Repo with all defaults applied.
type WorkspaceConfig ¶
type WorkspaceConfig struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Forge string `yaml:"forge,omitempty"` // "github" or "gitlab" — default for all repos
}
WorkspaceConfig holds workspace-level metadata.