MCPcopy Index your code

hub / github.com/dagger/container-use / functions

Functions323 in github.com/dagger/container-use

↓ 93 callersFunctionRunGitCommand
RunGitCommand executes a git command in the specified directory. This is exported for use in tests and other packages that need direct git access.
repository/git.go:33
↓ 50 callersMethodAddCommand
(command string, exitCode int, stdout, stderr string)
environment/note.go:21
↓ 40 callersMethodCreateEnvironment
CreateEnvironment mirrors environment_create MCP tool behavior
environment/integration/helpers.go:230
↓ 40 callersMethodRun
(ctx context.Context, command, shell string, useEntrypoint bool)
environment/environment.go:236
↓ 35 callersMethodSourcePath
()
repository/repository.go:168
↓ 35 callersFunctionWithRepository
WithRepository runs a test function with an isolated repository and UserActions
environment/integration/helpers.go:38
↓ 32 callersMethodFileWrite
FileWrite mirrors environment_file_write MCP tool behavior
environment/integration/helpers.go:204
↓ 25 callersMethodInfo
Info retrieves environment metadata without requiring dagger operations. This is more efficient than Get() when you only need access to configuration,
repository/repository.go:270
↓ 21 callersMethodGet
Get returns the value for a given key, or empty string if not found
environment/config.go:104
↓ 18 callersFunctionOpen
(ctx context.Context, repo string)
repository/repository.go:72
↓ 17 callersMethodFileRead
FileRead mirrors environment_file_read MCP tool behavior (read-only, no update)
environment/integration/helpers.go:265
↓ 15 callersMethodRunCommand
RunCommand mirrors environment_run_cmd MCP tool behavior
environment/integration/helpers.go:216
↓ 14 callersMethodWorktreePath
WorktreePath returns the worktree path for an environment, handling errors
environment/integration/helpers.go:307
↓ 14 callersFunctionupdateConfig
Helper function for config update operations
cmd/container-use/config.go:32
↓ 13 callersFunctionwrapTool
(tool *Tool)
mcpserver/tools.go:155
↓ 12 callersMethodcontainer
()
environment/environment.go:66
↓ 11 callersMethodClose
Close shuts down the MCP server process and cleans up resources
cmd/container-use/stdio_test.go:76
↓ 11 callersMethodUnlock
Unlock releases the repository lock.
repository/flock.go:120
↓ 11 callersMethodUpdate
Update saves the provided environment to the repository. Writes configuration and source code changes to the worktree and history + state to git notes
repository/repository.go:366
↓ 11 callersMethodWithLock
WithLock executes a function while holding an exclusive lock.
repository/flock.go:125
↓ 11 callersFunctionnewEnvironmentTool
(toolOptions envToolOptions, mcpToolOptions ...mcp.ToolOption)
mcpserver/args.go:36
↓ 11 callersFunctionopenEnvironment
(ctx context.Context, request mcp.CallToolRequest)
mcpserver/tools.go:59
↓ 11 callersFunctionwriteFile
Helper functions for repository setup
environment/integration/helpers.go:137
↓ 10 callersMethodLock
Lock acquires an exclusive repository lock.
repository/flock.go:89
↓ 10 callersMethodString
()
environment/note.go:43
↓ 9 callersMethodCopy
()
environment/config.go:113
↓ 9 callersMethodUnmarshal
(data []byte)
environment/state.go:22
↓ 9 callersMethodUpdateEnvironment
UpdateEnvironment mirrors environment_update MCP tool behavior
environment/integration/helpers.go:237
↓ 9 callersFunctionresolveEnvironmentID
resolveEnvironmentID resolves the environment ID for commands that take env_id as the only positional argument. If no args are provided, it filters en
cmd/container-use/env_selection.go:17
↓ 8 callersFunctionDefaultConfig
()
environment/config.go:19
↓ 8 callersMethodList
List returns information about all environments in the repository. Returns EnvironmentInfo slice avoiding dagger client initialization. Use Get() on i
repository/repository.go:296
↓ 8 callersMethodMarshal
()
environment/state.go:18
↓ 8 callersMethodWorktreePath
(id string)
repository/git.go:85
↓ 8 callersFunctionwriteFile
Test helper functions
repository/git_test.go:176
↓ 7 callersMethodListDescendantEnvironments
ListDescendantEnvironments returns environments that are descendants of the given commit. This filters environments to only those where the provided c
repository/repository.go:336
↓ 7 callersMethodLoad
(baseDir string)
environment/config.go:146
↓ 7 callersMethodapply
(ctx context.Context, newState *dagger.Container)
environment/environment.go:112
↓ 6 callersMethodAdd
(format string, a ...any)
environment/note.go:14
↓ 6 callersMethodCreate
Create creates a new environment with the given description, explanation, and optional git reference. The git reference can be HEAD (default), a SHA,
repository/repository.go:185
↓ 6 callersMethodDelete
Delete removes an environment from the repository.
repository/repository.go:378
↓ 6 callersMethodGetEnvironment
GetEnvironment retrieves an environment by ID - mirrors how MCP tools work Each MCP tool call starts fresh by getting the environment from the reposit
environment/integration/helpers.go:285
↓ 6 callersMethodMerge
(ctx context.Context, id string, w io.Writer)
repository/repository.go:492
↓ 6 callersFunctioncreateDir
(t *testing.T, dir, name string)
repository/git_test.go:199
↓ 6 callersFunctiongitCommit
(t *testing.T, repoDir, message string)
environment/integration/helpers.go:146
↓ 5 callersMethodLog
(ctx context.Context, id string, patch bool, w io.Writer)
repository/repository.go:445
↓ 5 callersFunctiongetCurrentEnvironmentID
getCurrentEnvironmentID returns the current environment ID for single-tenant mode
mcpserver/singletenant.go:26
↓ 5 callersFunctionsaveRulesFile
Helper functions
cmd/container-use/agent/configure.go:120
↓ 5 callersFunctionsetCurrentEnvironment
setCurrentEnvironment sets both the current environment ID and source for single-tenant mode
mcpserver/singletenant.go:62
↓ 5 callersFunctionwithConfig
Helper function for read-only config operations
cmd/container-use/config.go:16
↓ 5 callersFunctionwriteBinaryFile
(t *testing.T, dir, name string, size int)
repository/git_test.go:184
↓ 4 callersMethodApply
(ctx context.Context, id string, w io.Writer)
repository/repository.go:501
↓ 4 callersMethodGitCommand
GitCommand runs a git command in the source repository
environment/integration/helpers.go:333
↓ 4 callersMethodKeys
Keys returns all keys in the list
environment/config.go:93
↓ 4 callersFunctionOpenWithBasePath
OpenWithBasePath opens a repository with a custom base path for container-use data. This is useful for tests that need isolated environments.
repository/repository.go:78
↓ 4 callersMethodRLock
RLock acquires a shared repository lock. Multiple processes can hold shared locks simultaneously.
repository/flock.go:105
↓ 4 callersFunctionRunInteractiveGitCommand
RunInteractiveGitCommand executes a git command in the specified directory in interactive mode.
repository/git.go:56
↓ 4 callersMethodexists
(ctx context.Context, id string)
repository/repository.go:172
↓ 4 callersFunctiongetCurrentEnvironmentSource
getCurrentEnvironmentSource returns the current environment source for single-tenant mode
mcpserver/singletenant.go:37
↓ 4 callersFunctionmarshalEnvironment
(env *environment.Environment)
mcpserver/tools.go:214
↓ 4 callersMethodname
()
cmd/container-use/agent/configure.go:66
↓ 3 callersMethodDiff
(ctx context.Context, id string, w io.Writer)
repository/repository.go:472
↓ 3 callersFunctionNewRepositoryLockManager
NewRepositoryLockManager creates a new repository lock manager for the given repository path.
repository/flock.go:44
↓ 3 callersMethodSave
(baseDir string)
environment/config.go:123
↓ 3 callersMethodString
()
cmd/container-use/version.go:89
↓ 3 callersMethodUnset
Unset removes a key-value pair by key and returns true if the key was found
environment/config.go:73
↓ 3 callersMethodWithRLock
WithRLock executes a function while holding a shared lock.
repository/flock.go:135
↓ 3 callersMethodWriteFileInSourceRepo
WriteFileInSourceRepo writes a file to the source repo and commits it
environment/integration/helpers.go:341
↓ 3 callersMethodcommitWorktreeChanges
(ctx context.Context, worktreePath, explanation string)
repository/git.go:387
↓ 3 callersFunctioneditRulesFile
(existingRules, content string)
cmd/container-use/agent/configure.go:146
↓ 3 callersFunctionenvironmentResponseFromEnvInfo
(envInfo *environment.EnvironmentInfo)
mcpserver/tools.go:195
↓ 3 callersMethodisBinaryFile
(worktreePath, fileName string)
repository/git.go:571
↓ 3 callersFunctionisDockerDaemonError
isDockerDaemonError checks if the error is related to Docker daemon connectivity
cmd/container-use/docker_errors.go:10
↓ 3 callersMethodloadState
(ctx context.Context, worktreePath string)
repository/git.go:323
↓ 3 callersFunctionopenRepository
single-tenant servers set this context key to indicate that this particular mcp server process will only have 1 chat session in it this allows api opt
mcpserver/tools.go:28
↓ 3 callersMethodparseKeyValue
parseKeyValue parses a key-value string in the format "KEY=VALUE"
environment/config.go:59
↓ 3 callersFunctionrunGitCommand
runGitCommand runs a git command in the specified directory
cmd/container-use/main_suite_test.go:80
↓ 3 callersFunctionsetupGitRepo
setupGitRepo initializes a git repository in the given directory
cmd/container-use/main_suite_test.go:41
↓ 3 callersMethodshouldSkipFile
(fileName string)
repository/git.go:475
↓ 2 callersMethodCheckout
Checkout changes the user's current branch to that of the identified environment. It attempts to get the most recent commit from the environment witho
repository/repository.go:394
↓ 2 callersMethodClear
()
environment/note.go:36
↓ 2 callersMethodFileReadExpectError
FileReadExpectError is for testing expected failures
environment/integration/helpers.go:275
↓ 2 callersMethodGetLock
GetLock returns a lock for the specified operation type
repository/flock.go:52
↓ 2 callersMethodLatest
()
environment/state.go:53
↓ 2 callersFunctionLoadInfo
LoadInfo loads basic environment metadata without requiring dagger operations. This is useful for operations that only need access to configuration an
environment/environment.go:90
↓ 2 callersMethodRunCommand
RunCommand executes a command in an environment via MCP
cmd/container-use/stdio_test.go:175
↓ 2 callersMethodSet
Set adds or updates a key-value pair
environment/config.go:65
↓ 2 callersMethodUpdateConfig
(ctx context.Context, newConfig *EnvironmentConfig)
environment/environment.go:220
↓ 2 callersMethodWorkdir
()
environment/environment.go:62
↓ 2 callersMethodaddNonBinaryFiles
AI slop below! this is just to keep us moving fast because big git repos get hard to work with and our demos like to download large dependencies.
repository/git.go:410
↓ 2 callersMethodbuildBase
(ctx context.Context, baseSourceDir *dagger.Directory)
environment/environment.go:154
↓ 2 callersFunctionconfigureAgent
(agent ConfigurableAgent)
cmd/container-use/agent/configure.go:98
↓ 2 callersFunctioncontainerWithEnvAndSecrets
(dag *dagger.Client, container *dagger.Container, envs, secrets []string)
environment/environment.go:131
↓ 2 callersFunctioncreateConfigFile
(t *testing.T, dir string, config *EnvironmentConfig)
environment/config_test.go:165
↓ 2 callersFunctioncreateInstructionsFile
Test helper functions
environment/config_test.go:158
↓ 2 callersFunctioncreateMCPServerForRepositoryTest
createMCPServerForRepositoryTest creates an MCP server process for repository contention testing
cmd/container-use/stdio_test.go:202
↓ 2 callersFunctioncreateTools
(singleTenant bool)
mcpserver/tools.go:133
↓ 2 callersFunctiondeleteAfterMerge
(ctx context.Context, repo *repository.Repository, env string, delete bool, verb string)
cmd/container-use/merge.go:58
↓ 2 callersFunctiongenerateCompletionForBinary
(shell string)
cmd/container-use/completion_override.go:48
↓ 2 callersFunctiongenerateMatchID
generateMatchID creates a unique ID for a match based on file, search, replace, and index
environment/filesystem.go:148
↓ 2 callersFunctiongetContainerUseBinary
getContainerUseBinary builds the container-use binary once per test run
cmd/container-use/main_suite_test.go:20
next →1–100 of 323, ranked by callers