mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/kite
Normal file
12
tldr/kite
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kite
|
||||
|
||||
> This command is an alias of `kiterunner`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr kiterunner`
|
||||
25
tldr/kiterunner
Normal file
25
tldr/kiterunner
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kiterunner
|
||||
|
||||
> A contextual web scanner for discovering API paths and web endpoints using wordlists and kitebuilder schemas.
|
||||
> More information: <https://github.com/assetnote/kiterunner>.
|
||||
|
||||
- View documentation for bruteforcing API paths and web endpoints:
|
||||
|
||||
`tldr kiterunner brute`
|
||||
|
||||
- View documentation for concurrently scanning hosts with kitebuilder wordlists:
|
||||
|
||||
`tldr kiterunner scan`
|
||||
|
||||
- View documentation for manipulating kitebuilder schemas:
|
||||
|
||||
`tldr kiterunner kb`
|
||||
|
||||
- View documentation for managing cached and remote wordlists:
|
||||
|
||||
`tldr kiterunner wordlist`
|
||||
42
tldr/kiterunner-brute
Normal file
42
tldr/kiterunner-brute
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kiterunner brute
|
||||
|
||||
> A contextual web scanner for bruteforcing API paths and web endpoints using wordlists.
|
||||
> The `brute` subcommand targets one or multiple hosts.
|
||||
> More information: <https://github.com/assetnote/kiterunner>.
|
||||
|
||||
- Bruteforce a target with an Assetnote wordlist (e.g., first 20,000 API routes):
|
||||
|
||||
`kiterunner brute {{https://example.com}} {{[-A|--assetnote-wordlist]}} {{apiroutes-210328:20000}}`
|
||||
|
||||
- Bruteforce a target with a custom wordlist:
|
||||
|
||||
`kiterunner brute {{https://example.com}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}}`
|
||||
|
||||
- Bruteforce using a dirsearch-style wordlist with extension substitution:
|
||||
|
||||
`kiterunner brute {{https://example.com}} {{[-w|--wordlist]}} {{path/to/dirsearch.txt}} {{[-D|--dirsearch-compat]}} {{[-e|--extensions]}} {{json,txt}}`
|
||||
|
||||
- Bruteforce with specific file extensions appended and output in JSON format:
|
||||
|
||||
`kiterunner brute {{https://example.com}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} {{[-e|--extensions]}} {{aspx,ashx}} {{[-o|--output]}} {{json}}`
|
||||
|
||||
- Bruteforce a list of targets from a file with custom concurrency settings for performance:
|
||||
|
||||
`kiterunner brute {{path/to/targets.txt}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} {{[-x|--max-connection-per-host]}} {{5}} {{[-j|--max-parallel-hosts]}} {{100}}`
|
||||
|
||||
- Bruteforce and ignore specific content length responses:
|
||||
|
||||
`kiterunner brute {{https://example.com}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} --ignore-length {{100-105}}`
|
||||
|
||||
- Bruteforce with custom HTTP headers:
|
||||
|
||||
`kiterunner brute {{https://example.com}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} {{[-H|--header]}} "{{Authorization: Bearer token}}"`
|
||||
|
||||
- Bruteforce a list of targets from a file with fail status code filtering:
|
||||
|
||||
`kiterunner brute {{path/to/targets.txt}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} --fail-status-codes {{400,401,404}}`
|
||||
42
tldr/kiterunner-kb
Normal file
42
tldr/kiterunner-kb
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kiterunner kb
|
||||
|
||||
> A contextual web scanner for manipulating kitebuilder schemas used in API and web endpoint discovery.
|
||||
> The `kb` subcommand handles schema compilation, conversion, parsing, and request replay.
|
||||
> More information: <https://github.com/assetnote/kiterunner>.
|
||||
|
||||
- Compile a kitebuilder schema from JSON to a kite file:
|
||||
|
||||
`kiterunner kb compile {{path/to/wordlist.json}} {{path/to/wordlist.kite}}`
|
||||
|
||||
- Convert a kite file to a text wordlist:
|
||||
|
||||
`kiterunner kb convert {{path/to/wordlist.kite}} {{path/to/wordlist.txt}}`
|
||||
|
||||
- Convert a text wordlist to a kite file:
|
||||
|
||||
`kiterunner kb convert {{path/to/wordlist.txt}} {{path/to/wordlist.kite}}`
|
||||
|
||||
- Convert a kite file to a JSON schema:
|
||||
|
||||
`kiterunner kb convert {{path/to/wordlist.kite}} {{path/to/wordlist.json}}`
|
||||
|
||||
- Parse a kitebuilder schema and output prettified JSON data:
|
||||
|
||||
`kiterunner kb parse {{path/to/wordlist.json}} {{[-o|--output]}} {{json}}`
|
||||
|
||||
- Parse a kite file and output prettified text data:
|
||||
|
||||
`kiterunner kb parse {{path/to/wordlist.kite}} {{[-o|--output]}} {{text}}`
|
||||
|
||||
- Replay a specific request from a kitebuilder schema output:
|
||||
|
||||
`kiterunner kb replay {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}} "{{request_output}}"`
|
||||
|
||||
- Replay a request through a proxy for inspection:
|
||||
|
||||
`kiterunner kb replay {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}} {{[-p|--proxy]}} {{http://localhost:8080}} "{{request_output}}"`
|
||||
42
tldr/kiterunner-scan
Normal file
42
tldr/kiterunner-scan
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kiterunner scan
|
||||
|
||||
> A contextual web scanner for concurrently scanning API paths and web endpoints using kitebuilder wordlists.
|
||||
> The `scan` subcommand targets one or multiple hosts with structured API requests.
|
||||
> More information: <https://github.com/assetnote/kiterunner>.
|
||||
|
||||
- Scan a target with an Assetnote wordlist (e.g., first 5000 API routes):
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-A|--assetnote-wordlist]}} {{apiroutes-210228:5000}}`
|
||||
|
||||
- Scan a target with a kitebuilder wordlist:
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}}`
|
||||
|
||||
- Scan multiple hosts from a file with a kitebuilder wordlist:
|
||||
|
||||
`kiterunner scan {{path/to/hosts.txt}} {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}}`
|
||||
|
||||
- Scan with an Assetnote wordlist and JSON output:
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-A|--assetnote-wordlist]}} {{apiroutes-210228:5000}} -o {{json}}`
|
||||
|
||||
- Scan with custom concurrency settings for performance:
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}} {{[-x|--max-connection-per-host]}} {{5}} {{[-j|--max-parallel-hosts]}} {{100}}`
|
||||
|
||||
- Scan with a wordlist as a normal wordlist, disabling depth scanning:
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-w|--kitebuilder-list]}} {{path/to/rafter.txt}} {{[-d|--preflight-depth]}} {{0}}`
|
||||
|
||||
- Scan with custom headers and ignore specific content length responses:
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}} {{[-H|--header]}} "{{Authorization: Bearer token}}" --ignore-length {{100-105}}`
|
||||
|
||||
- Perform a full kitebuilder scan without phase scanning:
|
||||
|
||||
`kiterunner scan {{https://example.com}} {{[-w|--kitebuilder-list]}} {{path/to/wordlist.kite}} --kitebuilder-full-scan`
|
||||
38
tldr/kiterunner-wordlist
Normal file
38
tldr/kiterunner-wordlist
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kiterunner wordlist
|
||||
|
||||
> A contextual web scanner for managing wordlists used in API and web endpoint discovery.
|
||||
> The `wordlist` subcommand handles listing and saving wordlists in `~/.cache/kiterunner`.
|
||||
> More information: <https://github.com/assetnote/kiterunner>.
|
||||
|
||||
- List all cached and available Assetnote wordlists:
|
||||
|
||||
`kiterunner wordlist list`
|
||||
|
||||
- List wordlists with JSON output:
|
||||
|
||||
`kiterunner wordlist list {{[-o|--output]}} {{json}}`
|
||||
|
||||
- List wordlists with verbose debug output:
|
||||
|
||||
`kiterunner wordlist list {{[-v|--verbose]}} {{debug}}`
|
||||
|
||||
- Save a specific Assetnote wordlist by alias:
|
||||
|
||||
`kiterunner wordlist save {{apiroutes-210328}}`
|
||||
|
||||
- Save a specific Assetnote wordlist by full filename:
|
||||
|
||||
`kiterunner wordlist save {{path/to/httparchive_apiroutes_2024_05_28.txt}}`
|
||||
|
||||
- Save multiple wordlists by alias:
|
||||
|
||||
`kiterunner wordlist save {{apiroutes-210328,aspx-210328}}`
|
||||
|
||||
- Save a wordlist with quiet mode to suppress output:
|
||||
|
||||
`kiterunner wordlist save {{apiroutes-210328}} {{[-q|--quiet]}}`
|
||||
12
tldr/kr
Normal file
12
tldr/kr
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kr
|
||||
|
||||
> This command is an alias of `kiterunner`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr kiterunner`
|
||||
@@ -5,14 +5,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix-build
|
||||
|
||||
> Build a Nix expression.
|
||||
> See also: `nix3 build`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/nix-build.html>.
|
||||
> `nix-build` can refer to multiple commands with the same name.
|
||||
|
||||
- Build a Nix expression:
|
||||
- View documentation for the traditional builder:
|
||||
|
||||
`nix-build '<nixpkgs>' {{[-A|--attr]}} {{firefox}}`
|
||||
`tldr nix-build.2`
|
||||
|
||||
- Build a sandboxed Nix expression (on non-NixOS):
|
||||
- View documentation for nix3 builder:
|
||||
|
||||
`nix-build '<nixpkgs>' {{[-A|--attr]}} {{firefox}} --option sandbox true`
|
||||
`tldr nix build.3`
|
||||
|
||||
18
tldr/nix-build.2
Normal file
18
tldr/nix-build.2
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix-build
|
||||
|
||||
> Build a Nix expression.
|
||||
> See also: `nix build.3`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/nix-build.html>.
|
||||
|
||||
- Build a Nix expression:
|
||||
|
||||
`nix-build '<nixpkgs>' {{[-A|--attr]}} {{firefox}}`
|
||||
|
||||
- Build a sandboxed Nix expression (on non-NixOS):
|
||||
|
||||
`nix-build '<nixpkgs>' {{[-A|--attr]}} {{firefox}} --option sandbox true`
|
||||
26
tldr/nix-build.3
Normal file
26
tldr/nix-build.3
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix build
|
||||
|
||||
> Build a Nix expression (downloading from the cache when possible).
|
||||
> See also: `nix-build` for information about traditional Nix builds from expressions, `nix flake` for information about flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-build.html>.
|
||||
|
||||
- Build a package from nixpkgs, symlinking the result to `./result`:
|
||||
|
||||
`nix build {{nixpkgs#pkg}}`
|
||||
|
||||
- Build a package from a flake in the current directory, showing the build logs in the process:
|
||||
|
||||
`nix build -L {{.#pkg}}`
|
||||
|
||||
- Build the default package from a flake in some directory:
|
||||
|
||||
`nix build {{./path/to/directory}}`
|
||||
|
||||
- Build a package without making the `result` symlink, instead printing the store path to the `stdout`:
|
||||
|
||||
`nix build --no-link --print-out-paths`
|
||||
21
tldr/nix-develop
Normal file
21
tldr/nix-develop
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix develop
|
||||
|
||||
> Run a Bash shell that provides the build environment of a derivation.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop.html>.
|
||||
|
||||
- Start a shell with all dependencies of a package from nixpkgs available:
|
||||
|
||||
`nix develop {{nixpkgs#pkg}}`
|
||||
|
||||
- Start a development shell for the default package in a flake in the current directory:
|
||||
|
||||
`nix develop`
|
||||
|
||||
- In that shell, configure and build the sources:
|
||||
|
||||
`configurePhase; buildPhase`
|
||||
17
tldr/nix-edit
Normal file
17
tldr/nix-edit
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix edit
|
||||
|
||||
> Open the Nix expression of a Nix package in $EDITOR.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-edit.html>.
|
||||
|
||||
- Open the source of the Nix expression of a package from nixpkgs in your `$EDITOR`:
|
||||
|
||||
`nix edit {{nixpkgs#pkg}}`
|
||||
|
||||
- Dump the source of a package to `stdout`:
|
||||
|
||||
`EDITOR=cat nix edit {{nixpkgs#pkg}}`
|
||||
29
tldr/nix-flake
Normal file
29
tldr/nix-flake
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix flake
|
||||
|
||||
> Manage Nix flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html>.
|
||||
|
||||
- Create a new flake (just the `flake.nix` file) from the default template, in the current directory:
|
||||
|
||||
`nix flake init`
|
||||
|
||||
- Update all inputs (dependencies) of the flake in the current directory:
|
||||
|
||||
`nix flake update`
|
||||
|
||||
- Update a specific input (dependency) of the flake in the current directory:
|
||||
|
||||
`nix flake lock --update-input {{input}}`
|
||||
|
||||
- Show all the outputs of a flake on github:
|
||||
|
||||
`nix flake show {{github:owner/repo}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`nix flake --help`
|
||||
33
tldr/nix-profile
Normal file
33
tldr/nix-profile
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix profile
|
||||
|
||||
> Install, update and remove packages from Nix profiles.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-profile.html>.
|
||||
|
||||
- Install some packages from nixpkgs into the default profile:
|
||||
|
||||
`nix profile install {{nixpkgs#pkg1 nixpkgs#pkg2 ...}}`
|
||||
|
||||
- Install a package from a flake on GitHub into a custom profile:
|
||||
|
||||
`nix profile install {{github:owner/repo/pkg}} --profile {{./path/to/directory}}`
|
||||
|
||||
- List packages currently installed in the default profile:
|
||||
|
||||
`nix profile list`
|
||||
|
||||
- Remove a package installed from nixpkgs from the default profile, by name:
|
||||
|
||||
`nix profile remove {{legacyPackages.x86_64-linux.pkg}}`
|
||||
|
||||
- Upgrade packages in the default to the latest available versions:
|
||||
|
||||
`nix profile upgrade`
|
||||
|
||||
- Rollback (cancel) the latest action on the default profile:
|
||||
|
||||
`nix profile rollback`
|
||||
30
tldr/nix-registry
Normal file
30
tldr/nix-registry
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix registry
|
||||
|
||||
> Manage a Nix flake registry.
|
||||
> See also: `nix flake` for information about flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-registry.html>.
|
||||
|
||||
- Pin the `nixpkgs` revision to the current version of the upstream repository:
|
||||
|
||||
`nix registry pin {{nixpkgs}}`
|
||||
|
||||
- Pin an entry to the latest version of the branch, or a particular reivision of a GitHub repository:
|
||||
|
||||
`nix registry pin {{entry}} {{github:owner/repo/branch_or_revision}}`
|
||||
|
||||
- Add a new entry that always points to the latest version of a GitHub repository, updating automatically:
|
||||
|
||||
`nix registry add {{entry}} {{github:owner/repo}}`
|
||||
|
||||
- Remove a registry entry:
|
||||
|
||||
`nix registry remove {{entry}}`
|
||||
|
||||
- See documentation about what Nix flake registries are:
|
||||
|
||||
`nix registry --help`
|
||||
30
tldr/nix-repl
Normal file
30
tldr/nix-repl
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix repl
|
||||
|
||||
> Start an interactive environment for evaluating Nix expressions.
|
||||
> See <https://nixos.org/manual/nix/stable/language/index.html> for a description of the Nix expression language.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-repl.html>.
|
||||
|
||||
- Start an interactive environment for evaluating Nix expressions:
|
||||
|
||||
`nix repl`
|
||||
|
||||
- Load all packages from a flake (e.g. `nixpkgs`) into scope:
|
||||
|
||||
`:lf {{nixpkgs}}`
|
||||
|
||||
- Build a package from an expression:
|
||||
|
||||
`:b {{expression}}`
|
||||
|
||||
- Start a shell with package from the expression available:
|
||||
|
||||
`:u {{expression}}`
|
||||
|
||||
- Start a shell with dependencies of the package from the expression available:
|
||||
|
||||
`:s {{expression}}`
|
||||
38
tldr/nix-run
Normal file
38
tldr/nix-run
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix run
|
||||
|
||||
> Run an application from a Nix flake.
|
||||
> See also: `nix flake` for information about flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-run.html>.
|
||||
|
||||
- Run the default application in the flake in the current directory:
|
||||
|
||||
`nix run`
|
||||
|
||||
- Run a command whose name matches the package name from nixpkgs (if you want a different command from that package, see `tldr nix shell`):
|
||||
|
||||
`nix run nixpkgs#{{pkg}}`
|
||||
|
||||
- Run a command with provided arguments:
|
||||
|
||||
`nix run nixpkgs#{{vim}} -- {{path/to/file}}`
|
||||
|
||||
- Run from a remote repository:
|
||||
|
||||
`nix run {{remote_name}}:{{owner}}/{{repo}}`
|
||||
|
||||
- Run from a remote repository using a specific tag, revision or branch:
|
||||
|
||||
`nix run {{remote_name}}:{{owner}}/{{repo}}/{{reference}}`
|
||||
|
||||
- Run from a remote repository specifying a subdirectory and a program:
|
||||
|
||||
`nix run "{{remote_name}}:{{owner}}/{{repo}}?dir={{dir_name}}#{{app}}"`
|
||||
|
||||
- Run the flake of a GitHub pull request:
|
||||
|
||||
`nix run github:{{owner}}/{{repo}}/pull/{{number}}/head`
|
||||
22
tldr/nix-search
Normal file
22
tldr/nix-search
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix search
|
||||
|
||||
> Search for packages in a Nix flake.
|
||||
> See also: `nix flake` for information about flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-search.html>.
|
||||
|
||||
- Search `nixpkgs` for a package based on its name or description:
|
||||
|
||||
`nix search {{nixpkgs}} {{search_term}}`
|
||||
|
||||
- Show description of a package from nixpkgs:
|
||||
|
||||
`nix search {{nixpkgs#pkg}}`
|
||||
|
||||
- Show all packages available from a flake on github:
|
||||
|
||||
`nix search {{github:owner/repo}}`
|
||||
@@ -5,30 +5,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix-shell
|
||||
|
||||
> Start an interactive shell based on a Nix expression.
|
||||
> See also: `nix3 shell`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/nix-shell.html>.
|
||||
> `nix-shell` can refer to multiple commands with the same name.
|
||||
|
||||
- Start with nix expression in `shell.nix` or `default.nix` in the current directory:
|
||||
- View documentation for the traditional shell:
|
||||
|
||||
`nix-shell`
|
||||
`tldr nix-shell.2`
|
||||
|
||||
- Run shell command in non-interactive shell and exit:
|
||||
- View documentation for nix3 shell:
|
||||
|
||||
`nix-shell --run "{{command}} {{argument1 argument2 ...}}"`
|
||||
|
||||
- Start with expression in `default.nix` in the current directory:
|
||||
|
||||
`nix-shell {{default.nix}}`
|
||||
|
||||
- Start with packages loaded from nixpkgs:
|
||||
|
||||
`nix-shell {{[-p|--packages]}} {{package1 package2 ...}}`
|
||||
|
||||
- Start with packages loaded from specific nixpkgs revision:
|
||||
|
||||
`nix-shell {{[-p|--packages]}} {{package1 package2 ...}} {{[-I|--include]}} nixpkgs={{https://github.com/NixOS/nixpkgs/archive/nixpkgs_revision.tar.gz}}`
|
||||
|
||||
- Evaluate rest of file in specific interpreter, for use in `#!-scripts` (see <https://nixos.org/manual/nix/stable/#use-as-a-interpreter>):
|
||||
|
||||
`nix-shell -i {{interpreter}} {{[-p|--packages]}} {{package1 package2 ...}}`
|
||||
`tldr nix shell.3`
|
||||
|
||||
34
tldr/nix-shell.2
Normal file
34
tldr/nix-shell.2
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix-shell
|
||||
|
||||
> Start an interactive shell based on a Nix expression.
|
||||
> See also: `nix shell.3`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/nix-shell.html>.
|
||||
|
||||
- Start with nix expression in `shell.nix` or `default.nix` in the current directory:
|
||||
|
||||
`nix-shell`
|
||||
|
||||
- Run shell command in non-interactive shell and exit:
|
||||
|
||||
`nix-shell --run "{{command}} {{argument1 argument2 ...}}"`
|
||||
|
||||
- Start with expression in `default.nix` in the current directory:
|
||||
|
||||
`nix-shell {{default.nix}}`
|
||||
|
||||
- Start with packages loaded from nixpkgs:
|
||||
|
||||
`nix-shell {{[-p|--packages]}} {{package1 package2 ...}}`
|
||||
|
||||
- Start with packages loaded from specific nixpkgs revision:
|
||||
|
||||
`nix-shell {{[-p|--packages]}} {{package1 package2 ...}} {{[-I|--include]}} nixpkgs={{https://github.com/NixOS/nixpkgs/archive/nixpkgs_revision.tar.gz}}`
|
||||
|
||||
- Evaluate rest of file in specific interpreter, for use in `#!-scripts` (see <https://nixos.org/manual/nix/stable/#use-as-a-interpreter>):
|
||||
|
||||
`nix-shell -i {{interpreter}} {{[-p|--packages]}} {{package1 package2 ...}}`
|
||||
30
tldr/nix-shell.3
Normal file
30
tldr/nix-shell.3
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix shell
|
||||
|
||||
> Start a shell in which the specified packages are available.
|
||||
> See also: `nix-shell` for setting up development environments, `nix flake` for information about flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-shell.html>.
|
||||
|
||||
- Start an interactive shell with some packages from `nixpkgs`:
|
||||
|
||||
`nix shell {{nixpkgs#pkg1 nixpkgs#packageSet.pkg2 ...}}`
|
||||
|
||||
- Start a shell providing a package from an older version of `nixpkgs` (21.05):
|
||||
|
||||
`nix shell {{nixpkgs/nixos-21.05#pkg}}`
|
||||
|
||||
- Start a shell with the "default package" from a flake in the current directory, printing build logs if any builds happen:
|
||||
|
||||
`nix shell -L`
|
||||
|
||||
- Start a shell with a package from a flake on GitHub:
|
||||
|
||||
`nix shell {{github:owner/repo#pkg}}`
|
||||
|
||||
- Run a command in a shell with a package:
|
||||
|
||||
`nix shell {{nixpkgs#pkg}} -c {{some-cmd --someflag 'Some other arguments'}}`
|
||||
@@ -5,30 +5,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix-store
|
||||
|
||||
> Manipulate or query the Nix store.
|
||||
> See also: `nix3 store`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/nix-store.html>.
|
||||
> `nix-store` can refer to multiple commands with the same name.
|
||||
|
||||
- Collect garbage, such as removing unused paths:
|
||||
- View documentation for the traditional store:
|
||||
|
||||
`nix-store --gc`
|
||||
`tldr nix-store.2`
|
||||
|
||||
- Hard-link identical files together to reduce space usage:
|
||||
- View documentation for nix3 store:
|
||||
|
||||
`nix-store --optimise`
|
||||
|
||||
- Delete a specific store path (must be unused):
|
||||
|
||||
`nix-store --delete {{/nix/store/...}}`
|
||||
|
||||
- Show all dependencies of a store path (package), in a tree format:
|
||||
|
||||
`nix-store {{[-q|--query]}} --tree {{/nix/store/...}}`
|
||||
|
||||
- Calculate the total size of a certain store path with all the dependencies:
|
||||
|
||||
`du {{[-cLsh|--total --dereference --summarize --human-readable]}} $(nix-store {{[-q|--query]}} --references {{/nix/store/...}})`
|
||||
|
||||
- Show all dependents of a particular store path:
|
||||
|
||||
`nix-store {{[-q|--query]}} --referrers {{/nix/store/...}}`
|
||||
`tldr nix store.3`
|
||||
|
||||
34
tldr/nix-store.2
Normal file
34
tldr/nix-store.2
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix-store
|
||||
|
||||
> Manipulate or query the Nix store.
|
||||
> See also: `nix store.3`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/nix-store.html>.
|
||||
|
||||
- Collect garbage, such as removing unused paths:
|
||||
|
||||
`nix-store --gc`
|
||||
|
||||
- Hard-link identical files together to reduce space usage:
|
||||
|
||||
`nix-store --optimise`
|
||||
|
||||
- Delete a specific store path (must be unused):
|
||||
|
||||
`nix-store --delete {{/nix/store/...}}`
|
||||
|
||||
- Show all dependencies of a store path (package), in a tree format:
|
||||
|
||||
`nix-store {{[-q|--query]}} --tree {{/nix/store/...}}`
|
||||
|
||||
- Calculate the total size of a certain store path with all the dependencies:
|
||||
|
||||
`du {{[-cLsh|--total --dereference --summarize --human-readable]}} $(nix-store {{[-q|--query]}} --references {{/nix/store/...}})`
|
||||
|
||||
- Show all dependents of a particular store path:
|
||||
|
||||
`nix-store {{[-q|--query]}} --referrers {{/nix/store/...}}`
|
||||
30
tldr/nix-store.3
Normal file
30
tldr/nix-store.3
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix store
|
||||
|
||||
> Manipulate the Nix store.
|
||||
> See also: `nix-store`.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-store.html>.
|
||||
|
||||
- Collect garbage, i.e. remove unused paths to reduce space usage:
|
||||
|
||||
`nix store gc`
|
||||
|
||||
- Hard-link identical files together to reduce space usage:
|
||||
|
||||
`nix store optimise`
|
||||
|
||||
- Delete a specific store path (most be unused):
|
||||
|
||||
`nix store delete {{/nix/store/...}}`
|
||||
|
||||
- List a contents of the store path, on a remote store:
|
||||
|
||||
`nix store --store {{https://cache.nixos.org}} ls {{/nix/store/...}}`
|
||||
|
||||
- Show the differences in versions between two store paths, with their respective dependencies:
|
||||
|
||||
`nix store diff-closures {{/nix/store/...}} {{/nix/store/...}}`
|
||||
17
tldr/nix-why-depends
Normal file
17
tldr/nix-why-depends
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nix why-depends
|
||||
|
||||
> Show why a package depends on another package.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-why-depends.html>.
|
||||
|
||||
- Show why the currently running NixOS system requires a certain store path:
|
||||
|
||||
`nix why-depends {{/run/current-system}} {{/nix/store/...}}`
|
||||
|
||||
- Show why a package from nixpkgs requires another package as a _build-time_ dependency:
|
||||
|
||||
`nix why-depends --derivation {{nixpkgs#dependent}} {{nixpkgs#dependency}}`
|
||||
Reference in New Issue
Block a user