mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-01 17:54:24 +00:00
Update cheatsheets
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# bindkey
|
||||
|
||||
> Add hotkeys to Z shell.
|
||||
> More information: <https://zsh.sourceforge.io/Guide/zshguide04.html>.
|
||||
> See also: `zle`.
|
||||
> More information: <https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins>.
|
||||
|
||||
- List all existing hotkeys:
|
||||
|
||||
|
||||
14
tldr/codex
14
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]}}`
|
||||
|
||||
@@ -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`:
|
||||
|
||||
|
||||
@@ -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: <https://opencode.ai/docs/cli/>.
|
||||
|
||||
- Start the interactive TUI:
|
||||
|
||||
21
tldr/opencode-agent
Normal file
21
tldr/opencode-agent
Normal file
@@ -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: <https://opencode.ai/docs/cli#agent>.
|
||||
|
||||
- List all available agents:
|
||||
|
||||
`opencode agent list`
|
||||
|
||||
- Create a new agent interactively:
|
||||
|
||||
`opencode agent create`
|
||||
|
||||
- Display help:
|
||||
|
||||
`opencode agent {{[-h|--help]}}`
|
||||
25
tldr/opencode-auth
Normal file
25
tldr/opencode-auth
Normal file
@@ -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: <https://opencode.ai/docs/cli#auth>.
|
||||
|
||||
- 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]}}`
|
||||
33
tldr/opencode-debug
Normal file
33
tldr/opencode-debug
Normal file
@@ -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: <https://opencode.ai/docs/cli#debug>.
|
||||
|
||||
- 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]}}`
|
||||
21
tldr/opencode-export
Normal file
21
tldr/opencode-export
Normal file
@@ -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: <https://opencode.ai/docs/cli#export>.
|
||||
|
||||
- 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]}}`
|
||||
21
tldr/opencode-import
Normal file
21
tldr/opencode-import
Normal file
@@ -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: <https://opencode.ai/docs/cli#import>.
|
||||
|
||||
- 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]}}`
|
||||
33
tldr/opencode-mcp
Normal file
33
tldr/opencode-mcp
Normal file
@@ -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: <https://opencode.ai/docs/cli#mcp>.
|
||||
|
||||
- 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]}}`
|
||||
29
tldr/opencode-models
Normal file
29
tldr/opencode-models
Normal file
@@ -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: <https://opencode.ai/docs/cli#models>.
|
||||
|
||||
- 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]}}`
|
||||
25
tldr/opencode-session
Normal file
25
tldr/opencode-session
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# opencode session
|
||||
|
||||
> Manage OpenCode sessions.
|
||||
> More information: <https://opencode.ai/docs/cli#session>.
|
||||
|
||||
- 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]}}`
|
||||
37
tldr/opencode-stats
Normal file
37
tldr/opencode-stats
Normal file
@@ -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: <https://opencode.ai/docs/cli#stats>.
|
||||
|
||||
- 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]}}`
|
||||
33
tldr/opencode-uninstall
Normal file
33
tldr/opencode-uninstall
Normal file
@@ -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: <https://opencode.ai/docs/cli#uninstall>.
|
||||
|
||||
- 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]}}`
|
||||
25
tldr/opencode-upgrade
Normal file
25
tldr/opencode-upgrade
Normal file
@@ -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: <https://opencode.ai/docs/cli#upgrade>.
|
||||
|
||||
- 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]}}`
|
||||
29
tldr/opencode-web
Normal file
29
tldr/opencode-web
Normal file
@@ -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: <https://opencode.ai/docs/cli#web>.
|
||||
|
||||
- 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]}}`
|
||||
22
tldr/terraform-login
Normal file
22
tldr/terraform-login
Normal file
@@ -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: <https://developer.hashicorp.com/terraform/cli/commands/login>.
|
||||
|
||||
- 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`
|
||||
18
tldr/terraform-logout
Normal file
18
tldr/terraform-logout
Normal file
@@ -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: <https://developer.hashicorp.com/terraform/cli/commands/logout>.
|
||||
|
||||
- Log out from HCP Terraform (app.terraform.io):
|
||||
|
||||
`terraform logout`
|
||||
|
||||
- Log out from a specific hostname:
|
||||
|
||||
`terraform logout {{hostname}}`
|
||||
39
tldr/zle
Normal file
39
tldr/zle
Normal file
@@ -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: <https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins>.
|
||||
|
||||
- [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}}"`
|
||||
Reference in New Issue
Block a user