Releases: nlink-jp/splunk-cli
Releases · nlink-jp/splunk-cli
v2.0.3
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
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-downMakefile targets.
Documentation
BUILD.mdrewritten with current build, test, and release instructions including integration test setup.README.mddevelopment section updated with current Makefile targets.
v2.0.1
Bug Fixes
- Resource leak in pagination:
resp.Bodywas deferred inside the results loop, preventing response bodies from being closed until the entireResults()call returned. ExtractedfetchResultsPage()helper to fix this. - Null results JSON: empty result sets marshalled as
{"results": null}instead of{"results": []}. Fixed withmake([]json.RawMessage, 0). - Double
GetJobStatuscall:runandresultscommands each calledGetJobStatus, andResults()called it again internally.Results()now acceptstotalResults intfrom the caller, eliminating the redundant API round-trip.
Lint
- All
golangci-lintwarnings resolved (errcheck, staticcheck ST1005, unused).
v2.0.0
Breaking Changes
- Config format changed: JSON → TOML. Rename
~/.config/splunk-cli/config.jsontoconfig.tomland update the format. See config.example.toml for the new structure. - Module path:
github.com/nlink-jp/splunk-cli(transferred frommagifd2/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
[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 0fetches all results and that--limitvalues greater than 50,000 are respected.
v1.3.0
v1.2.1
v1.2.0
[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
splunkpackage. - Command-line interface (CLI) logic has been separated into a new
cmdpackage, with each command in its own file. - The main application entrypoint (
splunk-cli.go) is now significantly simplified.
- Core Splunk API interaction logic has been extracted into a new
v1.1.0
v1.0.0
[1.0.0] - 2025-08-05
Added
- Initial Release of
splunk-cli. - Core functionalities:
run,start,status,resultscommands 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 (
--appflag). - 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 (
--versionflag). README.mdandLICENSE(MIT) for project documentation.CHANGELOG.mdto track project changes.- Japanese README (
README.ja.md).
Changed
- Switched build system from a shell script (
build.sh) to aMakefile.
Fixed
- N/A (Initial Release)