ghcopilot
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12Entrypoint
Return Type
Ghcopilot Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
func (m *MyModule) Example() *dagger.Ghcopilot {
return dag.
Ghcopilot()
}@function
def example() -> dagger.Ghcopilot:
return (
dag.ghcopilot()
)@func()
example(): Ghcopilot {
return dag
.ghcopilot()
}Types
Ghcopilot 🔗
token() 🔗
REQUIRED - The GitHub PAT Token to authenticate with Copilot - must have permissions “Copilot Requests” with “Allow: Read Only” scope
Return Type
Secret ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
tokenfunc (m *MyModule) Example() *dagger.Secret {
return dag.
Ghcopilot().
Token()
}@function
def example() -> dagger.Secret:
return (
dag.ghcopilot()
.token()
)@func()
example(): Secret {
return dag
.ghcopilot()
.token()
}model() 🔗
OPTIONAL - The model to use for Copilot (e.g., claude-sonnet-4.5”, “claude-sonnet-4”, “gpt-5” defaults to the @github/copilot cli versions’ default)
Return Type
String ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
modelfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Ghcopilot().
Model(ctx)
}@function
async def example() -> str:
return await (
dag.ghcopilot()
.model()
)@func()
async example(): Promise<string> {
return dag
.ghcopilot()
.model()
}prompt() 🔗
OPTIONAL at constructiion - The prompt to send to Copilot
Return Type
String ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
promptfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Ghcopilot().
Prompt(ctx)
}@function
async def example() -> str:
return await (
dag.ghcopilot()
.prompt()
)@func()
async example(): Promise<string> {
return dag
.ghcopilot()
.prompt()
}workspace() 🔗
OPTIONAL - The workspace directory to use as the context for Copilot (defaults to the root of the project)
Return Type
Directory ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
workspacefunc (m *MyModule) Example() *dagger.Directory {
return dag.
Ghcopilot().
Workspace()
}@function
def example() -> dagger.Directory:
return (
dag.ghcopilot()
.workspace()
)@func()
example(): Directory {
return dag
.ghcopilot()
.workspace()
}newGhcopilot() 🔗
Return Type
Ghcopilot !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| model | String | - | The model to use for Copilot (e.g., claude-sonnet-4.5", "claude-sonnet-4", "gpt-5" defaults to the @github/copilot cli versions' default) |
| token | Secret ! | - | No description provided |
| workspace | Directory | - | No description provided |
Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
new-ghcopilot --token env:MYSECRETfunc (m *MyModule) Example(token *dagger.Secret) *dagger.Ghcopilot {
return dag.
Ghcopilot().
NewGhcopilot(token)
}@function
def example(token: dagger.Secret) -> dagger.Ghcopilot:
return (
dag.ghcopilot()
.new_ghcopilot(token)
)@func()
example(token: Secret): Ghcopilot {
return dag
.ghcopilot()
.newGhcopilot(token)
}withModel() 🔗
Return Type
Ghcopilot !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| model | String ! | - | No description provided |
Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
with-model --model stringfunc (m *MyModule) Example(model string) *dagger.Ghcopilot {
return dag.
Ghcopilot().
WithModel(model)
}@function
def example(model: str) -> dagger.Ghcopilot:
return (
dag.ghcopilot()
.with_model(model)
)@func()
example(model: string): Ghcopilot {
return dag
.ghcopilot()
.withModel(model)
}withPrompt() 🔗
Return Type
Ghcopilot !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| prompt | String ! | - | REQUIRED - The prompt to send to Copilot |
Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
with-prompt --prompt stringfunc (m *MyModule) Example(prompt string) *dagger.Ghcopilot {
return dag.
Ghcopilot().
WithPrompt(prompt)
}@function
def example(prompt: str) -> dagger.Ghcopilot:
return (
dag.ghcopilot()
.with_prompt(prompt)
)@func()
example(prompt: string): Ghcopilot {
return dag
.ghcopilot()
.withPrompt(prompt)
}container() 🔗
Returns a container with GitHub Copilot Installedfunc (c *Ghcopilot) Container(
Return Type
Container ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Ghcopilot().
Container()
}@function
def example() -> dagger.Container:
return (
dag.ghcopilot()
.container()
)@func()
example(): Container {
return dag
.ghcopilot()
.container()
}response() 🔗
Runs Copilot with the given prompt
Return Type
Llmresponse ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
responsefunc (m *MyModule) Example() *dagger.GhcopilotLlmresponse {
return dag.
Ghcopilot().
Response()
}@function
def example() -> dagger.GhcopilotLlmresponse:
return (
dag.ghcopilot()
.response()
)@func()
example(): GhcopilotLlmresponse {
return dag
.ghcopilot()
.response()
}Llmresponse 🔗
content() 🔗
Return Type
String ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
response \
contentfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Ghcopilot().
Response().
Content(ctx)
}@function
async def example() -> str:
return await (
dag.ghcopilot()
.response()
.content()
)@func()
async example(): Promise<string> {
return dag
.ghcopilot()
.response()
.content()
}tokenUsage() 🔗
Return Type
LlmtokenUsage ! Example
dagger -m github.com/raykao/daggerverse/ghcopilot@c999a7e948e83f3090dde1aecb31d8c2a11f7f12 call \
response \
token-usagefunc (m *MyModule) Example() *dagger.GhcopilotLlmtokenUsage {
return dag.
Ghcopilot().
Response().
TokenUsage()
}@function
def example() -> dagger.GhcopilotLlmtokenUsage:
return (
dag.ghcopilot()
.response()
.token_usage()
)@func()
example(): GhcopilotLlmtokenUsage {
return dag
.ghcopilot()
.response()
.tokenUsage()
}LlmtokenUsage 🔗
info() 🔗
Return Type
String ! Example
Function GhcopilotLlmtokenUsage.info is not accessible from the ghcopilot moduleFunction GhcopilotLlmtokenUsage.info is not accessible from the ghcopilot moduleFunction GhcopilotLlmtokenUsage.info is not accessible from the ghcopilot moduleFunction GhcopilotLlmtokenUsage.info is not accessible from the ghcopilot module