Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/dagger/container-use
/ functions
Functions
323 in github.com/dagger/container-use
⨍
Functions
323
◇
Types & classes
38
↓ 93 callers
Function
RunGitCommand
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 callers
Method
AddCommand
(command string, exitCode int, stdout, stderr string)
environment/note.go:21
↓ 40 callers
Method
CreateEnvironment
CreateEnvironment mirrors environment_create MCP tool behavior
environment/integration/helpers.go:230
↓ 40 callers
Method
Run
(ctx context.Context, command, shell string, useEntrypoint bool)
environment/environment.go:236
↓ 35 callers
Method
SourcePath
()
repository/repository.go:168
↓ 35 callers
Function
WithRepository
WithRepository runs a test function with an isolated repository and UserActions
environment/integration/helpers.go:38
↓ 32 callers
Method
FileWrite
FileWrite mirrors environment_file_write MCP tool behavior
environment/integration/helpers.go:204
↓ 25 callers
Method
Info
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 callers
Method
Get
Get returns the value for a given key, or empty string if not found
environment/config.go:104
↓ 18 callers
Function
Open
(ctx context.Context, repo string)
repository/repository.go:72
↓ 17 callers
Method
FileRead
FileRead mirrors environment_file_read MCP tool behavior (read-only, no update)
environment/integration/helpers.go:265
↓ 15 callers
Method
RunCommand
RunCommand mirrors environment_run_cmd MCP tool behavior
environment/integration/helpers.go:216
↓ 14 callers
Method
WorktreePath
WorktreePath returns the worktree path for an environment, handling errors
environment/integration/helpers.go:307
↓ 14 callers
Function
updateConfig
Helper function for config update operations
cmd/container-use/config.go:32
↓ 13 callers
Function
wrapTool
(tool *Tool)
mcpserver/tools.go:155
↓ 12 callers
Method
container
()
environment/environment.go:66
↓ 11 callers
Method
Close
Close shuts down the MCP server process and cleans up resources
cmd/container-use/stdio_test.go:76
↓ 11 callers
Method
Unlock
Unlock releases the repository lock.
repository/flock.go:120
↓ 11 callers
Method
Update
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 callers
Method
WithLock
WithLock executes a function while holding an exclusive lock.
repository/flock.go:125
↓ 11 callers
Function
newEnvironmentTool
(toolOptions envToolOptions, mcpToolOptions ...mcp.ToolOption)
mcpserver/args.go:36
↓ 11 callers
Function
openEnvironment
(ctx context.Context, request mcp.CallToolRequest)
mcpserver/tools.go:59
↓ 11 callers
Function
writeFile
Helper functions for repository setup
environment/integration/helpers.go:137
↓ 10 callers
Method
Lock
Lock acquires an exclusive repository lock.
repository/flock.go:89
↓ 10 callers
Method
String
()
environment/note.go:43
↓ 9 callers
Method
Copy
()
environment/config.go:113
↓ 9 callers
Method
Unmarshal
(data []byte)
environment/state.go:22
↓ 9 callers
Method
UpdateEnvironment
UpdateEnvironment mirrors environment_update MCP tool behavior
environment/integration/helpers.go:237
↓ 9 callers
Function
resolveEnvironmentID
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 callers
Function
DefaultConfig
()
environment/config.go:19
↓ 8 callers
Method
List
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 callers
Method
Marshal
()
environment/state.go:18
↓ 8 callers
Method
WorktreePath
(id string)
repository/git.go:85
↓ 8 callers
Function
writeFile
Test helper functions
repository/git_test.go:176
↓ 7 callers
Method
ListDescendantEnvironments
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 callers
Method
Load
(baseDir string)
environment/config.go:146
↓ 7 callers
Method
apply
(ctx context.Context, newState *dagger.Container)
environment/environment.go:112
↓ 6 callers
Method
Add
(format string, a ...any)
environment/note.go:14
↓ 6 callers
Method
Create
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 callers
Method
Delete
Delete removes an environment from the repository.
repository/repository.go:378
↓ 6 callers
Method
GetEnvironment
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 callers
Method
Merge
(ctx context.Context, id string, w io.Writer)
repository/repository.go:492
↓ 6 callers
Function
createDir
(t *testing.T, dir, name string)
repository/git_test.go:199
↓ 6 callers
Function
gitCommit
(t *testing.T, repoDir, message string)
environment/integration/helpers.go:146
↓ 5 callers
Method
Log
(ctx context.Context, id string, patch bool, w io.Writer)
repository/repository.go:445
↓ 5 callers
Function
getCurrentEnvironmentID
getCurrentEnvironmentID returns the current environment ID for single-tenant mode
mcpserver/singletenant.go:26
↓ 5 callers
Function
saveRulesFile
Helper functions
cmd/container-use/agent/configure.go:120
↓ 5 callers
Function
setCurrentEnvironment
setCurrentEnvironment sets both the current environment ID and source for single-tenant mode
mcpserver/singletenant.go:62
↓ 5 callers
Function
withConfig
Helper function for read-only config operations
cmd/container-use/config.go:16
↓ 5 callers
Function
writeBinaryFile
(t *testing.T, dir, name string, size int)
repository/git_test.go:184
↓ 4 callers
Method
Apply
(ctx context.Context, id string, w io.Writer)
repository/repository.go:501
↓ 4 callers
Method
GitCommand
GitCommand runs a git command in the source repository
environment/integration/helpers.go:333
↓ 4 callers
Method
Keys
Keys returns all keys in the list
environment/config.go:93
↓ 4 callers
Function
OpenWithBasePath
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 callers
Method
RLock
RLock acquires a shared repository lock. Multiple processes can hold shared locks simultaneously.
repository/flock.go:105
↓ 4 callers
Function
RunInteractiveGitCommand
RunInteractiveGitCommand executes a git command in the specified directory in interactive mode.
repository/git.go:56
↓ 4 callers
Method
exists
(ctx context.Context, id string)
repository/repository.go:172
↓ 4 callers
Function
getCurrentEnvironmentSource
getCurrentEnvironmentSource returns the current environment source for single-tenant mode
mcpserver/singletenant.go:37
↓ 4 callers
Function
marshalEnvironment
(env *environment.Environment)
mcpserver/tools.go:214
↓ 4 callers
Method
name
()
cmd/container-use/agent/configure.go:66
↓ 3 callers
Method
Diff
(ctx context.Context, id string, w io.Writer)
repository/repository.go:472
↓ 3 callers
Function
NewRepositoryLockManager
NewRepositoryLockManager creates a new repository lock manager for the given repository path.
repository/flock.go:44
↓ 3 callers
Method
Save
(baseDir string)
environment/config.go:123
↓ 3 callers
Method
String
()
cmd/container-use/version.go:89
↓ 3 callers
Method
Unset
Unset removes a key-value pair by key and returns true if the key was found
environment/config.go:73
↓ 3 callers
Method
WithRLock
WithRLock executes a function while holding a shared lock.
repository/flock.go:135
↓ 3 callers
Method
WriteFileInSourceRepo
WriteFileInSourceRepo writes a file to the source repo and commits it
environment/integration/helpers.go:341
↓ 3 callers
Method
commitWorktreeChanges
(ctx context.Context, worktreePath, explanation string)
repository/git.go:387
↓ 3 callers
Function
editRulesFile
(existingRules, content string)
cmd/container-use/agent/configure.go:146
↓ 3 callers
Function
environmentResponseFromEnvInfo
(envInfo *environment.EnvironmentInfo)
mcpserver/tools.go:195
↓ 3 callers
Method
isBinaryFile
(worktreePath, fileName string)
repository/git.go:571
↓ 3 callers
Function
isDockerDaemonError
isDockerDaemonError checks if the error is related to Docker daemon connectivity
cmd/container-use/docker_errors.go:10
↓ 3 callers
Method
loadState
(ctx context.Context, worktreePath string)
repository/git.go:323
↓ 3 callers
Function
openRepository
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 callers
Method
parseKeyValue
parseKeyValue parses a key-value string in the format "KEY=VALUE"
environment/config.go:59
↓ 3 callers
Function
runGitCommand
runGitCommand runs a git command in the specified directory
cmd/container-use/main_suite_test.go:80
↓ 3 callers
Function
setupGitRepo
setupGitRepo initializes a git repository in the given directory
cmd/container-use/main_suite_test.go:41
↓ 3 callers
Method
shouldSkipFile
(fileName string)
repository/git.go:475
↓ 2 callers
Method
Checkout
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 callers
Method
Clear
()
environment/note.go:36
↓ 2 callers
Method
FileReadExpectError
FileReadExpectError is for testing expected failures
environment/integration/helpers.go:275
↓ 2 callers
Method
GetLock
GetLock returns a lock for the specified operation type
repository/flock.go:52
↓ 2 callers
Method
Latest
()
environment/state.go:53
↓ 2 callers
Function
LoadInfo
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 callers
Method
RunCommand
RunCommand executes a command in an environment via MCP
cmd/container-use/stdio_test.go:175
↓ 2 callers
Method
Set
Set adds or updates a key-value pair
environment/config.go:65
↓ 2 callers
Method
UpdateConfig
(ctx context.Context, newConfig *EnvironmentConfig)
environment/environment.go:220
↓ 2 callers
Method
Workdir
()
environment/environment.go:62
↓ 2 callers
Method
addNonBinaryFiles
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 callers
Method
buildBase
(ctx context.Context, baseSourceDir *dagger.Directory)
environment/environment.go:154
↓ 2 callers
Function
configureAgent
(agent ConfigurableAgent)
cmd/container-use/agent/configure.go:98
↓ 2 callers
Function
containerWithEnvAndSecrets
(dag *dagger.Client, container *dagger.Container, envs, secrets []string)
environment/environment.go:131
↓ 2 callers
Function
createConfigFile
(t *testing.T, dir string, config *EnvironmentConfig)
environment/config_test.go:165
↓ 2 callers
Function
createInstructionsFile
Test helper functions
environment/config_test.go:158
↓ 2 callers
Function
createMCPServerForRepositoryTest
createMCPServerForRepositoryTest creates an MCP server process for repository contention testing
cmd/container-use/stdio_test.go:202
↓ 2 callers
Function
createTools
(singleTenant bool)
mcpserver/tools.go:133
↓ 2 callers
Function
deleteAfterMerge
(ctx context.Context, repo *repository.Repository, env string, delete bool, verb string)
cmd/container-use/merge.go:58
↓ 2 callers
Function
generateCompletionForBinary
(shell string)
cmd/container-use/completion_override.go:48
↓ 2 callers
Function
generateMatchID
generateMatchID creates a unique ID for a match based on file, search, replace, and index
environment/filesystem.go:148
↓ 2 callers
Function
getContainerUseBinary
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