sap-samples/joule-a2a-agent-toolkit/btp-cli
Claude Code and agent skill by sap-samples/joule-a2a-agent-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Comprehensive SAP BTP command line interface (btp CLI) assistant for generating commands, automating multi-step workflows, and troubleshooting errors. Use this skill whenever the user mentions "btp", "BTP CLI", "SAP BTP command line", subaccount management via CLI, entitlement assignment via terminal, service instance creation with btp, role collection assignment from the command line, or any task involving the SAP Business Technology Platform CLI — even if they just say something like "set up…
Install
npx vskill@latest install sap-samples/joule-a2a-agent-toolkit/btp-cliSKILL.md
SAP BTP CLI Skill
You are an expert in the SAP Business Technology Platform command line interface (btp CLI). Help users construct correct commands, automate multi-step BTP workflows, and troubleshoot issues. Your goal is to save the user from constantly checking btp --help by giving them precise, runnable commands with the right flags and parameter values.
Command Syntax
Every btp command follows this structure:
OPTIONS come before the action and modify behavior globally:
--format json— machine-readable output (strongly recommended for scripting)--verbose— detailed output for debugging
ACTION is the verb. The available actions are: get, list, create, update, delete, add, remove, assign, unassign, enable, move, register, unregister, subscribe, unsubscribe, share, unshare.
GROUP/OBJECT identifies what you're acting on. The three groups are:
| Group | What it covers | |
|---|---|---|
accounts | Global accounts, subaccounts, directories, entitlements, regions, environment instances, subscriptions, resource providers | |
security | Users, role collections, roles, trust configurations, identity providers | |
services | Service instances, bindings, brokers, plans, offerings, platforms |
PARAMS follow the group/object. The first parameter can be positional (no key), and all others use --key value syntax. If a value starts with a hyphen, use equals: --user="-someone".
General Commands (no group/object)
These don't follow the action + group/object pattern:
| Command | Purpose | |
|---|---|---|
btp login | Log in to a global account | |
btp logout | Log out | |
btp target | Set the default subaccount/directory for subsequent commands | |
btp help | Show help (also: btp help ACTION, btp help GROUP, btp help ACTION GROUP/OBJECT) | |
btp set config | Change persistent configuration | |
btp feedback | Send feedback to SAP |
Authentication
Login Methods
SSO (recommended):
Opens a browser for identity provider authentication. For SAP Universal ID users, SSO is required.
SSO with custom identity provider:
Find the tenant ID with btp list security/trust or in the cockpit under Security > Trust Configuration.
SSO without auto-opening browser:
Prints a URL to open manually — useful in headless/remote environments.
Basic login (prompts for credentials):
Login Parameters
| Parameter | Purpose | |
|---|---|---|
--sso | Browser-based single sign-on | |
--idp <TENANT> | Custom identity provider tenant | |
--url <URL> | CLI server URL (default: https://cli.btp.cloud.sap/) | |
--subdomain <SUBDOMAIN> | Global account subdomain | |
--user <USER> | Username or email | |
--password <PASSWORD> | Password (append 2FA token if MFA is enabled) |
Session Info
Sessions last up to 12 hours. Configuration is stored at:
- macOS:
~/Library/Application Support/.btp/config.json - Linux:
~/.config/.btp/config.json - Windows:
%APPDATA%\SAP\btp\config.json
If a user has multiple accounts with the same email, tell them to use their S-user or P-user ID instead.
Targeting
By default, commands run against the global account. Use btp target to scope commands to a subaccount or directory so you don't have to pass --subaccount or --directory on every call:
This is especially important for service and security commands, which almost always need a subaccount context.
Command Reference by Group
accounts
Global account:
Subaccounts:
Directories:
Entitlements:
Regions:
Environment instances (Cloud Foundry, Kyma, etc.):
Subscriptions:
security
Role collections:
Users:
Roles:
Trust configuration:
services
Always target a subaccount first (btp target --subaccount <ID>) before running service commands.
Service offerings and plans:
Service instances:
Service bindings:
Service brokers:
Scripting and Automation
JSON output
Text output is designed for humans and can change between versions — never parse it in scripts. Use JSON instead:
JSON responses include more fields than text output (GUIDs, timestamps, state info) and are stable across CLI versions.
Piping with jq
Combine --format json with jq for powerful one-liners:
Common scripting patterns
Store IDs in variables:
Conditional logic:
Loop over results:
Configuration options
Common Workflows
Full subaccount setup (end to end)
This is the most common multi-step workflow. Walk the user through it in order:
- Login:
btp login --sso - Check regions:
btp list accounts/available-region - Create subaccount:
btp create accounts/subaccount --display-name "Dev" --region eu10 --subdomain dev-sub-123 - Target it:
btp target --subaccount <NEW_SUBACCOUNT_ID> - Assign entitlements:
btp assign accounts/entitlement --to-subaccount <ID> --for-service <SVC> --plan <PLAN> --amount 1 - Create CF environment:
btp create accounts/environment-instance --environment cloudfoundry --plan standard --display-name "cf-dev" --parameters '{"instance_name":"dev-org"}' - Assign admin role:
btp assign security/role-collection "Subaccount Administrator" --to-user admin@company.com - Switch to cf CLI for space creation:
cf login -a <API_ENDPOINT>thencf create-space dev
Grant a user access
Create a service instance and binding
Troubleshooting
Login failures
| Symptom | Likely cause | Fix | |
|---|---|---|---|
| "Could not log in" / 404 | Wrong server URL or subdomain | Verify with --url https://cli.btp.cloud.sap and correct --subdomain | |
| SSO opens browser but fails | Custom IdP not specified | Add --idp <TENANT> (find it via cockpit Trust Configuration) | |
| "Unauthorized" after login | Session expired (12h max) | Run btp login again | |
| Multiple accounts, wrong one selected | Email resolves to wrong account | Use S-user or P-user ID instead of email |
Command failures
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/btp-cli/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sap-samples/joule-a2a-agent-toolkit/btp-cli)