Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Tiger CLI is a Go-based command-line interface for managing Tiger, the modern da
- `service.go` - Service management commands (list, create, get, fork, start, stop, delete, update-password)
- `db.go` - Database operation commands (connection-string, connect, test-connection)
- `config.go` - Configuration management commands (show, set, unset, reset)
- `mcp.go` - MCP server commands (install, start, list)
- `mcp.go` - MCP server commands (install, start, list, get)
- `version.go` - Version command
- **Configuration**: `internal/tiger/config/config.go` - Centralized config with Viper integration
- **Logging**: `internal/tiger/logging/logging.go` - Structured logging with zap
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Tiger CLI provides the following commands:
- `install` - Install and configure MCP server for an AI assistant
- `start` - Start the MCP server
- `list` - List available MCP tools, prompts, and resources
- `get` - Get detailed information about a specific MCP capability (aliases: `describe`, `show`)
- `tiger version` - Show version information

Use `tiger <command> --help` for detailed information about each command.
Expand Down Expand Up @@ -190,9 +191,8 @@ The MCP server automatically uses your CLI authentication and configuration, so
In addition to the service management tools listed above, the Tiger MCP server also proxies tools from a remote documentation MCP server. This feature provides AI assistants with semantic search capabilities for PostgreSQL, TimescaleDB, and Tiger Cloud documentation, as well as prompts/guides for various Tiger Cloud features.

The proxied documentation server ([pg-aiguide](https://github.com/timescale/pg-aiguide)) currently provides the following tools:
- `view_skill` - Retrieve comprehensive guides for TimescaleDB features and best practices
- `semantic_search_postgres_docs` - Search PostgreSQL documentation using natural language queries
- `semantic_search_tiger_docs` - Search Tiger Cloud and TimescaleDB documentation using natural language queries
- `view_skill` - Retrieve comprehensive guides for Postgres and TimescaleDB features and best practices
- `search_docs` - Search PostgreSQL and TimescaleDB documentation using natural language queries

This proxy connection is enabled by default and requires no additional configuration.

Expand Down
16 changes: 16 additions & 0 deletions internal/tiger/cmd/completion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package cmd

import "strings"

// filterCompletionsByPrefix filters a slice of strings to only include items
// that start with the given prefix. This is used by shell completion functions
// to narrow down suggestions based on what the user has typed so far.
func filterCompletionsByPrefix(items []string, prefix string) []string {
var filtered []string
for _, item := range items {
if strings.HasPrefix(item, prefix) {
filtered = append(filtered, item)
}
}
return filtered
}
9 changes: 1 addition & 8 deletions internal/tiger/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cmd
import (
"fmt"
"io"
"strings"
"time"

"github.com/olekukonko/tablewriter"
Expand Down Expand Up @@ -234,11 +233,5 @@ func configOptionCompletion(cmd *cobra.Command, args []string, toComplete string
return nil, cobra.ShellCompDirectiveNoFileComp
}

var results []string
for opt := range config.ValidConfigOptions() {
if strings.HasPrefix(opt, toComplete) {
results = append(results, opt)
}
}
return results, cobra.ShellCompDirectiveNoFileComp
return filterCompletionsByPrefix(config.ValidConfigOptions(), toComplete), cobra.ShellCompDirectiveNoFileComp
}
Loading