Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/de/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,5 @@ Ein plattformunabhangiges Systeminformations-Tool geschrieben in Rust.
- Globale Optionen und Laufzeit-Overrides
- JSON, `--get` und Templates
- Addon-, Config-, Doctor- und Update-Befehle
- WebAssembly, Diagnose und self-uninstall
- Exit-Codes, Logging und Umgebungsvariablen
60 changes: 53 additions & 7 deletions docs/de/cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CLI-Referenz

Diese Seite fasst die xfetch-Kommandozeile zusammen: globale Optionen, Ausgabemodi, Laufzeit-Overrides, Addon-Lebenszyklus, Konfigurationsverwaltung, Diagnose und Exit-Codes. Die vollständige Hilfe ist jederzeit mit `xfetch --help` und `xfetch <command> --help` verfügbar.
Diese Seite ist die Referenz für die xfetch-Kommandozeile: globale Optionen, Ausgabemodi, Laufzeit-Overrides, alle Unterbefehle, Konfigurationsverwaltung, Diagnose, Exit-Codes und Umgebungsvariablen. Die vollständige Hilfe ist jederzeit mit `xfetch --help` und `xfetch <command> --help` verfügbar.

## Syntax

Expand Down Expand Up @@ -71,7 +71,7 @@ xfetch --get version,name
xfetch --json --get os,cpu
```

Ein Schlüssel gibt den Rohwert aus; mehrere Schlüssel geben `key=value`-Zeilen aus. Mit `--json` ist die Ausgabe `{ "schema_version": 1, "values": { ... } }`. Unbekannte Schlüssel enden mit Code `7`.
Ein Schlüssel gibt den Rohwert aus; mehrere Schlüssel geben `key=value`-Zeilen aus. Mit `--json` ist die Ausgabe `{ "schema_version": 1, "values": { ... } }`. Unterstützt werden die Modulschlüssel aus `--list-modules` sowie `version`, `name`, `packages:<manager>` und `plugin:<name>`. Unbekannte Schlüssel enden mit Code `7`.

### Templates

Expand All @@ -80,7 +80,7 @@ xfetch --format 'os={{os}} kernel={{kernel}}'
xfetch --template ~/.config/xfetch/my.tmpl
```

Templates unterstützen `{{key}}`, die Filter `upper`, `lower`, `trim`, `count`, `join:" / "` und `default:"..."` sowie `{{#if}}`, `{{#unless}}`- und `{{#each}}`-Blöcke. `--get`, `--template` und `--format` gelten nur für den Standard-Fetch und lassen sich nicht mit einem Unterbefehl oder dem Daemon-Modus kombinieren.
Templates unterstützen `{{key}}`, die Filter `upper`, `lower`, `trim`, `count`, `join:" / "` und `default:"..."` sowie `{{#if}}`, `{{#unless}}`- und `{{#each}}`-Blöcke. Platzhalter decken alle Modulschlüssel, `packages:<manager>`, `plugin:<name>`, `palette`, `header`, `sep`, `name` und `version` ab. `--get`, `--template` und `--format` gelten nur für den Standard-Fetch und lassen sich nicht mit einem Unterbefehl oder dem Daemon-Modus kombinieren.

### Laufzeit-Overrides

Expand All @@ -104,7 +104,7 @@ Priorität, von hoch nach niedrig:
| `run <name> [--] <args>` | Ein Command-Addon ausführen; `--render` nutzt das Core-Layout |
| `theme` | Themes suchen, installieren, aktualisieren, auflisten, setzen, entfernen oder exportieren |
| `logo` | Logos aus dem ASCII-Katalog auflisten und anzeigen |
| `wasm` | WebAssembly-Gäste inspizieren und ausführen |
| `wasm` | WebAssembly-Gäste inspizieren, ausführen oder WIT exportieren |
| `doctor` | Installation, Konfiguration, Terminal und Addons diagnostizieren (`--fix`, `--bench`, `--image`, `--network`) |
| `modules` | Modulschlüssel auflisten |
| `config` | Validieren, ausgeben, lesen, setzen, entfernen, zurücksetzen, bearbeiten, sichern oder wiederherstellen |
Expand All @@ -120,6 +120,10 @@ Priorität, von hoch nach niedrig:
`plugin`, `effects`, `extension` und `command` teilen dieselben Aktionen. Die einheitliche Form ist äquivalent:

```bash
xfetch plugin install banner
xfetch effects install decrypt
xfetch extension install config-roulette
xfetch command install github
xfetch addon plugin install banner
xfetch addon effect install decrypt
xfetch addon extension install config-roulette
Expand Down Expand Up @@ -155,10 +159,16 @@ Command-Addons liefern reinen Text, ein Feld pro Zeile. `--render` schickt die Z
xfetch theme search dark
xfetch theme info nord
xfetch theme install nord
xfetch theme update --all --check
xfetch theme list --json
xfetch theme install nord --force
xfetch theme update nord --check
xfetch theme update nord --force
xfetch theme update --all
xfetch theme list
xfetch theme set dracula
xfetch theme remove dracula
xfetch theme export my-theme
xfetch logo list
xfetch logo list arch
xfetch logo preview arch
```

Expand All @@ -169,6 +179,7 @@ Die Theme-Registry ist `xfetch-cli/themes` (`XFETCH_THEME_INDEX` überschreibt s
```bash
xfetch config validate
xfetch config print
xfetch config print --raw
xfetch config get layout
xfetch config get colors.cpu
xfetch config set layout right
Expand All @@ -178,6 +189,7 @@ xfetch config reset --yes
xfetch config edit
xfetch config backups
xfetch config prune --keep 5
xfetch config prune --keep 5 --dry-run
```

`set` und `unset` unterstützen Punkt-Pfade und Array-Indizes, bewahren umgebende Kommentare wo möglich und validieren das Ergebnis vor dem Schreiben. `edit` nutzt `$VISUAL` oder `$EDITOR` nach einem Safety-Backup.
Expand All @@ -191,6 +203,7 @@ xfetch config backup --output ~/backups
xfetch config backup --with-addons --compress
xfetch config backup --encrypt --passphrase-file ~/.config/xfetch/backup.pass
xfetch config restore --from ~/backups --dry-run
xfetch config restore --from ~/backups --passphrase-file ~/.config/xfetch/backup.pass
xfetch config restore --root ~/restored
```

Expand All @@ -209,14 +222,42 @@ xfetch doctor --image

`doctor` prüft Binary, Konfiguration, Theme, Layout, Terminalgröße, Bildprotokoll, Addon-Verzeichnisse, Install-Receipts und Cache. `--fix` erzeugt eine fehlende Konfiguration und entfernt einen ungültigen Cache. Es endet mit Code `1`, wenn eine Prüfung fehlschlägt.

## WebAssembly

```bash
xfetch wasm inspect ./plugin.wasm
xfetch wasm run ./plugin.wasm --request '{"version":1,"kind":"info_provider"}'
xfetch wasm run ./plugin.wasm --request-file request.json --timeout 5 --kind plugin
xfetch wasm wit
```

`wasm inspect` gibt Art, Manifest, Fähigkeiten und Limits aus, ohne den Gast auszuführen. `wasm run` führt einen Gast mit einer rohen JSON-Anfrage (oder `--request-file`) aus und gibt die Antwort aus; `--timeout` überschreibt das Manifest-Timeout und `--kind` wählt die Komponentenwelt (`plugin`, `effect`, `extension` oder `command`). `wasm wit` gibt das WIT-Paket für Komponenten-Gäste aus.

## Diagnose und Dienstprogramme

```bash
xfetch modules
xfetch modules --json
xfetch paths
xfetch env
xfetch build-info
xfetch schema fetch
xfetch schema all
xfetch self-uninstall
xfetch self-uninstall --purge --yes
```

`modules` listet die akzeptierten Modulschlüssel; mit `--json` liefert es Objekte mit `key`, `description` und `platforms`. `paths` gibt die aufgelösten Konfigurations-, Addon-, Cache- und Datenpfade aus; `env` gibt Plattform, Terminal, Umgebung und Laufzeiteinstellungen aus; `build-info` gibt Build-Version und aktivierte Features aus. `schema [fetch|backup|addon|update|doctor|config|all]` gibt das JSON-Schema für die maschinenlesbaren Ausgaben aus. `self-uninstall` entfernt das Binary; `--purge` entfernt zusätzlich Konfiguration, Cache und Daten, und `--yes` überspringt die Bestätigung.

## Shell-Integration

```bash
xfetch completions bash > ~/.local/share/bash-completion/completions/xfetch
xfetch completions zsh > ~/.zfunc/_xfetch
xfetch completions fish > ~/.config/fish/completions/xfetch.fish
xfetch completions elvish > xfetch.elv
xfetch completions powershell > xfetch.ps1
xfetch man --output ~/.local/share/man/man1/xfetch.1
xfetch schema fetch
```

## Update
Expand All @@ -225,6 +266,7 @@ xfetch schema fetch
xfetch update --check
xfetch update --check --json
xfetch update
xfetch update --yes
xfetch update --prebuilt --bin-dir ~/.local/bin
xfetch update --rollback
```
Expand Down Expand Up @@ -268,6 +310,10 @@ xfetch --log-level warn --quiet
| `XFETCH_WASM_LOG_LEVEL` | Log-Schwelle für Wasm-Gäste (`off`..`debug`) |
| `XFETCH_UPDATE_API` | GitHub-API-Endpunkt für `xfetch update` |
| `GH_TOKEN` / `GITHUB_TOKEN` | GitHub-Token für das Update-Rate-Limit |
| `XFETCH_PLUGIN_DEV_DIR`, `XFETCH_COMMAND_DEV_DIR` | Zusätzliche Entwicklungsverzeichnisse für die Addon-Suche |
| `XPM_AUR_STATE` | Überschreibt die xpm-aur-State-Datei für die Paketzählung |
| `KITTY_WINDOW_ID` | Aktiviert das Kitty-Grafikprotokoll, wenn gesetzt |
| `TERM_PROGRAM`, `LC_TERMINAL` | Wählen iTerm-kompatible Inline-Bilder, wenn unterstützt |

## Sicherheitshinweise

Expand Down
1 change: 1 addition & 0 deletions docs/en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,5 @@ A cross-platform system information fetching tool written in Rust.
- Global options and runtime overrides
- JSON, `--get` and templates
- Addon, config, doctor and update commands
- WebAssembly, diagnostics and self-uninstall
- Exit codes, logging and environment variables
60 changes: 53 additions & 7 deletions docs/en/cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CLI Reference

This page summarizes the xfetch command line: global options, output modes, runtime overrides, addon lifecycle, configuration management, diagnostics and exit codes. The full generated help is always available with `xfetch --help` and `xfetch <command> --help`.
This page is the reference for the xfetch command line: global options, output modes, runtime overrides, every subcommand, configuration management, diagnostics, exit codes and environment variables. The full generated help is always available with `xfetch --help` and `xfetch <command> --help`.

## Synopsis

Expand Down Expand Up @@ -71,7 +71,7 @@ xfetch --get version,name
xfetch --json --get os,cpu
```

A single key prints the raw value; multiple keys print `key=value` lines. With `--json` the output is `{ "schema_version": 1, "values": { ... } }`. Unknown keys exit with code `7`.
A single key prints the raw value; multiple keys print `key=value` lines. With `--json` the output is `{ "schema_version": 1, "values": { ... } }`. Supported keys are the module keys from `--list-modules`, plus `version`, `name`, `packages:<manager>` and `plugin:<name>`. Unknown keys exit with code `7`.

### Templates

Expand All @@ -80,7 +80,7 @@ xfetch --format 'os={{os}} kernel={{kernel}}'
xfetch --template ~/.config/xfetch/my.tmpl
```

Templates support `{{key}}`, the filters `upper`, `lower`, `trim`, `count`, `join:" / "` and `default:"..."`, plus `{{#if}}`, `{{#unless}}` and `{{#each}}` blocks. `--get`, `--template` and `--format` only apply to the default fetch and cannot be combined with a subcommand or daemon mode.
Templates support `{{key}}`, the filters `upper`, `lower`, `trim`, `count`, `join:" / "` and `default:"..."`, plus `{{#if}}`, `{{#unless}}` and `{{#each}}` blocks. Placeholders cover every module key, `packages:<manager>`, `plugin:<name>`, `palette`, `header`, `sep`, `name` and `version`. `--get`, `--template` and `--format` only apply to the default fetch and cannot be combined with a subcommand or daemon mode.

### Runtime overrides

Expand All @@ -104,7 +104,7 @@ Precedence, highest to lowest:
| `run <name> [--] <args>` | Run a command addon; `--render` uses the core layout |
| `theme` | Search, install, update, list, set, remove or export themes |
| `logo` | List and preview logos from the ASCII catalog |
| `wasm` | Inspect and run WebAssembly guests |
| `wasm` | Inspect, run or export WIT for WebAssembly guests |
| `doctor` | Diagnose install, config, terminal and addons (`--fix`, `--bench`, `--image`, `--network`) |
| `modules` | List module keys |
| `config` | Validate, print, get, set, unset, reset, edit, back up or restore |
Expand All @@ -120,6 +120,10 @@ Precedence, highest to lowest:
`plugin`, `effects`, `extension` and `command` share the same actions. The unified form is equivalent:

```bash
xfetch plugin install banner
xfetch effects install decrypt
xfetch extension install config-roulette
xfetch command install github
xfetch addon plugin install banner
xfetch addon effect install decrypt
xfetch addon extension install config-roulette
Expand Down Expand Up @@ -155,10 +159,16 @@ Command addons return plain text, one field per line. `--render` passes the line
xfetch theme search dark
xfetch theme info nord
xfetch theme install nord
xfetch theme update --all --check
xfetch theme list --json
xfetch theme install nord --force
xfetch theme update nord --check
xfetch theme update nord --force
xfetch theme update --all
xfetch theme list
xfetch theme set dracula
xfetch theme remove dracula
xfetch theme export my-theme
xfetch logo list
xfetch logo list arch
xfetch logo preview arch
```

Expand All @@ -169,6 +179,7 @@ The theme registry is `xfetch-cli/themes` (`XFETCH_THEME_INDEX` overrides it). T
```bash
xfetch config validate
xfetch config print
xfetch config print --raw
xfetch config get layout
xfetch config get colors.cpu
xfetch config set layout right
Expand All @@ -178,6 +189,7 @@ xfetch config reset --yes
xfetch config edit
xfetch config backups
xfetch config prune --keep 5
xfetch config prune --keep 5 --dry-run
```

`set` and `unset` support dotted keys and array indices, preserve surrounding comments where possible and validate the result before writing. `edit` uses `$VISUAL` or `$EDITOR` after a safety backup.
Expand All @@ -191,6 +203,7 @@ xfetch config backup --output ~/backups
xfetch config backup --with-addons --compress
xfetch config backup --encrypt --passphrase-file ~/.config/xfetch/backup.pass
xfetch config restore --from ~/backups --dry-run
xfetch config restore --from ~/backups --passphrase-file ~/.config/xfetch/backup.pass
xfetch config restore --root ~/restored
```

Expand All @@ -209,14 +222,42 @@ xfetch doctor --image

`doctor` checks the binary, config, theme, layout, terminal size, image protocol, addon directories, install receipts and cache. `--fix` generates a missing config and removes an invalid cache file. It exits `1` when any check fails.

## WebAssembly

```bash
xfetch wasm inspect ./plugin.wasm
xfetch wasm run ./plugin.wasm --request '{"version":1,"kind":"info_provider"}'
xfetch wasm run ./plugin.wasm --request-file request.json --timeout 5 --kind plugin
xfetch wasm wit
```

`wasm inspect` prints the resolved kind, manifest, capabilities and limits without executing the guest. `wasm run` executes a guest with a raw JSON request (or `--request-file`) and prints its response; `--timeout` overrides the manifest timeout and `--kind` selects the component world (`plugin`, `effect`, `extension` or `command`). `wasm wit` prints the WIT package for component guests.

## Diagnostics and Utilities

```bash
xfetch modules
xfetch modules --json
xfetch paths
xfetch env
xfetch build-info
xfetch schema fetch
xfetch schema all
xfetch self-uninstall
xfetch self-uninstall --purge --yes
```

`modules` lists the accepted module keys; with `--json` it returns objects with `key`, `description` and `platforms`. `paths` prints the resolved config, addon, cache and data paths; `env` prints platform, terminal, environment and runtime settings; `build-info` prints the build version and enabled features. `schema [fetch|backup|addon|update|doctor|config|all]` prints the JSON Schema for the machine-readable outputs. `self-uninstall` removes the binary; `--purge` also removes config, cache and data, and `--yes` skips the confirmation.

## Shell Integration

```bash
xfetch completions bash > ~/.local/share/bash-completion/completions/xfetch
xfetch completions zsh > ~/.zfunc/_xfetch
xfetch completions fish > ~/.config/fish/completions/xfetch.fish
xfetch completions elvish > xfetch.elv
xfetch completions powershell > xfetch.ps1
xfetch man --output ~/.local/share/man/man1/xfetch.1
xfetch schema fetch
```

## Update
Expand All @@ -225,6 +266,7 @@ xfetch schema fetch
xfetch update --check
xfetch update --check --json
xfetch update
xfetch update --yes
xfetch update --prebuilt --bin-dir ~/.local/bin
xfetch update --rollback
```
Expand Down Expand Up @@ -268,6 +310,10 @@ xfetch --log-level warn --quiet
| `XFETCH_WASM_LOG_LEVEL` | Wasm guest log threshold (`off`..`debug`) |
| `XFETCH_UPDATE_API` | GitHub API endpoint used by `xfetch update` |
| `GH_TOKEN` / `GITHUB_TOKEN` | GitHub token for update rate limits |
| `XFETCH_PLUGIN_DEV_DIR`, `XFETCH_COMMAND_DEV_DIR` | Extra development directories for addon lookup |
| `XPM_AUR_STATE` | Override the xpm-aur state file used for package counts |
| `KITTY_WINDOW_ID` | Enables the Kitty graphics protocol when set |
| `TERM_PROGRAM`, `LC_TERMINAL` | Select iTerm-compatible inline images when supported |

## Security Notes

Expand Down
1 change: 1 addition & 0 deletions docs/es/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,5 @@ Una herramienta de obtención de información del sistema multiplataforma escrit
- Opciones globales y overrides en tiempo de ejecución
- JSON, `--get` y plantillas
- Comandos de addons, config, doctor y update
- WebAssembly, diagnóstico y self-uninstall
- Códigos de salida, logging y variables de entorno
Loading
Loading