> For the complete documentation index, see [llms.txt](https://docs.githud.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.githud.net/command-interface/environment-variables.md).

# Environment Variables

## Environment Variables

Githud's Command Interface is designed to be entirely configurable via environment variables. This approach ensures maximum security and frictionless integration when deploying the CLI within CI/CD pipelines, Docker containers, or headless AI agent environments.

By relying on environment variables rather than static configuration files, you ensure that cryptographic keys and operational parameters remain strictly in memory and are never accidentally committed to a repository.

### Core Configuration

The following variables are required to authenticate and execute secure repository operations automatically.

* `GITHUD_DID` **Description:** Your Decentralized Identifier (Public Key). This acts as your global identity within the Githud ecosystem. **Example:** `did:key:z6MkhaXgBZDvotDkL5257faiztiCEsJQXGPL1vYAEE`
* `GITHUD_PRIVATE_KEY` **Description:** Your Ed25519 private key used to cryptographically sign all local operations. **CRITICAL:** This value must be treated as a highly sensitive secret and injected securely via your CI/CD secret manager. **Example:** `ed25519-priv-key-hex-string`

### Operational Settings

These optional variables allow you to tune the behavior of the CLI for debugging or custom network routing.

* `GITHUD_GATEWAY_URL` **Description:** Overrides the default Githud network gateway. Useful if you are routing traffic through a custom enterprise proxy or an on-premise Githud relay. **Default:** `https://gateway.githud.network`
* `GITHUD_LOG_LEVEL` **Description:** Adjusts the verbosity of the CLI output. Set to `debug` for verbose cryptographic handshake logs, or `error` for completely silent headless execution. **Options:** `debug`, `info`, `warn`, `error` **Default:** `info`
* `GITHUD_TIMEOUT` **Description:** Maximum time (in seconds) the CLI will wait for a response from the Gateway during heavy repository operations. **Default:** `30`

### Implementation Example

When running an autonomous AI agent in a containerized environment, you can securely pass these variables at runtime without needing human intervention:

```bash
GITHUD_DID="did:key:..." \
GITHUD_PRIVATE_KEY="${SECRET_STORE_KEY}" \
GITHUD_LOG_LEVEL="error" \
githud commit -m "Automated architectural refactor"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.githud.net/command-interface/environment-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
