From d8f280b652f5d508e0062484ea52050a002d8ee7 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 1 Mar 2026 00:30:22 +0000 Subject: [PATCH] Update cheatsheets --- tldr/az-disk | 2 +- tldr/bindkey | 3 ++- tldr/codex | 14 +++++++------- tldr/gpg-tui | 2 +- tldr/opencode | 1 + tldr/opencode-agent | 21 +++++++++++++++++++++ tldr/opencode-auth | 25 +++++++++++++++++++++++++ tldr/opencode-debug | 33 +++++++++++++++++++++++++++++++++ tldr/opencode-export | 21 +++++++++++++++++++++ tldr/opencode-import | 21 +++++++++++++++++++++ tldr/opencode-mcp | 33 +++++++++++++++++++++++++++++++++ tldr/opencode-models | 29 +++++++++++++++++++++++++++++ tldr/opencode-session | 25 +++++++++++++++++++++++++ tldr/opencode-stats | 37 +++++++++++++++++++++++++++++++++++++ tldr/opencode-uninstall | 33 +++++++++++++++++++++++++++++++++ tldr/opencode-upgrade | 25 +++++++++++++++++++++++++ tldr/opencode-web | 29 +++++++++++++++++++++++++++++ tldr/terraform-login | 22 ++++++++++++++++++++++ tldr/terraform-logout | 18 ++++++++++++++++++ tldr/zle | 39 +++++++++++++++++++++++++++++++++++++++ 20 files changed, 423 insertions(+), 10 deletions(-) create mode 100644 tldr/opencode-agent create mode 100644 tldr/opencode-auth create mode 100644 tldr/opencode-debug create mode 100644 tldr/opencode-export create mode 100644 tldr/opencode-import create mode 100644 tldr/opencode-mcp create mode 100644 tldr/opencode-models create mode 100644 tldr/opencode-session create mode 100644 tldr/opencode-stats create mode 100644 tldr/opencode-uninstall create mode 100644 tldr/opencode-upgrade create mode 100644 tldr/opencode-web create mode 100644 tldr/terraform-login create mode 100644 tldr/terraform-logout create mode 100644 tldr/zle diff --git a/tldr/az-disk b/tldr/az-disk index a9fef830..8873aa85 100644 --- a/tldr/az-disk +++ b/tldr/az-disk @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a managed disk: -`az disk create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{disk_name}} {{[-z|--size-gb]}}{{size_in_gb}}` +`az disk create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{disk_name}} {{[-z|--size-gb]}} {{size_in_gb}}` - List managed disks in a resource group: diff --git a/tldr/bindkey b/tldr/bindkey index fb53d394..0eaf03c2 100644 --- a/tldr/bindkey +++ b/tldr/bindkey @@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git # bindkey > Add hotkeys to Z shell. -> More information: . +> See also: `zle`. +> More information: . - List all existing hotkeys: diff --git a/tldr/codex b/tldr/codex index ad58fdc3..796c770d 100644 --- a/tldr/codex +++ b/tldr/codex @@ -17,17 +17,17 @@ source: https://github.com/tldr-pages/tldr.git `codex "{{your prompt}}"` -- Run a prompt with automatic approval of all file edits and commands: +- Run a prompt in full auto mode: -`codex {{[-a|--approval-mode]}} full-auto "{{your prompt}}"` +`codex --full-auto "{{your prompt}}"` -- Use a specific provider and model: +- Use a specific model: -`codex --provider {{provider_name}} {{[-m|--model]}} {{model_name}} "{{your prompt}}"` +`codex {{[-m|--model]}} {{model_name}} "{{your prompt}}"` -- Load the entire repository as context (experimental): +- Use a local open source model provider: -`codex --full-context "{{your prompt}}"` +`codex --oss --local-provider {{lmstudio|ollama}} "{{your prompt}}"` - [Interactive] Show the resource usage for the current session: @@ -35,4 +35,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`codex --help` +`codex {{[-h|--help]}}` diff --git a/tldr/gpg-tui b/tldr/gpg-tui index 891aeb9e..3ab946b8 100644 --- a/tldr/gpg-tui +++ b/tldr/gpg-tui @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Start `gpg-tui` with color and ASCII armored output: -`gpg-tui --style {{colored}} --armor` +`gpg-tui {{[-s|--style]}} {{colored}} {{[-a|--armor]}}` - Quit `gpg-tui`: diff --git a/tldr/opencode b/tldr/opencode index 81024283..ffa70a31 100644 --- a/tldr/opencode +++ b/tldr/opencode @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # opencode > An AI coding agent. +> Some subcommands such as `auth`, `models`, `web`, etc. have their own usage documentation. > More information: . - Start the interactive TUI: diff --git a/tldr/opencode-agent b/tldr/opencode-agent new file mode 100644 index 00000000..ba44ce89 --- /dev/null +++ b/tldr/opencode-agent @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode agent + +> Manage agents for OpenCode. +> More information: . + +- List all available agents: + +`opencode agent list` + +- Create a new agent interactively: + +`opencode agent create` + +- Display help: + +`opencode agent {{[-h|--help]}}` diff --git a/tldr/opencode-auth b/tldr/opencode-auth new file mode 100644 index 00000000..6d2fd818 --- /dev/null +++ b/tldr/opencode-auth @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode auth + +> Manage credentials and login for AI providers. +> More information: . + +- Log in to a provider interactively: + +`opencode auth login` + +- List all configured providers: + +`opencode auth list` + +- Log out from a configured provider interactively: + +`opencode auth logout` + +- Display help: + +`opencode auth {{[-h|--help]}}` diff --git a/tldr/opencode-debug b/tldr/opencode-debug new file mode 100644 index 00000000..903f51c0 --- /dev/null +++ b/tldr/opencode-debug @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode debug + +> Debugging and troubleshooting tools for OpenCode. +> More information: . + +- Show resolved configuration: + +`opencode debug config` + +- Show global paths (data, config, cache, state): + +`opencode debug paths` + +- List all known projects: + +`opencode debug scrap` + +- List all available skills: + +`opencode debug skill` + +- Show agent configuration details: + +`opencode debug agent {{agent_name}}` + +- Display help: + +`opencode debug {{[-h|--help]}}` diff --git a/tldr/opencode-export b/tldr/opencode-export new file mode 100644 index 00000000..77b67774 --- /dev/null +++ b/tldr/opencode-export @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode export + +> Export session data as JSON. +> More information: . + +- Export a specific session to a file: + +`opencode export {{session_id}} > {{path/to/session}}.json` + +- Export a session interactively (output in `stdout`): + +`opencode export` + +- Display help: + +`opencode export {{[-h|--help]}}` diff --git a/tldr/opencode-import b/tldr/opencode-import new file mode 100644 index 00000000..3579777d --- /dev/null +++ b/tldr/opencode-import @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode import + +> Import session data from a JSON file or URL. +> More information: . + +- Import from a JSON file: + +`opencode import {{path/to/session}}.json` + +- Import from a share URL: + +`opencode import {{URL}}` + +- Display help: + +`opencode import {{[-h|--help]}}` diff --git a/tldr/opencode-mcp b/tldr/opencode-mcp new file mode 100644 index 00000000..500e8a4b --- /dev/null +++ b/tldr/opencode-mcp @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode mcp + +> Manage MCP (Model Context Protocol) servers. +> More information: . + +- List MCP servers and their status: + +`opencode mcp list` + +- Add an MCP server interactively: + +`opencode mcp add` + +- Authenticate with an OAuth-enabled MCP server: + +`opencode mcp auth {{server_name}}` + +- Remove OAuth credentials for an MCP server: + +`opencode mcp logout {{server_name}}` + +- Debug OAuth connection for an MCP server: + +`opencode mcp debug {{server_name}}` + +- Display help: + +`opencode mcp {{[-h|--help]}}` diff --git a/tldr/opencode-models b/tldr/opencode-models new file mode 100644 index 00000000..816dda80 --- /dev/null +++ b/tldr/opencode-models @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode models + +> List all available models from configured providers. +> More information: . + +- List all available models from all configured providers: + +`opencode models` + +- List models from a specific provider: + +`opencode models {{provider}}` + +- List models with verbose output including metadata like costs: + +`opencode models --verbose` + +- Refresh the models cache from models.dev: + +`opencode models --refresh` + +- Display help: + +`opencode models {{[-h|--help]}}` diff --git a/tldr/opencode-session b/tldr/opencode-session new file mode 100644 index 00000000..df0f7c5f --- /dev/null +++ b/tldr/opencode-session @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode session + +> Manage OpenCode sessions. +> More information: . + +- List sessions: + +`opencode session list` + +- List the last N sessions in a specific format: + +`opencode session list {{[-n|--max-count]}} {{10}} --format {{table|json}}` + +- Delete a specific session: + +`opencode session delete {{session_id}}` + +- Display help: + +`opencode session {{[-h|--help]}}` diff --git a/tldr/opencode-stats b/tldr/opencode-stats new file mode 100644 index 00000000..0a82214e --- /dev/null +++ b/tldr/opencode-stats @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode stats + +> Show token usage and cost statistics. +> More information: . + +- Show statistics: + +`opencode stats` + +- Show statistics for the last N days: + +`opencode stats --days {{30}}` + +- Show statistics with model breakdown: + +`opencode stats --models` + +- Show top N models by usage: + +`opencode stats --models {{5}}` + +- Show statistics for a specific project (omit the project name to use the current project): + +`opencode stats --project {{project_name}}` + +- Show the top N tools used: + +`opencode stats --tools {{10}}` + +- Display help: + +`opencode stats {{[-h|--help]}}` diff --git a/tldr/opencode-uninstall b/tldr/opencode-uninstall new file mode 100644 index 00000000..ec15ffc1 --- /dev/null +++ b/tldr/opencode-uninstall @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode uninstall + +> Uninstall OpenCode and remove all related files. +> More information: . + +- Uninstall OpenCode: + +`opencode uninstall` + +- Uninstall and keep configuration files: + +`opencode uninstall {{[-c|--keep-config]}}` + +- Uninstall and keep session data and snapshots: + +`opencode uninstall {{[-d|--keep-data]}}` + +- Show what would be removed without removing: + +`opencode uninstall --dry-run` + +- Skip confirmation prompts: + +`opencode uninstall {{[-f|--force]}}` + +- Display help: + +`opencode uninstall {{[-h|--help]}}` diff --git a/tldr/opencode-upgrade b/tldr/opencode-upgrade new file mode 100644 index 00000000..043d907b --- /dev/null +++ b/tldr/opencode-upgrade @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode upgrade + +> Upgrade OpenCode to the latest version or a specific version. +> More information: . + +- Upgrade to the latest version: + +`opencode upgrade` + +- Upgrade/downgrade to a specific version: + +`opencode upgrade {{1.1.10}}` + +- Upgrade using a specific installation method: + +`opencode upgrade {{[-m|--method]}} {{curl|npm|pnpm|bun|brew|choco|scoop}}` + +- Display help: + +`opencode upgrade {{[-h|--help]}}` diff --git a/tldr/opencode-web b/tldr/opencode-web new file mode 100644 index 00000000..0256211f --- /dev/null +++ b/tldr/opencode-web @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# opencode web + +> Start an OpenCode server with a web interface. +> More information: . + +- Start the web interface on the default port: + +`opencode web` + +- Start on a specific port: + +`opencode web --port {{8080}}` + +- Start on a specific hostname: + +`opencode web --hostname {{0.0.0.0}}` + +- Enable mDNS service discovery: + +`opencode web --mdns` + +- Display help: + +`opencode web {{[-h|--help]}}` diff --git a/tldr/terraform-login b/tldr/terraform-login new file mode 100644 index 00000000..cf9d859a --- /dev/null +++ b/tldr/terraform-login @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# terraform login + +> Log in to a remote host. +> See also: `terraform logout`. +> More information: . + +- Log in to HCP Terraform (app.terraform.io): + +`terraform login` + +- Log in to a specific hostname: + +`terraform login {{hostname}}` + +- Log in to HCP Terraform Europe: + +`terraform login app.terraform.io/eu` diff --git a/tldr/terraform-logout b/tldr/terraform-logout new file mode 100644 index 00000000..781ce4a5 --- /dev/null +++ b/tldr/terraform-logout @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# terraform logout + +> Log out from a remote host. +> See also: `terraform login`. +> More information: . + +- Log out from HCP Terraform (app.terraform.io): + +`terraform logout` + +- Log out from a specific hostname: + +`terraform logout {{hostname}}` diff --git a/tldr/zle b/tldr/zle new file mode 100644 index 00000000..9d7b98fa --- /dev/null +++ b/tldr/zle @@ -0,0 +1,39 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# zle + +> Manage Zsh Line Editor widgets. +> Note: Some operations require ZLE to be active (typically inside a user-defined widget). +> See also: `bindkey`. +> More information: . + +- [l]ist user-defined widgets: + +`zle -l` + +- [l]ist [a]ll widgets, including built-in ones: + +`zle -la` + +- Create a [N]ew user-defined widget (function defaults to same name as widget): + +`zle -N {{widget_name}} {{optional_shell_function_name}}` + +- [D]elete a widget: + +`zle -D {{widget_name}}` + +- Create an [A]lias of a widget: + +`zle -A {{original_widget}} {{alias_name}}` + +- Invoke a widget from inside another widget function (requires active ZLE): + +`zle {{widget_name}}` + +- Push text into ZLE's input queue as if it were typed (requires active ZLE): + +`zle -U "{{text}}"`