Skip to content

Releases: evanmschultz/rak

v0.2.0

Choose a tag to compare

@evanmschultz evanmschultz released this 18 May 22:09
4df838f

Highlights

  • 30+ new language detections — programming (C#, Scala, Lua, SQL, Dart, Elixir, Zig, R, F#, Haskell), templating + frontend (templ, JSX, TSX, SCSS, Sass, LESS, Vue, Svelte, ERB, Jinja, Liquid, Mustache/Handlebars), config (INI, dotenv, EditorConfig, Properties, HCL/Terraform, Nix), data (Protobuf, GraphQL, CSV, TSV, JSONL), build/task (Bazel, Groovy/Jenkinsfile, Justfile, Earthfile, Caddyfile). Plus XML split from HTML.
  • `--files-from ` for Unix-composition piping. Use `-` for stdin:
    ```sh
    rg --files | rak --files-from -
    git ls-files '.go' | rak --files-from -
    find . -name '
    .go' | rak --files-from -
    gh pr diff 42 --name-only | rak --files-from -
    ```
  • Lockfile exclusion by default. `go.sum`, `package-lock.json`, `Cargo.lock`, `Gemfile.lock`, etc. are skipped so counts reflect code your team wrote. Pass `--include-lockfiles` to restore v0.1.x counting behavior.
  • Friendly error for non-regular paths (`rak /dev/null` → clear message).
  • GoReleaser binaries for macOS + Linux (amd64 + arm64). Download below or `go install github.com/evanmschultz/rak/cmd/rak@v0.2.0`.

Breaking changes

  • `.xml` files now report as `xml` in `total_by_lang` (was `html`).
  • Lockfiles excluded by default. `--include-lockfiles` to restore v0.1.x behavior.

Bug fixes

  • Stable sort: tie-bearing repos previously produced non-deterministic output across runs due to map randomization + unstable sort. `SortDirs` now uses `slices.SortStableFunc`.
  • Explicit single-file lockfile invocation (`rak go.sum`) is now counted, not silently filtered.

Deferred to v0.3

Parallel walk + `--workers`, `--follow` symlink traversal (covered by `find -L | rak --files-from -` composition), token counting (`--tokens`), `--include-untracked`, Windows binaries + CI, spinner/progress.

Full changelog: v0.1.4...v0.2.0

v0.1.4

Choose a tag to compare

@evanmschultz evanmschultz released this 16 May 22:37
51d3de7

Bug fixes

  • rak <file> no longer crashes (#6). Previously, running rak against a single file crashed with Lister: detect: fork/exec git: not a directory because the lister set cmd.Dir to the file path before probing git. The lister now recognizes regular files and returns a dedicated SingleFileLister before any git operations. Output shape matches a directory walk with one file entry (label = user-supplied filename).
  • Symlinked walk-roots now work correctly (#6). rak <symlink> could previously emit zero results because filepath.Abs doesn't resolve symlinks but git rev-parse --show-toplevel does — the prefix mismatch silently filtered out every path. Detect now calls filepath.EvalSymlinks before any stat or git probe so the resolved real path drives both checks. The same fix lets symlinked single-files work end-to-end.

Maintenance

  • Six new tests in internal/lister and cmd/rak covering single files, symlinked files, symlinked directories, broken symlinks, and end-to-end single-file output.
  • runDirectoryOpts struct docstring reworded for accuracy.
  • README "Common invocations" gains a rak CLAUDE.md example.

Full changelog: v0.1.3...v0.1.4

v0.1.3

Choose a tag to compare

@evanmschultz evanmschultz released this 16 May 20:34
7ea6a23

Improvements

  • Path display normalization (#4). The walk-root path is now normalized via path.Clean and joined to subdir entries via path.Join. Two visible effects:
    • rak / and rak // no longer emit malformed paths.
    • rak . and rak ./internal render subdir paths without the redundant ./ prefix (e.g. internal/foo instead of ./internal/foo). If you parsed the prefix in scripts, update accordingly.
  • mage run accepts an env-var arg pattern (#4). RAK_ARGS="--version" mage run exits 0 cleanly. The -- separator still works for non-flag args; flag-prefixed args still hit mage's CLI exit-2 quirk with --, so RAK_ARGS is preferred for those.

Tests

  • Pinned --no-gitignore + bare-repo / inside-.git/ dispatch ordering with two new tests (TestDetect_BareRepo_WithDisableGitignore, TestDetect_InsideGitDir_WithDisableGitignore).

Full changelog: v0.1.2...v0.1.3

v0.1.2

Choose a tag to compare

@evanmschultz evanmschultz released this 16 May 18:17
5e98e03

Bug fixes

  • mage run -- <args> correctly forwards arguments to rak (#3). Previously the mage target name leaked through and cobra rejected the invocation with Accepts at most 1 arg(s).
  • Walk-root paths with trailing slashes no longer produce double-slash output (#3). rak ../ now emits ../sub instead of ..//sub.

Maintenance

  • Updated CONTRIBUTING.md with the mage run -- <args> dev workflow.

Full changelog: v0.1.1...v0.1.2

v0.1.1

Choose a tag to compare

@evanmschultz evanmschultz released this 16 May 06:22
8543044

Bug fixes

  • rak <bare-repo-dir> no longer crashes with "exit status 128" (#2). The lister now correctly falls back to the filesystem walker when the target directory is a bare git repository or a .git/ directory.

Maintenance

  • Bumped go.mod Go directive from 1.26.1 to 1.26.3.

Full changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@evanmschultz evanmschultz released this 16 May 05:41
7305418

What's Changed

New Contributors

Full Changelog: https://github.com/evanmschultz/rak/commits/v0.1.0