repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/sys.go
internal/plugins/template/sys.go
// Package template provides system information operations for the template system. package template import ( "fmt" "os" "os/user" "runtime" ) // SysPlugin provides access to system-level information. // Security Note: This plugin provides access to system information and // environment variables. Be cautious wit...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/template_test.go
internal/plugins/template/template_test.go
package template import ( "strings" "testing" ) func TestApplyTemplate(t *testing.T) { tests := []struct { name string template string vars map[string]string input string want string wantErr bool errContains string }{ // Basic variable substitution { name: ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/extension_registry.go
internal/plugins/template/extension_registry.go
package template import ( "crypto/sha256" "encoding/hex" "fmt" "io" "os" "path/filepath" "strings" "time" debuglog "github.com/danielmiessler/fabric/internal/log" "gopkg.in/yaml.v3" ) // ExtensionDefinition represents a single extension configuration type ExtensionDefinition struct { // Global properties...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/text_test.go
internal/plugins/template/text_test.go
package template import ( "testing" ) func TestTextPlugin(t *testing.T) { plugin := &TextPlugin{} tests := []struct { name string operation string value string want string wantErr bool }{ // Upper tests { name: "upper basic", operation: "upper", value: "hello", ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/datetime_test.go
internal/plugins/template/datetime_test.go
package template import ( "fmt" "strconv" "strings" "testing" "time" ) func TestDateTimePlugin(t *testing.T) { plugin := &DateTimePlugin{} now := time.Now() tests := []struct { name string operation string value string validate func(string) error wantErr bool }{ { name: "now ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/template.go
internal/plugins/template/template.go
package template import ( "fmt" "os" "path/filepath" "regexp" "strings" debuglog "github.com/danielmiessler/fabric/internal/log" ) var ( textPlugin = &TextPlugin{} datetimePlugin = &DateTimePlugin{} filePlugin = &FilePlugin{} fetchPlugin = &FetchPlugin{} sysPlugin = &SysPlugin{} ) var ext...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/extension_registry_test.go
internal/plugins/template/extension_registry_test.go
package template import ( "os" "path/filepath" "testing" ) func TestRegistryPersistence(t *testing.T) { tmpDir, err := os.MkdirTemp("", "fabric-ext-registry-persist-*") if err != nil { t.Fatalf("Failed to create temp directory: %v", err) } defer os.RemoveAll(tmpDir) // Create test executable execPath := f...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/extension_manager_test.go
internal/plugins/template/extension_manager_test.go
package template import ( "os" "path/filepath" "testing" ) // TestExtensionManager is the main test suite for ExtensionManager func TestExtensionManager(t *testing.T) { // Create temporary directory for tests tmpDir, err := os.MkdirTemp("", "fabric-ext-test-*") if err != nil { t.Fatalf("Failed to create temp ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/template/template_extension_mixed_test.go
internal/plugins/template/template_extension_mixed_test.go
package template import ( "os" "path/filepath" "strings" "testing" ) // TestExtensionValueMixedInputAndVariable ensures an extension value mixing {{input}} and another template variable is processed. func TestExtensionValueMixedInputAndVariable(t *testing.T) { input := "PRIMARY" variables := map[string]string{ ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/plugins/strategy/strategy.go
internal/plugins/strategy/strategy.go
package strategy import ( "encoding/json" "fmt" "io/fs" "os" "path/filepath" "sort" "strings" "github.com/danielmiessler/fabric/internal/i18n" "github.com/danielmiessler/fabric/internal/plugins" "github.com/danielmiessler/fabric/internal/tools/githelper" ) const DefaultStrategiesGitRepoUrl = "https://githu...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/core/chatter_test.go
internal/core/chatter_test.go
package core import ( "bytes" "context" "errors" "testing" "github.com/danielmiessler/fabric/internal/chat" "github.com/danielmiessler/fabric/internal/domain" "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" ) // mockVendor implements the ai.Vendor interface for testing type mockVendor struct { se...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/core/plugin_registry.go
internal/core/plugin_registry.go
package core import ( "bytes" "fmt" "io" "os" "path/filepath" "sort" "strconv" "strings" "github.com/danielmiessler/fabric/internal/i18n" debuglog "github.com/danielmiessler/fabric/internal/log" "github.com/danielmiessler/fabric/internal/plugins/ai/anthropic" "github.com/danielmiessler/fabric/internal/plu...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/core/chatter.go
internal/core/chatter.go
package core import ( "context" "errors" "fmt" "os" "strings" "github.com/danielmiessler/fabric/internal/chat" "github.com/danielmiessler/fabric/internal/domain" "github.com/danielmiessler/fabric/internal/plugins/ai" "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" "github.com/danielmiessler/fab...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/core/plugin_registry_test.go
internal/core/plugin_registry_test.go
package core import ( "bytes" "context" "io" "os" "strings" "testing" "github.com/danielmiessler/fabric/internal/chat" "github.com/danielmiessler/fabric/internal/domain" debuglog "github.com/danielmiessler/fabric/internal/log" "github.com/danielmiessler/fabric/internal/plugins" "github.com/danielmiessler/f...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/ollama.go
internal/server/ollama.go
package restapi import ( "bytes" "context" "encoding/json" "fmt" "io" "log" "net/http" "strings" "time" "github.com/danielmiessler/fabric/internal/core" "github.com/gin-gonic/gin" ) type OllamaModel struct { Models []Model `json:"models"` } type Model struct { Details ModelDetails `json:"details"` D...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/storage.go
internal/server/storage.go
package restapi import ( "fmt" "io" "net/http" "github.com/danielmiessler/fabric/internal/plugins/db" "github.com/gin-gonic/gin" ) // StorageHandler defines the handler for storage-related operations type StorageHandler[T any] struct { storage db.Storage[T] } // NewStorageHandler creates a new StorageHandler ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/youtube.go
internal/server/youtube.go
package restapi import ( "net/http" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/tools/youtube" "github.com/gin-gonic/gin" ) type YouTubeHandler struct { yt *youtube.YouTube } // YouTubeRequest represents a request to get a YouTube video transcript type YouTubeReq...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/models.go
internal/server/models.go
package restapi import ( "github.com/danielmiessler/fabric/internal/plugins/ai" "github.com/gin-gonic/gin" ) type ModelsHandler struct { vendorManager *ai.VendorsManager } func NewModelsHandler(r *gin.Engine, vendorManager *ai.VendorsManager) { handler := &ModelsHandler{ vendorManager: vendorManager, } r.GE...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/patterns.go
internal/server/patterns.go
package restapi import ( "maps" "net/http" "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" "github.com/gin-gonic/gin" ) // PatternsHandler defines the handler for patterns-related operations type PatternsHandler struct { *StorageHandler[fsdb.Pattern] patterns *fsdb.PatternsEntity } // NewPatternsH...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/serve.go
internal/server/serve.go
package restapi import ( "log/slog" "net/http" "os" "path/filepath" "github.com/danielmiessler/fabric/internal/core" "github.com/gin-gonic/gin" swaggerFiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" _ "github.com/danielmiessler/fabric/docs" // swagger docs ) // @title Fabric REST...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/configuration.go
internal/server/configuration.go
package restapi import ( "fmt" "net/http" "os" "strings" "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" "github.com/gin-gonic/gin" ) // ConfigHandler defines the handler for configuration-related operations type ConfigHandler struct { db *fsdb.Db // configurations *fsdb.EnvFilePath("$HOME/.confi...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/contexts.go
internal/server/contexts.go
package restapi import ( "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" "github.com/gin-gonic/gin" ) // ContextsHandler defines the handler for contexts-related operations type ContextsHandler struct { *StorageHandler[fsdb.Context] contexts *fsdb.ContextsEntity } // NewContextsHandler creates a new ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/sessions.go
internal/server/sessions.go
package restapi import ( "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" "github.com/gin-gonic/gin" ) // SessionsHandler defines the handler for sessions-related operations type SessionsHandler struct { *StorageHandler[fsdb.Session] sessions *fsdb.SessionsEntity } // NewSessionsHandler creates a new ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/strategies.go
internal/server/strategies.go
package restapi import ( "encoding/json" "net/http" "os" "path/filepath" "strings" "github.com/gin-gonic/gin" ) // StrategyMeta represents the minimal info about a strategy type StrategyMeta struct { Name string `json:"name"` Description string `json:"description"` Prompt string `json:"prompt"` ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/auth.go
internal/server/auth.go
package restapi import ( "net/http" "strings" "github.com/gin-gonic/gin" ) const APIKeyHeader = "X-API-Key" // APIKeyMiddleware validates API key for protected endpoints. // Swagger documentation endpoints (/swagger/*) are exempt from authentication // to allow users to browse and test the API documentation free...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/server/chat.go
internal/server/chat.go
package restapi import ( "encoding/json" "fmt" "log" "net/http" "os" "path/filepath" "strings" "github.com/danielmiessler/fabric/internal/chat" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/domain" "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" "...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/flags.go
internal/cli/flags.go
package cli import ( "bufio" "errors" "fmt" "io" "os" "path/filepath" "reflect" "slices" "strconv" "strings" "github.com/danielmiessler/fabric/internal/chat" "github.com/danielmiessler/fabric/internal/domain" "github.com/danielmiessler/fabric/internal/i18n" debuglog "github.com/danielmiessler/fabric/int...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/tools.go
internal/cli/tools.go
package cli import ( "fmt" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/i18n" "github.com/danielmiessler/fabric/internal/tools/youtube" ) // handleToolProcessing handles YouTube and web scraping tool processing func handleToolProcessing(currentFlags *Flags, registry...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/management.go
internal/cli/management.go
package cli import ( "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" ) // handleManagementCommands handles management-related commands (delete, print, etc.) // Returns (handled, error) where handled indicates if a command was processed and should exit func handleManagementCommands(currentFlags *Flags, fa...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/cli_test.go
internal/cli/cli_test.go
package cli import ( "os" "testing" "github.com/danielmiessler/fabric/internal/core" "github.com/stretchr/testify/assert" ) func TestCli(t *testing.T) { t.Skip("Skipping test for now, collision with flag -t") originalArgs := os.Args defer func() { os.Args = originalArgs }() os.Args = []string{os.Args[0]} ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/configuration.go
internal/cli/configuration.go
package cli import ( "github.com/danielmiessler/fabric/internal/core" ) // handleConfigurationCommands handles configuration-related commands // Returns (handled, error) where handled indicates if a command was processed and should exit func handleConfigurationCommands(currentFlags *Flags, registry *core.PluginRegis...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/initialization.go
internal/cli/initialization.go
package cli import ( "fmt" "os" "path/filepath" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/i18n" "github.com/danielmiessler/fabric/internal/plugins/db/fsdb" ) const ConfigDirPerms os.FileMode = 0755 const EnvFilePerms os.FileMode = 0644 // initializeFabric init...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/chat_test.go
internal/cli/chat_test.go
package cli import ( "strings" "testing" "github.com/danielmiessler/fabric/internal/domain" ) func TestSendNotification_SecurityEscaping(t *testing.T) { tests := []struct { name string title string message string command string expectError bool description string }{ { name:...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/transcribe.go
internal/cli/transcribe.go
package cli import ( "context" "fmt" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/i18n" ) type transcriber interface { TranscribeFile(ctx context.Context, filePath, model string, split bool) (string, error) } func handleTranscription(flags *Flags, registry *core.P...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/cli.go
internal/cli/cli.go
package cli import ( "encoding/json" "fmt" "strings" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/i18n" debuglog "github.com/danielmiessler/fabric/internal/log" "github.com/danielmiessler/fabric/internal/plugins/ai/openai" "github.com/danielmiessler/fabric/intern...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/extensions.go
internal/cli/extensions.go
package cli import ( "github.com/danielmiessler/fabric/internal/core" ) // handleExtensionCommands handles extension-related commands // Returns (handled, error) where handled indicates if a command was processed and should exit func handleExtensionCommands(currentFlags *Flags, registry *core.PluginRegistry) (handle...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/chat.go
internal/cli/chat.go
package cli import ( "fmt" "os" "os/exec" "path/filepath" "strings" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/domain" "github.com/danielmiessler/fabric/internal/i18n" debuglog "github.com/danielmiessler/fabric/internal/log" "github.com/danielmiessler/fabric/...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/output.go
internal/cli/output.go
package cli import ( "fmt" "os" "path/filepath" "slices" "strings" "github.com/atotto/clipboard" "github.com/danielmiessler/fabric/internal/i18n" debuglog "github.com/danielmiessler/fabric/internal/log" ) func CopyToClipboard(message string) (err error) { if err = clipboard.WriteAll(message); err != nil { ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/listing.go
internal/cli/listing.go
package cli import ( "fmt" "os" "strconv" openai "github.com/openai/openai-go" "github.com/danielmiessler/fabric/internal/core" "github.com/danielmiessler/fabric/internal/i18n" "github.com/danielmiessler/fabric/internal/plugins/ai" "github.com/danielmiessler/fabric/internal/plugins/ai/gemini" "github.com/da...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/help.go
internal/cli/help.go
package cli import ( "fmt" "io" "os" "reflect" "runtime" "strings" "github.com/danielmiessler/fabric/internal/i18n" "github.com/jessevdk/go-flags" ) // flagDescriptionMap maps flag names to their i18n keys var flagDescriptionMap = map[string]string{ "pattern": "choose_pattern_from_availab...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/flags_test.go
internal/cli/flags_test.go
package cli import ( "bytes" "io" "os" "path/filepath" "strings" "testing" "github.com/danielmiessler/fabric/internal/domain" "github.com/stretchr/testify/assert" ) func TestInit(t *testing.T) { args := []string{"--copy"} expectedFlags := &Flags{Copy: true} oldArgs := os.Args defer func() { os.Args = old...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/output_test.go
internal/cli/output_test.go
package cli import ( "os" "testing" ) func TestCopyToClipboard(t *testing.T) { t.Skip("skipping test, because of docker env. in ci.") message := "test message" err := CopyToClipboard(message) if err != nil { t.Fatalf("CopyToClipboard() error = %v", err) } } func TestCreateOutputFile(t *testing.T) { fileN...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/cli/setup_server.go
internal/cli/setup_server.go
package cli import ( "github.com/danielmiessler/fabric/internal/core" restapi "github.com/danielmiessler/fabric/internal/server" ) // handleSetupAndServerCommands handles setup and server-related commands // Returns (handled, error) where handled indicates if a command was processed and should exit func handleSetup...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
danielmiessler/Fabric
https://github.com/danielmiessler/Fabric/blob/d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725/internal/log/log.go
internal/log/log.go
package log import ( "fmt" "io" "os" "sync" ) // Level represents the debug verbosity. type Level int const ( // Off disables all debug output. Off Level = iota // Basic provides minimal debugging information. Basic // Detailed provides more verbose debugging. Detailed // Trace is the most verbose level. ...
go
MIT
d96a1721bbd5cc675b81cf37dac8a8a3a6bb5725
2026-01-07T08:35:59.866090Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/macos.go
util/macos.go
package util import ( "bytes" "encoding/json" "fmt" "os/exec" "runtime" "strings" "github.com/abiosoft/colima/cli" "github.com/coreos/go-semver/semver" "github.com/sirupsen/logrus" ) // MacOS returns if the current OS is macOS. func MacOS() bool { return runtime.GOOS == "darwin" } // MacOS13OrNewer return...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/util.go
util/util.go
package util import ( "fmt" "net" "os" "path/filepath" "strings" "github.com/google/shlex" "github.com/sirupsen/logrus" ) // HomeDir returns the user home directory. func HomeDir() string { home, err := os.UserHomeDir() if err != nil { // this should never happen logrus.Fatal(fmt.Errorf("error retrievin...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/qemu.go
util/qemu.go
package util import ( "fmt" "os/exec" ) // AssertQemuImg checks if qemu-img is available. func AssertQemuImg() error { cmd := "qemu-img" if _, err := exec.LookPath(cmd); err != nil { return fmt.Errorf("%s not found, run 'brew install %s' to install", cmd, "qemu") } return nil }
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/template.go
util/template.go
package util import ( "bytes" "fmt" "os" "text/template" ) // WriteTemplate writes template with body to file after applying values. func WriteTemplate(body string, file string, values interface{}) error { b, err := ParseTemplate(body, values) if err != nil { return err } return os.WriteFile(file, b, 0644) ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/fsutil/fs.go
util/fsutil/fs.go
package fsutil import ( "io/fs" "os" "testing/fstest" ) // FS is the host filesystem implementation. var FS FileSystem = DefaultFS{} // MkdirAll calls FS.MakedirAll func MkdirAll(path string, perm os.FileMode) error { return FS.MkdirAll(path, perm) } // Open calls FS.Open func Open(name string) (fs.File, error) ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/osutil/os.go
util/osutil/os.go
package osutil import ( "fmt" "os" "os/exec" "path/filepath" "strconv" "strings" "github.com/sirupsen/logrus" ) // EnvVar is environment variable type EnvVar string // Exists checks if the environment variable has been set. func (e EnvVar) Exists() bool { _, ok := os.LookupEnv(string(e)) return ok } // Bo...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/yamlutil/yaml_test.go
util/yamlutil/yaml_test.go
package yamlutil import ( "net" "reflect" "testing" "github.com/abiosoft/colima/config" "gopkg.in/yaml.v3" ) func Test_encode_Docker(t *testing.T) { conf := config.Config{ Docker: map[string]any{"insecure-registries": []any{"127.0.0.1"}}, Network: config.Network{DNSResolvers: []net.IP{net.ParseIP("1...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/yamlutil/yaml.go
util/yamlutil/yaml.go
package yamlutil import ( "bytes" "fmt" "os" "reflect" "strconv" "strings" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/embedded" "gopkg.in/yaml.v3" ) // WriteYAML encodes struct to file as YAML. func WriteYAML(value any, file string) error { b, err := yaml.Marshal(value) if err != nil ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/terminal/terminal.go
util/terminal/terminal.go
package terminal import ( "fmt" "os" "golang.org/x/term" ) var isTerminal = term.IsTerminal(int(os.Stdout.Fd())) // ClearLine clears the previous line of the terminal func ClearLine() { if !isTerminal { return } fmt.Print("\033[1A \033[2K \r") }
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/terminal/output.go
util/terminal/output.go
package terminal import ( "bytes" "fmt" "io" "os" "strconv" "strings" "time" "github.com/fatih/color" "golang.org/x/term" ) var _ io.WriteCloser = (*verboseWriter)(nil) type verboseWriter struct { buf bytes.Buffer lines []string lineHeight int termWidth int overflow int lastUpdate time.Time } ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/downloader/sha.go
util/downloader/sha.go
package downloader import ( "fmt" "path/filepath" "strconv" "strings" "github.com/abiosoft/colima/util" ) // SHA is the shasum of a file. type SHA struct { Digest string // shasum URL string // url to download the shasum file (if Digest is empty) Size int // one of 256 or 512 } // ValidateFile valid...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/downloader/download.go
util/downloader/download.go
package downloader import ( "fmt" "os" "path" "path/filepath" "strings" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment" "github.com/abiosoft/colima/util/shautil" "github.com/abiosoft/colima/util/terminal" ) type ( hostActions = environment.HostActions guestActions = environme...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/debutil/debutil.go
util/debutil/debutil.go
package debutil import ( "context" "fmt" "strings" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/environment" ) // packages is list of deb package names. type packages []string // Upgradable returns the shell command to check if the packages are upgradable with apt. // The returned command shoul...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/util/shautil/sha.go
util/shautil/sha.go
package shautil import ( "crypto/sha1" "crypto/sha256" "fmt" ) // SHA is a sha computation type SHA interface { String() string Bytes() []byte } type s1 [20]byte func (s s1) String() string { return fmt.Sprintf("%x", s[:]) } func (s s1) Bytes() []byte { return s[:] } type s256 [32]byte func (s s256) String(...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/ssh-config.go
cmd/ssh-config.go
package cmd import ( "fmt" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/vm/lima/limautil" "github.com/spf13/cobra" ) // statusCmd represents the status command var sshConfigCmd = &cobra.Command{ Use: "ssh-config [profile]", Short: "show SS...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/start.go
cmd/start.go
package cmd import ( "fmt" "os" "os/signal" "path/filepath" "strings" "syscall" "time" "github.com/abiosoft/colima/app" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/config/configmanager" "github.com/abiosoft/colima/...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/stop.go
cmd/stop.go
package cmd import ( "github.com/abiosoft/colima/cmd/root" "github.com/spf13/cobra" ) var stopCmdArgs struct { force bool } // stopCmd represents the stop command var stopCmd = &cobra.Command{ Use: "stop [profile]", Short: "stop Colima", Long: `Stop Colima to free up resources. The state of the VM is persis...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/status.go
cmd/status.go
package cmd import ( "github.com/abiosoft/colima/cmd/root" "github.com/spf13/cobra" ) var statusCmdArgs struct { extended bool json bool } // statusCmd represents the status command var statusCmd = &cobra.Command{ Use: "status [profile]", Short: "show the status of Colima", Long: `Show the status of Co...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/delete.go
cmd/delete.go
package cmd import ( "github.com/abiosoft/colima/cmd/root" "github.com/spf13/cobra" ) var deleteCmdArgs struct { force bool data bool } // deleteCmd represents the delete command var deleteCmd = &cobra.Command{ Use: "delete [profile]", Short: "delete and teardown Colima", Long: `Delete and teardown Colima ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/ssh.go
cmd/ssh.go
package cmd import ( "github.com/abiosoft/colima/cmd/root" "github.com/spf13/cobra" ) // sshCmd represents the ssh command var sshCmd = &cobra.Command{ Use: "ssh", Aliases: []string{"exec", "x"}, Short: "SSH into the VM", Long: `SSH into the VM. Appending additional command runs the command instead. e.g....
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/restart.go
cmd/restart.go
package cmd import ( "time" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config/configmanager" "github.com/abiosoft/colima/environment/vm/lima/limautil" "github.com/spf13/cobra" ) var restartCmdArgs struct { force bool } // restartCmd represents the restart command var restartCmd = &cobra...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/util.go
cmd/util.go
package cmd import ( "bytes" "fmt" "log" "os" "os/exec" "strconv" "strings" "github.com/abiosoft/colima/app" "github.com/abiosoft/colima/cli" "github.com/sirupsen/logrus" ) func newApp() app.App { colimaApp, err := app.New() if err != nil { logrus.Fatal("Error: ", err) } return colimaApp } // waitFo...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/clone.go
cmd/clone.go
package cmd import ( "fmt" "os" "path/filepath" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) // stopCmd represents the stop command var cloneCmd = &cobra.Command{ Use: "clone <profile> <ne...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/nerdctl.go
cmd/nerdctl.go
package cmd import ( "bytes" "fmt" "log" "os" "path/filepath" "strings" "text/template" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/container/containerd" "github.com/abiosoft/colima/util/fsutil" "github...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/list.go
cmd/list.go
package cmd import ( "encoding/json" "fmt" "text/tabwriter" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/vm/lima/limautil" "github.com/docker/go-units" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var listCmdArgs struct { json ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/completion.go
cmd/completion.go
package cmd import ( "os" "github.com/abiosoft/colima/cmd/root" "github.com/spf13/cobra" ) // completionCmd represents the completion command func completionCmd() *cobra.Command { cmd := &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", Short: "Generate completion script", Long: `To load comp...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/version.go
cmd/version.go
package cmd import ( "fmt" "github.com/abiosoft/colima/app" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/spf13/cobra" ) // versionCmd represents the version command var versionCmd = &cobra.Command{ Use: "version [profile]", Short: "print the version of Colima", Long...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/kubernetes.go
cmd/kubernetes.go
package cmd import ( "context" "fmt" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/container/kubernetes" "github.com/spf13/cobra" ) // kubernetesCmd represents the kubernetes command var kubernetesCmd = &cobra.Command{ Use: "kubernetes",...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/start_test.go
cmd/start_test.go
package cmd import ( "reflect" "strconv" "testing" "github.com/abiosoft/colima/config" ) func Test_mountsFromFlag(t *testing.T) { tests := []struct { mounts []string want []config.Mount }{ { mounts: []string{ "~:w", }, want: []config.Mount{ {Location: "~", Writable: true}, }, }, ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/template.go
cmd/template.go
package cmd import ( "fmt" "log" "os" "path/filepath" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/config/configmanager" "github.com/abiosoft/colima/embedded" "github.com/spf13/cobra" ) // templateCmd represents the template command var templateCmd = ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/prune.go
cmd/prune.go
package cmd import ( "fmt" "os" "path/filepath" "strconv" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/vm/lima/limautil" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var pruneCmdArgs struct { f...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/update.go
cmd/update.go
package cmd import ( "github.com/abiosoft/colima/cmd/root" "github.com/spf13/cobra" ) // statusCmd represents the status command var updateCmd = &cobra.Command{ Use: "update [profile]", Aliases: []string{"u", "up"}, Short: "update the container runtime", Long: `Update the current container runtime.`, ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/root/root.go
cmd/root/root.go
package root import ( "log" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var versionInfo = config.AppVersion() // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ Use: "coli...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/daemon/daemon_test.go
cmd/daemon/daemon_test.go
package daemon import ( "context" "os" "os/exec" "testing" "time" "github.com/abiosoft/colima/daemon/process" ) var testDir string func setDir(t *testing.T) { if testDir == "" { testDir = t.TempDir() } dir = func() string { return testDir } } func getProcesses() []process.Process { var addresses = []st...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/daemon/daemon.go
cmd/daemon/daemon.go
package daemon import ( "context" "fmt" "os" "os/signal" "path/filepath" "strconv" "sync" "syscall" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/daemon/process" "github.com/abiosoft/colima/util/fsutil" godaemon "github.com/sevlyar/go-daemon" "github.com/sirupsen/logrus" ) var dir...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/daemon/cmd.go
cmd/daemon/cmd.go
package daemon import ( "context" "time" "github.com/abiosoft/colima/cmd/root" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/daemon/process" "github.com/abiosoft/colima/daemon/process/inotify" "github.com/abiosoft/colima/daemon/process/vmnet" "github.com/abiosoft/colima/environment/host" "g...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/cmd/colima/main.go
cmd/colima/main.go
package main import ( _ "github.com/abiosoft/colima/cmd" // for other commands _ "github.com/abiosoft/colima/cmd/daemon" // for vmnet daemon _ "github.com/abiosoft/colima/embedded" // for embedded assets "github.com/abiosoft/colima/cmd/root" ) func main() { root.Execute() }
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/app/app.go
app/app.go
package app import ( "bufio" "bytes" "context" "encoding/json" "fmt" "os" "path/filepath" "strings" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/config/configmanager" "github.com/abiosoft/colima/environment" "github.com/abiosoft/colima/environment/conta...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/store/store.go
store/store.go
package store import ( "encoding/json" "fmt" "os" "github.com/abiosoft/colima/config" "github.com/sirupsen/logrus" ) // Store stores internal Colima configuration for an instance type Store struct { // if the runtime disk has been formatted. DiskFormatted bool `json:"disk_formatted"` // the container runtime...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/vm.go
environment/vm.go
package environment import ( "context" "runtime" "github.com/abiosoft/colima/util" ) // VM is virtual machine. type VM interface { GuestActions Dependencies Host() HostActions Teardown(ctx context.Context) error } // VM configurations const ( // ContainerRuntimeKey is the settings key for container runtime....
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container.go
environment/container.go
package environment import ( "context" "fmt" "log" ) // IsNoneRuntime returns if runtime is none. func IsNoneRuntime(runtime string) bool { return runtime == "none" } // Container is container environment. type Container interface { // Name is the name of the container runtime. e.g. docker, containerd Name() st...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/environment.go
environment/environment.go
package environment import ( "context" "io" "os" "github.com/abiosoft/colima/config" ) type runActions interface { // Run runs command Run(args ...string) error // RunQuiet runs command whilst suppressing the output. // Useful for commands that only the exit code matters. RunQuiet(args ...string) error // ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/host.go
environment/host.go
package environment // Host is the host environment. type Host interface { HostActions }
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/docker/proxy.go
environment/container/docker/proxy.go
package docker import ( "os" "strings" ) type proxyVars struct { http string https string no string } func (p proxyVars) empty() bool { return p.http == "" && p.https == "" } type proxyVarKey string var ( httpProxy proxyVarKey = "http_proxy" httpsProxy proxyVarKey = "https_proxy" noProxy proxyVarK...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/docker/containerd.go
environment/container/docker/containerd.go
package docker import ( "context" _ "embed" "fmt" ) const containerdConfFile = "/etc/containerd/config.toml" const containerdConfFileBackup = "/etc/containerd/config.colima.bak.toml" //go:embed config.toml var containerdConf []byte func (d dockerRuntime) provisionContainerd(ctx context.Context) error { a := d.I...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/docker/docker.go
environment/container/docker/docker.go
package docker import ( "context" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment" "github.com/abiosoft/colima/util/debutil" ) // Name is container runtime name. const Name = "docker" var _ environment.Container = (*dockerRuntime)(nil) func ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/docker/daemon.go
environment/container/docker/daemon.go
package docker import ( "encoding/json" "fmt" "net" "net/url" ) const daemonFile = "/etc/docker/daemon.json" const hostGatewayIPKey = "host-gateway-ip" func getHostGatewayIp(d dockerRuntime, conf map[string]any) (string, error) { // get host-gateway ip from the guest ip, err := d.guest.RunOutput("sh", "-c", "g...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/docker/context.go
environment/container/docker/context.go
package docker import ( "path/filepath" "github.com/abiosoft/colima/config" ) var configDir = func() string { return config.CurrentProfile().ConfigDir() } // HostSocketFile returns the path to the docker socket on host. func HostSocketFile() string { return filepath.Join(configDir(), "docker.sock") } func LegacyD...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/containerd/containerd.go
environment/container/containerd/containerd.go
package containerd import ( "context" _ "embed" "fmt" "path/filepath" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment" ) // Name is container runtime name const Name = "containerd" var configDir = func() string { return config.CurrentProfil...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/incus/incus.go
environment/container/incus/incus.go
package incus import ( "bytes" "context" _ "embed" "encoding/json" "fmt" "path/filepath" "strings" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment" "github.com/abiosoft/colima/environment/vm/lima/limautil" "github.com/abiosoft/colima/util" "git...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/kubernetes/kubeconfig.go
environment/container/kubernetes/kubeconfig.go
package kubernetes import ( "context" "fmt" "path/filepath" "strings" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment/vm/lima/limautil" ) const masterAddressKey = "master_address" func (c kubernetesRuntime) provisionKubeconfig(ctx context.C...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/kubernetes/k3s.go
environment/container/kubernetes/k3s.go
package kubernetes import ( "fmt" "strconv" "strings" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment" "github.com/abiosoft/colima/environment/container/containerd" "github.com/abiosoft/colima/environment/container/docker" "github.com/abios...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/kubernetes/cni.go
environment/container/kubernetes/cni.go
package kubernetes import ( _ "embed" "fmt" "path/filepath" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/embedded" "github.com/abiosoft/colima/environment" ) func installCniConfig(guest environment.GuestActions, a *cli.ActiveCommandChain) { // fix cni config a.Add(func() error { flannelFile...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/container/kubernetes/kubernetes.go
environment/container/kubernetes/kubernetes.go
package kubernetes import ( "context" "encoding/json" "fmt" "strings" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/environment" "github.com/abiosoft/colima/environment/container/containerd" "github.com/abiosoft/colima/environment/container/docker" )...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/host/host.go
environment/host/host.go
package host import ( "bytes" "errors" "fmt" "io" "os" "os/exec" "strconv" "strings" "github.com/abiosoft/colima/util/terminal" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/environment" ) // New creates a new host environment. func New() environment.Host { return &hostEnv{} } var _ envi...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false
abiosoft/colima
https://github.com/abiosoft/colima/blob/fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81/environment/vm/lima/lima.go
environment/vm/lima/lima.go
package lima import ( "context" "fmt" "os" "path/filepath" "strconv" "time" "github.com/abiosoft/colima/cli" "github.com/abiosoft/colima/config" "github.com/abiosoft/colima/config/configmanager" "github.com/abiosoft/colima/core" "github.com/abiosoft/colima/daemon" "github.com/abiosoft/colima/environment" ...
go
MIT
fe8de6ef3d36d4d0fb385cb26c63ffbe34ec9d81
2026-01-07T08:37:23.316020Z
false