Zum Inhalt springen
DeutschlandGPT

DeutschlandGPT Code in the terminal

Install the terminal coding agent, sign in on a laptop or on a server over SSH, run it interactively or in scripts with -p

deutschlandgpt-code is a coding agent for your terminal. It reads and edits the files of the project you start it in, runs commands, and talks to your DeutschlandGPT account. Requests count against your normal usage limits, and you only see the models your organisation enables. Its command line follows Claude Code's, so most scripts written for claude run with it unchanged.

Install

BASH
# macOS / Linux
curl -fsSL https://dgpt-assets-prod.nbg1.your-objectstorage.com/releases/cli/install.sh | sh
POWERSHELL
# Windows (PowerShell)
irm https://dgpt-assets-prod.nbg1.your-objectstorage.com/releases/cli/install.ps1 | iex

deutschlandgpt-code update installs a newer release later.

Sign in

BASH
deutschlandgpt-code login

The command prints a link and a short code:

TEXT
  On this or any other device, open
      https://dialog.deutschlandgpt.de/oauth/device?user_code=BCDF-GHJK
  and confirm the code
      BCDF-GHJK
  • On a laptop or desktop, your browser also opens. Sign in, click Allow, and the terminal continues by itself.
  • On a server over SSH, in a container, or anywhere without a browser, open the link on any other device, your phone included. You sign in there the normal way: password, two-factor authentication, single sign-on (SAML, Microsoft, Google). The page then shows which computer asked to sign in, from which IP address and when. Check that the code matches your terminal, then click Allow. The terminal picks the login up within a few seconds. --no-browser skips the local browser.

The code is valid for 10 minutes and can be used once. If someone sends you such a link and you did not start a login yourself, click Deny.

Your organisation's own address. If your organisation uses its own domain (for example gpt.example.com), sign in against it, so that its sign-in method applies:

BASH
deutschlandgpt-code login --host gpt.example.com

Where the login is kept. In the operating system's keychain (macOS Keychain, Windows Credential Manager, the Secret Service on a Linux desktop). Where there is none, for example on a server, it is kept in ~/.deutschlandgpt/credentials.json, readable only by you. The login renews itself. It ends when you sign out, or when it has not been used for 90 days.

CommandEffect
deutschlandgpt-code statusAccount, organisation and until when the login renews (--json for scripts)
deutschlandgpt-code logoutSigns out and ends the login on the server too (--all for every account)
deutschlandgpt-code auth listEvery stored account; auth switch <number> changes the active one
deutschlandgpt-code doctorChecks installation, connection, login and configuration

The terminal appears under Settings → Connected apps as DeutschlandGPT Code (CLI). Removing it there ends every login of the CLI for your account.

If the sign-in page says DeutschlandGPT Code is not enabled for your account, your organisation's administrators can enable it.

Work interactively

BASH
cd my-project
deutschlandgpt-code                 # start
deutschlandgpt-code "explain the build"   # start with a first message
deutschlandgpt-code -c              # continue the last session in this directory
deutschlandgpt-code -r              # pick an earlier session

Type / for the commands: /model, /compact, /resume, /usage, /status, /permissions, /memory, /init, /clear, /login, /logout, /help. Shift+Tab switches between asking before every change, accepting file edits, plan mode (read-only) and running everything without asking.

Project memory

Put the instructions the agent should always follow (build and test commands, conventions) into a DEUTSCHLANDGPT.md in your repository. AGENTS.md and CLAUDE.md are read too, so a repository already set up for another coding agent works as it is. Files in subdirectories add to those above them. ~/.deutschlandgpt/DEUTSCHLANDGPT.md holds your personal instructions for every project. /init writes a first version for the current repository.

Scripts and CI: -p

-p runs one task without the interface and prints the result:

BASH
deutschlandgpt-code -p "summarise the open TODOs"
git diff | deutschlandgpt-code -p "review this diff for bugs"
deutschlandgpt-code -p "fix the failing test" --allowedTools "Bash(npm test *)" Edit --output-format json
OptionEffect
--output-format text | json | stream-jsonjson: one result object with result, session_id, is_error, num_turns, usage. stream-json: one event per line
--input-format stream-jsonReads one user message per line from stdin
-c, -r <id>Continue the last session or a given one (session_id from the JSON result)
--model <name>Model for this run, as an id or a unique part of its name
--permission-mode <mode>default, acceptEdits (file edits allowed), plan (read-only), dontAsk, bypassPermissions
--allowedTools, --disallowedToolsRules such as "Bash(git diff *)", Read, Edit, mcp__github
--add-dir <dir>Further directories the agent may read and edit
--append-system-prompt <text>Extra instructions for this run
--max-turns <n>Stops after n steps
--verbose, --debugTool activity, or every request, on stderr

In -p mode nobody can answer a question, so a change that would need your permission is refused and listed in permission_denials. Allow it with --allowedTools or --permission-mode.

Exit codes: 0 success, 1 the task failed, hit --max-turns, or there is no login, 2 invalid options.

MCP servers

BASH
deutschlandgpt-code mcp add context7 -- npx -y @upstash/context7-mcp
deutschlandgpt-code mcp add --transport http --header "Authorization: Bearer …" docs https://example.com/mcp
deutschlandgpt-code mcp list

--scope project writes the server into the repository's .mcp.json for everyone working on it. Before the agent starts command servers from a repository for the first time, it asks you.

Was this page helpful?