Install

Cargo, Nix, release binaries, and the GitHub Action.

linecop v0.9.1 Manual

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 --version

The 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/linecop

Add 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 10

Release 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.

TargetBuild runnerRelease asset
x86_64-unknown-linux-gnuubuntu-latestlinecop-x86_64-unknown-linux-gnu
aarch64-unknown-linux-gnuubuntu-latestlinecop-aarch64-unknown-linux-gnu
x86_64-apple-darwinmacos-latestlinecop-x86_64-apple-darwin
aarch64-apple-darwinmacos-latestlinecop-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 10

The 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 10

Run 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.