mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-06 20:45:29 +00:00
Update cheatsheets
This commit is contained in:
@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all installed formulae and casks:
|
||||
|
||||
`brew list`
|
||||
`brew {{[ls|list]}}`
|
||||
|
||||
- List files belonging to an installed formula:
|
||||
|
||||
`brew list {{formula}}`
|
||||
`brew {{[ls|list]}} {{formula}}`
|
||||
|
||||
- List artifacts of a cask:
|
||||
|
||||
`brew list {{cask}}`
|
||||
`brew {{[ls|list]}} {{cask}}`
|
||||
|
||||
- List only formulae:
|
||||
|
||||
`brew list --formula`
|
||||
`brew {{[ls|list]}} --formula`
|
||||
|
||||
- List only casks:
|
||||
|
||||
`brew list --cask`
|
||||
`brew {{[ls|list]}} --cask`
|
||||
|
||||
- List only pinned formulae:
|
||||
|
||||
`brew list --pinned`
|
||||
`brew {{[ls|list]}} --pinned`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Fetch the newest version of Homebrew and all formulae:
|
||||
|
||||
`brew update`
|
||||
`brew {{[up|update]}}`
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> A resource monitor that shows information about the CPU, memory, disks, network and processes.
|
||||
> A C++ version of `bpytop`.
|
||||
> More information: <https://github.com/aristocratos/btop>.
|
||||
> More information: <https://github.com/aristocratos/btop#command-line-options>.
|
||||
|
||||
- Start `btop`:
|
||||
|
||||
|
||||
29
tldr/cargo-deb
Normal file
29
tldr/cargo-deb
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cargo deb
|
||||
|
||||
> Create Debian packages from Cargo projects.
|
||||
> More information: <https://github.com/kornelski/cargo-deb>.
|
||||
|
||||
- Create a Debian package from a project:
|
||||
|
||||
`cargo deb`
|
||||
|
||||
- Write the `.deb` file to the specified file or directory:
|
||||
|
||||
`cargo deb {{[-o|--output]}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Compile for the specified Rust target triple:
|
||||
|
||||
`cargo deb --target {{x86_64-unknown-linux-gnu}}`
|
||||
|
||||
- Select which package to use in a Cargo workspace:
|
||||
|
||||
`cargo deb {{[-p|--package]}} {{package_name}}`
|
||||
|
||||
- Immediately install the created package:
|
||||
|
||||
`cargo deb --install`
|
||||
29
tldr/cargo-msrv
Normal file
29
tldr/cargo-msrv
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cargo msrv
|
||||
|
||||
> Manage the Minimum Supported Rust Version (MSRV) of a project.
|
||||
> More information: <https://gribnau.dev/cargo-msrv>.
|
||||
|
||||
- Display the MSRVs of dependencies (as specified in their `Cargo.toml`):
|
||||
|
||||
`cargo msrv list`
|
||||
|
||||
- Find the MSRV of the project by trying to compile it with various toolchains:
|
||||
|
||||
`cargo msrv find`
|
||||
|
||||
- Show the MSRV of the project as specified in `Cargo.toml`:
|
||||
|
||||
`cargo msrv show`
|
||||
|
||||
- Set the MSRV in `Cargo.toml` to a given Rust version:
|
||||
|
||||
`cargo msrv set {{version}}`
|
||||
|
||||
- Verify whether the MSRV is satisfiable by compiling the project using the specified version of Rust:
|
||||
|
||||
`cargo msrv verify`
|
||||
34
tldr/crush
Normal file
34
tldr/crush
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# crush
|
||||
|
||||
> AI-powered terminal assistant for software development tasks.
|
||||
> Provides interactive chat interface with AI capabilities, code analysis, and LSP integration.
|
||||
> More information: <https://github.com/charmbracelet/crush>.
|
||||
|
||||
- Start interactive mode:
|
||||
|
||||
`crush`
|
||||
|
||||
- Run with debug logging:
|
||||
|
||||
`crush {{[-d|--debug]}}`
|
||||
|
||||
- Run with debug logging in a specific directory:
|
||||
|
||||
`crush {{[-d|--debug]}} {{[-c|--cwd]}} {{path/to/project}}`
|
||||
|
||||
- Run a single non-interactive prompt:
|
||||
|
||||
`crush run "{{Explain the use of context in Go}}"`
|
||||
|
||||
- Run in dangerous mode (auto-accept all permissions):
|
||||
|
||||
`crush {{[-y|--yolo]}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`crush {{[-v|--version]}}`
|
||||
41
tldr/gh-cache
Normal file
41
tldr/gh-cache
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gh cache
|
||||
|
||||
> Manage GitHub Actions caches.
|
||||
> More information: <https://cli.github.com/manual/gh_cache>.
|
||||
|
||||
- List caches for the current repository:
|
||||
|
||||
`gh cache {{[ls|list]}}`
|
||||
|
||||
- List caches for a specific repository:
|
||||
|
||||
`gh cache {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repository}}`
|
||||
|
||||
- List caches with a specific cache key prefix:
|
||||
|
||||
`gh cache {{[ls|list]}} {{[-k|--key]}} {{key_prefix}}`
|
||||
|
||||
- List caches for a specific branch:
|
||||
|
||||
`gh cache {{[ls|list]}} {{[-r|--ref]}} refs/heads/{{branch_name}}`
|
||||
|
||||
- List caches sorted by least recently accessed:
|
||||
|
||||
`gh cache {{[ls|list]}} {{[-S|--sort]}} last_accessed_at {{[-O|--order]}} asc`
|
||||
|
||||
- Delete a cache by id:
|
||||
|
||||
`gh cache delete {{cache_id}}`
|
||||
|
||||
- Delete a cache by key:
|
||||
|
||||
`gh cache delete {{cache_key}}`
|
||||
|
||||
- Delete all caches:
|
||||
|
||||
`gh cache delete {{[-a|--all]}}`
|
||||
41
tldr/gh-search
Normal file
41
tldr/gh-search
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gh search
|
||||
|
||||
> Search across all of GitHub.
|
||||
> More information: <https://cli.github.com/manual/gh_search>.
|
||||
|
||||
- Search for code containing specific keywords:
|
||||
|
||||
`gh search code {{keyword1 keyword2 ...}}`
|
||||
|
||||
- Search for issues with a specific phrase:
|
||||
|
||||
`gh search issues "{{search_phrase}}"`
|
||||
|
||||
- Search commits by a specific author:
|
||||
|
||||
`gh search commits --author {{username}}`
|
||||
|
||||
- Search pull requests assigned to yourself that are still open:
|
||||
|
||||
`gh search prs --assignee @me --state open`
|
||||
|
||||
- Search repositories in an organization by topic:
|
||||
|
||||
`gh search repos --owner {{org_name}} --topic {{topic_name}}`
|
||||
|
||||
- Search issues without a certain label (Unix-like systems):
|
||||
|
||||
`gh search issues -- "{{search_query}} -label:{{label_name}}"`
|
||||
|
||||
- Search issues without a certain label (PowerShell):
|
||||
|
||||
`gh --% search issues -- "{{search_query}} -label:{{label_name}}"`
|
||||
|
||||
- Open the search query in the web browser:
|
||||
|
||||
`gh search {{subcommand}} {{[-w|--web]}} {{query}}`
|
||||
@@ -5,14 +5,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# neofetch
|
||||
|
||||
> Display information about your operating system, software and hardware.
|
||||
> Display information about the operating system, software and hardware.
|
||||
> Note: `neofetch` is no longer maintained.
|
||||
> See also: `fastfetch`.
|
||||
> More information: <https://github.com/dylanaraps/neofetch>.
|
||||
|
||||
- Return the default config, and create it if it's the first time the program runs:
|
||||
|
||||
`neofetch`
|
||||
|
||||
- Trigger an info line from appearing in the output, where 'infoname' is the function name in the configuration file, e.g. memory:
|
||||
- Trigger an info line from appearing in the output, where `infoname` is the function name in the configuration file, e.g. memory:
|
||||
|
||||
`neofetch --{{enable|disable}} {{infoname}}`
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ping6
|
||||
|
||||
> Send ICMP ECHO_REQUEST packets to network hosts via IPv6 address.
|
||||
> Note: `ping6` has been merged to `ping` in modern systems.
|
||||
> More information: <https://manned.org/ping6>.
|
||||
|
||||
- Ping a host:
|
||||
|
||||
@@ -12,18 +12,18 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pip freeze`
|
||||
|
||||
- List installed packages and write it to the `requirements.txt` file:
|
||||
- Write installed packages to the `requirements.txt` file:
|
||||
|
||||
`pip freeze > requirements.txt`
|
||||
|
||||
- List installed packages in a virtual environment, excluding globally installed packages:
|
||||
|
||||
`pip freeze {{[-l|--local]}} > requirements.txt`
|
||||
`pip freeze {{[-l|--local]}}`
|
||||
|
||||
- List installed packages in the user-site:
|
||||
|
||||
`pip freeze --user > requirements.txt`
|
||||
`pip freeze --user`
|
||||
|
||||
- List all packages, including `pip`, `distribute`, `setuptools`, and `wheel` (they are skipped by default):
|
||||
|
||||
`pip freeze --all > requirements.txt`
|
||||
`pip freeze --all`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# pip install
|
||||
|
||||
> Install Python packages.
|
||||
> More information: <https://pip.pypa.io>.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_install/>.
|
||||
|
||||
- Install a package:
|
||||
|
||||
@@ -20,10 +20,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pip install {{[-r|--requirement]}} {{path/to/requirements.txt}}`
|
||||
|
||||
- Install packages from an URL or local file archive (.tar.gz | .whl):
|
||||
- Install packages from an URL or local file archive (e.g. `.tar.gz`, `.whl`):
|
||||
|
||||
`pip install {{[-f|--find-links]}} {{url|path/to/file}}`
|
||||
|
||||
- Install the local package in the current directory in develop (editable) mode:
|
||||
|
||||
`pip install {{[-e|--editable]}} {{.}}`
|
||||
`pip install {{[-e|--editable]}} .`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# pip uninstall
|
||||
|
||||
> Uninstall Python packages.
|
||||
> More information: <https://pip.pypa.io>.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_uninstall/>.
|
||||
|
||||
- Uninstall a package:
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Log in to the Pulumi cloud.
|
||||
> More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_login/>.
|
||||
|
||||
- Log in to the managed Pulumi Cloud backend, defaults to `app.pulumi.cloud`:
|
||||
- Log in to the managed Pulumi Cloud backend, defaults to `https://api.pulumi.com`:
|
||||
|
||||
`pulumi login`
|
||||
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Split into multiple files from `stdin`:
|
||||
|
||||
`gzip {{[-cd|--stdout --decompress]}} {{path/to/compressed_file.gz}} | split {{[-l|--lines]}} 1000 - {{path/to/output}}`
|
||||
`gzip {{[-cd|--stdout --decompress]}} {{path/to/compressed_file.gz}} | split {{[-l|--lines]}} {{1000}} - {{path/to/output}}`
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# venv
|
||||
|
||||
> Create lightweight virtual environments in python.
|
||||
> Create lightweight virtual environments in Python.
|
||||
> More information: <https://docs.python.org/library/venv.html>.
|
||||
|
||||
- Create a Python virtual environment:
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Activate the virtual environment (Linux and macOS):
|
||||
|
||||
`source {{path/to/virtual_environment}}/bin/activate`
|
||||
`{{[.|source]}} {{path/to/virtual_environment}}/bin/activate`
|
||||
|
||||
- Activate the virtual environment (Windows):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user