Documentation
¶
Index ¶
- func Execute() error
- func GetRootCmd() *cobra.Command
- func SearchJSON(projectRoot string, query string, limit int) ([]store.SearchResult, error)
- func SetVersion(v string)
- type ClaudeInitResponse
- type ClaudeProjectInfo
- type FederatedResultJSON
- type FederatedSearchResponse
- type RefreshResult
- type SearchResultCompactJSON
- type SearchResultJSON
- type SetupCommands
- type SetupProjectInfo
- type SetupResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRootCmd ¶
GetRootCmd returns the root command for documentation generation
func SearchJSON ¶
SearchJSON returns results in JSON format for AI agents
func SetVersion ¶
func SetVersion(v string)
Types ¶
type ClaudeInitResponse ¶
type ClaudeInitResponse struct {
Status string `json:"status"` // "ready", "needs_setup", "needs_machine_setup"
Message string `json:"message"` // Human-readable message
Project *ClaudeProjectInfo `json:"project,omitempty"` // Project info if ready
NextStep string `json:"next_step,omitempty"` // Command to run if not ready
Commands map[string]string `json:"commands,omitempty"` // Available commands if ready
Instructions string `json:"instructions,omitempty"` // Usage instructions
}
ClaudeInitResponse is returned by `grepai init` for Claude to understand what to do
type ClaudeProjectInfo ¶
type FederatedResultJSON ¶
type FederatedResultJSON struct {
ProjectName string `json:"project_name"`
ProjectPath string `json:"project_path"`
FilePath string `json:"file_path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Score float32 `json:"score"`
Content string `json:"content,omitempty"`
}
FederatedResultJSON is a struct for federated search JSON output
type FederatedSearchResponse ¶
type FederatedSearchResponse struct {
Results []FederatedResultJSON `json:"results"`
Query string `json:"query"`
ProjectsSearched []string `json:"projects_searched"`
}
FederatedSearchResponse is the JSON response for federated search
type RefreshResult ¶
type RefreshResult struct {
Status string `json:"status"`
FilesIndexed int `json:"files_indexed"`
ChunksCreated int `json:"chunks_created"`
FilesSkipped int `json:"files_skipped"`
FilesRemoved int `json:"files_removed"`
SymbolCount int `json:"symbol_count"`
Duration string `json:"duration"`
Error string `json:"error,omitempty"`
}
RefreshResult contains the result of the refresh command.
type SearchResultCompactJSON ¶
type SearchResultCompactJSON struct {
FilePath string `json:"file_path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Score float32 `json:"score"`
}
SearchResultCompactJSON is a minimal struct for compact JSON output (no content field)
type SearchResultJSON ¶
type SearchResultJSON struct {
FilePath string `json:"file_path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Score float32 `json:"score"`
Content string `json:"content"`
}
SearchResultJSON is a lightweight struct for JSON output (excludes vector, hash, updated_at)
type SetupCommands ¶
type SetupCommands struct {
Search string `json:"search"`
Trace string `json:"trace"`
Refresh string `json:"refresh"`
Watch string `json:"watch"`
}
SetupCommands contains available commands for the project.
type SetupProjectInfo ¶
type SetupProjectInfo struct {
ID string `json:"project_id,omitempty"`
Name string `json:"name"`
Path string `json:"path"`
Languages []string `json:"languages"`
Framework string `json:"framework,omitempty"`
BuildTool string `json:"build_tool,omitempty"`
}
SetupProjectInfo contains project information for JSON output.
type SetupResult ¶
type SetupResult struct {
Project SetupProjectInfo `json:"project"`
Status string `json:"status"`
FilesIndexed int `json:"files_indexed"`
ChunksCreated int `json:"chunks_created"`
SymbolCount int `json:"symbol_count"`
Commands SetupCommands `json:"commands"`
Error string `json:"error,omitempty"`
}
SetupResult contains the result of the setup command.