WEBINARLive webinar: Terraform in Buddy, Oct 21st.Terraform: plan, approve, apply with state in Buddy. Live on October 21st.Save your seat

bdy context add

View as Markdown
$bdy context add [options] <name>

Save a named context without activating it

ARGUMENTS
name
Context name (required)
OPTIONS
--context <name>
Connection and scope context: default, git, link or a saved name. Overrides the globally active context for this invocation.
--examples
Show only examples; with this flag --format accepts text, json or jsonl
--verbose
Show REST API requests, responses, timing and retries on stderr
--format <text|json>
Output format: json, text. JSON CLI errors: {error:{code,message,hint}}, exit 1. Default: text (choices: "text", "json")
-w, --workspace <domain>
Workspace URL handle. Can be set via variable: BUDDY_WORKSPACE
-p, --project <name>
Project name. Can be set via variable: BUDDY_PROJECT
--token <token>
REST API token for this context; omitted means inherit the default authentication mechanism
--api <endpoint>
HTTPS API endpoint for this context; omitted means inherit the default endpoint mechanism
--from-link
Resolve workspace and project from .bdy/project.json in the current directory
--from-git
Resolve workspace and project from a Buddy Git remote in the current repository
--remote <name>
Git remote to read with --from-git. Default: origin
-h, --help
display help for command

Documentation for bdy v1.25.20

Last modified on Oct 14, 2026

Examples

Save a fixed workspace and project
bdy context add backend --workspace acme --project backend$
Resolve the buddy remote on each invocation
bdy context add company --from-git --remote buddy$