slophammer

(★ 20)

(Work in progress) Boilerplate reference implementations and tooling for coding projects, across different languages

File Explorer

  • .gitignore
  • .pre-commit-hooks.yaml
  • action.yml
  • AGENTS.md
  • LICENSE
  • Makefile
  • README.md
  • slophammer.yml

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

cargo check

View Details ▼

Check a local package and all of its dependencies for errors.

cargo {{[c|check]}}

Check the current package:

cargo {{[c|check]}} --tests

Check all tests:

cargo {{[c|check]}} --test {{integration_test1}}

Check the integration tests in `tests/integration_test1.rs`:

🔍

cargo clippy

View Details ▼

A collection of lints to catch common mistakes and improve your Rust code.

cargo clippy

Run checks over the code in the current directory:

cargo clippy --locked

Require that `Cargo.lock` is up to date:

cargo clippy --workspace

Run checks on all packages in the workspace:

🔍

cargo fmt

View Details ▼

Run `rustfmt` on all source files in a Rust project.
See also: `rustfmt`.

cargo fmt

Format all source files:

cargo fmt --check

Check for formatting errors without writing to the files:

cargo fmt -- {{rustfmt_args}}

Pass arguments to each `rustfmt` call:

🔍

cargo install

View Details ▼

Build and install a Rust binary.

cargo install {{package}}@{{version}}

Install a package from <https://crates.io> (the version is optional - latest by default):

cargo install --git {{repo_url}}

Install a package from the specified Git repository:

cargo install --git {{repo_url}} --{{branch|tag|rev}} {{branch_name|tag|commit_hash}}

Build from the specified branch/tag/commit when installing from a Git repository:

🔍

cargo test

View Details ▼

Execute the unit and integration tests of a Rust package.

cargo {{[t|test]}} {{test_name}}

Only run tests containing a specific string in their names:

cargo {{[t|test]}} -- --test-threads {{count}}

Set the number of simultaneous running test cases:

cargo {{[t|test]}} {{[-r|--release]}}

Test artifacts in release mode, with optimizations:

🔍

go install

View Details ▼

Compile and install packages named by the import paths.

go install

Compile and install the current package:

go install {{path/to/package}}

Compile and install a specific local package:

go install {{golang.org/x/tools/gopls}}@{{latest}}

Install the latest version of a program, ignoring `go.mod` in the current directory:

🔍

go run

View Details ▼

Compile and run Go code without saving a binary.

go run {{path/to/file.go}}

Run a Go file:

go run {{path/to/package}}

Run a main Go package:

🔍

go test

View Details ▼

Test Go packages (files have to end with `_test.go`).
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.

go test

Test the package found in the current directory:

go test -v

[v]erbosely test the package in the current directory:

go test -v ./...

Test the packages in the current directory and all subdirectories:

🔍

go vet

View Details ▼

Check Go source code and report suspicious constructs (e.g. lint your Go source files).
Go vet returns a non-zero exit code if problems are found; returns a zero exit code if no problems are found.

go vet

Check the Go package in the current directory:

go vet {{path/to/file_or_directory}}

Check the Go package in the specified path:

go tool vet help

List available checks that can be run with go vet:

🔍

golangci-lint

View Details ▼

Parallelized, smart, and fast Go linters runner that integrates with all major IDEs and supports YAML configuration.

golangci-lint run

Run linters in the current folder:

golangci-lint linters

List enabled and disabled linters (Note: Disabled linters are shown last, do not mistake them for enabled ones):

golangci-lint run {{[-E|--enable]}} {{linter}}

Enable a specific linter for this run:

🔍

npm install

View Details ▼

Install Node packages.

npm {{[i|install]}}

Install dependencies listed in `package.json`:

npm {{[i|install]}} {{package_name}}@{{version}}

Download a specific version of a package and add it to the list of dependencies in `package.json`:

npm {{[i|install]}} {{package_name}} {{[-D|--save-dev]}}

Download the latest version of a package and add it to the list of dev dependencies in `package.json`:

🔍

npx

View Details ▼

This command is an alias of `npm exec`.

tldr npm exec

View documentation for the original command:

🔍

tsc

View Details ▼

TypeScript compiler.

tsc --init

Initialize a TypeScript project:

tsc {{path/to/file.ts}}

Compile a TypeScript file into a JavaScript file with the same name:

tsc {{[-t|--target]}} {{ES5|ES2015|ES2016|ES2017|ES2018|ESNEXT|...}} {{path/to/file.ts}}

Compile a TypeScript file into JavaScript using a specific target syntax (default is `ES3`):

🔍

uv tool

View Details ▼

Install and run commands provided by Python packages.

uv tool run {{command}}

Run a command from a package, without installing it:

uv tool install {{package}}

Install a Python package system-wide:

uv tool upgrade {{package}}

Upgrade an installed Python package:

🔍

uvx

View Details ▼

This command is an alias of `uv tool run`.

tldr uv tool

View documentation for the original command:

// repository documentation