Skip to content

Releases: nlink-jp/splunk-cli

v2.0.3

31 Mar 05:56

Choose a tag to compare

Fixed

  • Skip config file permission check on Windows/NTFS — NTFS always reports mode 0666 regardless of ACL settings, causing a spurious warning on every command (#1)
  • Document NTFS ACL-based alternative (icacls) for securing config files on Windows
  • Environment variables (SPLUNK_TOKEN, etc.) remain the recommended approach on Windows

v2.0.2

27 Mar 14:35

Choose a tag to compare

Added

  • Integration tests against a live Splunk instance (//go:build integration).
    Covers: full search lifecycle, limit, empty results, cancel, invalid SPL, and search-prefix behaviour.
  • scripts/splunk-up.sh / scripts/splunk-down.sh: start and stop a Splunk container via Podman for local integration testing.
  • make integration-test / make splunk-up / make splunk-down Makefile targets.

Documentation

  • BUILD.md rewritten with current build, test, and release instructions including integration test setup.
  • README.md development section updated with current Makefile targets.

v2.0.1

27 Mar 14:18

Choose a tag to compare

Bug Fixes

  • Resource leak in pagination: resp.Body was deferred inside the results loop, preventing response bodies from being closed until the entire Results() call returned. Extracted fetchResultsPage() helper to fix this.
  • Null results JSON: empty result sets marshalled as {"results": null} instead of {"results": []}. Fixed with make([]json.RawMessage, 0).
  • Double GetJobStatus call: run and results commands each called GetJobStatus, and Results() called it again internally. Results() now accepts totalResults int from the caller, eliminating the redundant API round-trip.

Lint

  • All golangci-lint warnings resolved (errcheck, staticcheck ST1005, unused).

v2.0.0

27 Mar 13:01

Choose a tag to compare

Breaking Changes

  • Config format changed: JSON → TOML. Rename ~/.config/splunk-cli/config.json to config.toml and update the format. See config.example.toml for the new structure.
  • Module path: github.com/nlink-jp/splunk-cli (transferred from magifd2/splunk-cli).

What's New

  • CLI framework migrated to Cobra
  • Config file permission check (warns if group/world-readable)
  • Warning when sending token over unencrypted HTTP
  • Unit tests for config loading and API client
  • Makefile aligned with cli-series conventions

Commands and flags are unchanged: run, start, status, results.

See CHANGELOG.md for full details.

v1.4.0

28 Aug 02:21

Choose a tag to compare

[1.4.0] - 2025-08-28

Changed

  • Implemented pagination for result fetching to correctly handle large result sets that exceed the API's single-request limit. This ensures that --limit 0 fetches all results and that --limit values greater than 50,000 are respected.

v1.3.0

28 Aug 01:48

Choose a tag to compare

[1.3.0] - 2025-08-28

Added

  • Added a --limit flag to the run and results commands to control the maximum number of results returned.
  • Added a limit field to the config.json file to allow setting a default result limit.

v1.2.1

17 Aug 23:39

Choose a tag to compare

[1.2.1] - 2025-08-18

Fixed

  • Fixed an issue where the version information was not correctly embedded in the binary during the make build process. The build script now correctly links the Git tag, commit hash, and build date.

v1.2.0

14 Aug 03:02

Choose a tag to compare

[1.2.0] - 2025-08-14

Changed

  • Major Refactoring: The entire codebase has been refactored for better modularity, testability, and maintainability.
    • Core Splunk API interaction logic has been extracted into a new splunk package.
    • Command-line interface (CLI) logic has been separated into a new cmd package, with each command in its own file.
    • The main application entrypoint (splunk-cli.go) is now significantly simplified.

v1.1.0

12 Aug 14:19

Choose a tag to compare

[1.1.0] - 2025-08-12

Added

  • Added a global --config flag to specify a custom configuration file path, overriding the default ~/.config/splunk-cli/config.json.

v1.0.0

05 Aug 12:33

Choose a tag to compare

[1.0.0] - 2025-08-05

Added

  • Initial Release of splunk-cli.
  • Core functionalities: run, start, status, results commands to interact with Splunk's REST API.
  • Flexible authentication via config file, environment variables, or command-line flags.
  • Support for reading SPL queries from files or standard input.
  • Asynchronous job handling with job cancellation support (Ctrl+C).
  • App context support for searches (--app flag).
  • Makefile for simplified building, testing, linting, and vulnerability scanning.
  • Cross-platform build support for macOS (Universal), Linux (amd64), and Windows (amd64).
  • Version information embedded in the binary (--version flag).
  • README.md and LICENSE (MIT) for project documentation.
  • CHANGELOG.md to track project changes.
  • Japanese README (README.ja.md).

Changed

  • Switched build system from a shell script (build.sh) to a Makefile.

Fixed

  • N/A (Initial Release)