Install
Cargo, Nix, release binaries, and the GitHub Action.
Manual contents
linecop is a Rust binary. Install it with cargo, run it from a Nix flake, download a release binary, or let the GitHub Action put it on a runner.
From cargo
cargo install linecop
linecop --versionThe crate needs Rust 1.90 or newer. cargo install builds from source and places the binary in ~/.cargo/bin.
With Nix
Run the current flake without installing it:
nix run github:mlavrinenko/linecopAdd the flake as an input when the repository already manages its tools with Nix:
linecop.url = "github:mlavrinenko/linecop";The flake builds linecop from source. Pass arguments after -- to scan a path:
nix run github:mlavrinenko/linecop -- . --top 10Release binaries
Each release publishes one bare binary and a checksum for every target. Download the pair from the releases page, verify the checksum, and put linecop on PATH.
| Target | Build runner | Release asset |
|---|---|---|
x86_64-unknown-linux-gnu | ubuntu-latest | linecop-x86_64-unknown-linux-gnu |
aarch64-unknown-linux-gnu | ubuntu-latest | linecop-aarch64-unknown-linux-gnu |
x86_64-apple-darwin | macos-latest | linecop-x86_64-apple-darwin |
aarch64-apple-darwin | macos-latest | linecop-aarch64-apple-darwin |
linecop supports Linux and macOS on x86_64 and aarch64. The GitHub Action installs the binary for the runner and verifies the checksum before it runs.
In a workflow
- uses: actions/checkout@v4
- uses: mlavrinenko/linecop@v0.9.1
with:
paths: src/
args: --top 10The action reads one path from paths, passes args through to linecop, and fails the step when the scan exits with code 1. The action page covers every input and output.
Check the install
Run the binary in a repository with a .linecop.yaml:
linecop --top 10Run it in a directory without a config:
linecop --no-config .--no-config uses the built-in limit of 500 lines for every file. linecop init writes a starter config with that limit and a schema comment.
The usage page has the command grammar, the options, and the exit codes. The configuration page has the config shape.