splunk-cli 0.0.2__tar.gz → 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. splunk_cli-0.1.0/.dockerignore +9 -0
  2. splunk_cli-0.1.0/.github/actionlint.yaml +2 -0
  3. splunk_cli-0.1.0/.github/workflows/live.yml +33 -0
  4. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/.github/workflows/release.yml +4 -1
  5. splunk_cli-0.1.0/CHANGELOG.md +62 -0
  6. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/Cargo.lock +62 -1
  7. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/Cargo.toml +7 -2
  8. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/Makefile +9 -1
  9. splunk_cli-0.1.0/PKG-INFO +440 -0
  10. splunk_cli-0.1.0/README.md +419 -0
  11. splunk_cli-0.1.0/docs/compatibility.md +74 -0
  12. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/docs/releases.md +6 -1
  13. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/pyproject.toml +1 -1
  14. splunk_cli-0.1.0/scripts/test-live.sh +62 -0
  15. splunk_cli-0.1.0/src/auth.rs +1380 -0
  16. splunk_cli-0.1.0/src/browser.rs +2289 -0
  17. splunk_cli-0.1.0/src/cli.rs +498 -0
  18. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/src/client.rs +138 -14
  19. splunk_cli-0.1.0/src/config.rs +540 -0
  20. splunk_cli-0.1.0/src/continuation.rs +72 -0
  21. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/src/error.rs +6 -0
  22. splunk_cli-0.1.0/src/export.rs +332 -0
  23. splunk_cli-0.1.0/src/interrupt.rs +20 -0
  24. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/src/lib.rs +4 -0
  25. splunk_cli-0.1.0/src/main.rs +118 -0
  26. splunk_cli-0.1.0/src/output.rs +560 -0
  27. splunk_cli-0.1.0/src/schema.rs +312 -0
  28. splunk_cli-0.1.0/src/workflows.rs +749 -0
  29. splunk_cli-0.1.0/tests/cli.rs +2783 -0
  30. splunk_cli-0.1.0/tests/live/Dockerfile +15 -0
  31. splunk_cli-0.1.0/tests/live/README.md +68 -0
  32. splunk_cli-0.1.0/tests/live/check.py +473 -0
  33. splunk_cli-0.1.0/tests/live/entrypoint.sh +11 -0
  34. splunk_cli-0.0.2/CHANGELOG.md +0 -23
  35. splunk_cli-0.0.2/PKG-INFO +0 -263
  36. splunk_cli-0.0.2/README.md +0 -242
  37. splunk_cli-0.0.2/src/auth.rs +0 -566
  38. splunk_cli-0.0.2/src/cli.rs +0 -267
  39. splunk_cli-0.0.2/src/config.rs +0 -204
  40. splunk_cli-0.0.2/src/main.rs +0 -82
  41. splunk_cli-0.0.2/src/output.rs +0 -111
  42. splunk_cli-0.0.2/src/schema.rs +0 -206
  43. splunk_cli-0.0.2/src/workflows.rs +0 -368
  44. splunk_cli-0.0.2/tests/cli.rs +0 -676
  45. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/.github/workflows/ci.yml +0 -0
  46. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/.gitignore +0 -0
  47. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/LICENSE +0 -0
  48. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/prek.toml +0 -0
  49. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/schemas/clispec-v0.3.json +0 -0
  50. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/scripts/score-clispec.py +0 -0
  51. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/tests/conformance.rs +0 -0
  52. {splunk_cli-0.0.2 → splunk_cli-0.1.0}/vership.toml +0 -0
@@ -0,0 +1,9 @@
1
+ *
2
+ !Cargo.toml
3
+ !Cargo.lock
4
+ !src/
5
+ !src/**
6
+ !tests/
7
+ tests/*
8
+ !tests/live/
9
+ !tests/live/**
@@ -0,0 +1,2 @@
1
+ self-hosted-runner:
2
+ labels: [splunk-live]
@@ -0,0 +1,33 @@
1
+ name: Live Splunk compatibility
2
+ on:
3
+ schedule:
4
+ - cron: '17 4 * * 1'
5
+ workflow_dispatch:
6
+ workflow_call:
7
+ permissions:
8
+ contents: read
9
+ concurrency:
10
+ group: splunk-live-husker
11
+ cancel-in-progress: false
12
+ jobs:
13
+ live:
14
+ # Never execute PR or fork code on homelab infrastructure.
15
+ if: >-
16
+ github.repository == 'rvben/splunk-cli' &&
17
+ github.event_name != 'pull_request' &&
18
+ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
19
+ runs-on: [self-hosted, linux, x64, splunk-live]
20
+ timeout-minutes: 45
21
+ steps:
22
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
23
+ with:
24
+ fetch-depth: 0
25
+ persist-credentials: false
26
+ - name: Require integrated source
27
+ run: |
28
+ git fetch origin main
29
+ git merge-base --is-ancestor HEAD origin/main
30
+ - name: Run the pinned versions sequentially on the isolated Husker VM
31
+ env:
32
+ SPLUNK_ACCEPT_LICENSE: 'yes'
33
+ run: make test-live-matrix
@@ -14,6 +14,9 @@ concurrency:
14
14
  group: release-${{ github.ref }}
15
15
  cancel-in-progress: false
16
16
  jobs:
17
+ live:
18
+ name: Live compatibility gate
19
+ uses: ./.github/workflows/live.yml
17
20
  verify:
18
21
  name: Verify release
19
22
  runs-on: ubuntu-24.04
@@ -103,7 +106,7 @@ jobs:
103
106
  if-no-files-found: error
104
107
  publish-pypi:
105
108
  name: Publish to PyPI
106
- needs: [wheels, sdist]
109
+ needs: [wheels, sdist, live]
107
110
  if: ${{ github.ref_type == 'tag' && inputs.dry_run != true }}
108
111
  runs-on: ubuntu-24.04
109
112
  steps:
@@ -0,0 +1,62 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0](https://github.com/rvben/splunk-cli/compare/v0.0.3...v0.1.0) - 2026-11-04
10
+
11
+ ### Added
12
+
13
+ - Durable, page-bounded CSV/JSONL file exports with checkpoints, verified resume, and a single CSV header.
14
+ - Parse-only `search check` and credential-redacted `jobs logs` for investigation.
15
+ - Explicit `auth migrate`, deterministic saved-store selection, and unverified token-expiry diagnostics.
16
+ - Credential-preserving profile renaming and individual saved-setting resets.
17
+ - Command-specific help examples, actionable empty states, and display-truncation guidance.
18
+ - A documented 0.1.x compatibility policy for commands, JSON, errors, cursors, and checkpoints.
19
+ - Trusted weekly and release-gating live checks on isolated Husker infrastructure, with pinned Splunk versions and restricted-user coverage.
20
+
21
+ ### Fixed
22
+
23
+ - Bind new continuations to their server, namespace, and ordered field selection.
24
+ - Retry transient safe-read HTTP responses within a bounded budget; never replay dispatches.
25
+ - Clean up browser login on cancellation, including Windows CLI termination, enforce a full sign-in deadline, and keep browser debugging off HTTP proxies.
26
+ - Preserve streaming checkpoint recovery details on interruption and refuse incomplete finalized searches.
27
+ - Preserve logged-out state when stale credentials reappear, while allowing later cleanup.
28
+
29
+ ## [0.0.3](https://github.com/rvben/splunk-cli/compare/v0.0.2...v0.0.3) - 2026-11-04
30
+
31
+ ### Added
32
+
33
+ - Guided `init`, read-only `doctor`, and offline credential diagnostics.
34
+ - Persistent profile selection with `profile list`, `use`, and guarded `remove`.
35
+ - Aligned terminal tables, CSV and JSONL exports, and SPL files or piped stdin.
36
+ - Bounded `jobs wait` / `watch` and multi-page `jobs export` of an existing job.
37
+ - **auth**: add browser SSO login and opt-in file credential store ([0b31305](https://github.com/rvben/splunk-cli/commit/0b313053fc510696b90704c40c6ba825bdec6dff))
38
+
39
+ ### Fixed
40
+
41
+ - Surface sanitized, credential-redacted Splunk warnings even with `--quiet`.
42
+ - Exit quietly when a pipeline consumer closes stdout.
43
+ - Redact encoded Basic credentials in API diagnostics and explain permission failures.
44
+ - Preserve config symlinks, improve CA and usage errors, and handle interrupted output.
45
+ - Correct interactive-login documentation and expand command examples.
46
+ - Keep saved-login diagnostics and profile removal consistent across keyring and file stores.
47
+
48
+ ## [0.0.2](https://github.com/rvben/splunk-cli/compare/v0.0.1...v0.0.2) - 2026-11-03
49
+
50
+ ### Added
51
+
52
+ - **auth**: add interactive login with OS credential storage ([3c03442](https://github.com/rvben/splunk-cli/commit/3c03442c1430e39bb94e4c6f9e97113c99a50f34))
53
+
54
+ ## [0.0.1] - 2026-11-03
55
+
56
+ ### Added
57
+
58
+ - add clispec-compliant Splunk CLI and PyPI packaging
59
+
60
+ ### Fixed
61
+
62
+ - **ci**: install the v0.3 scorer from pinned source ([dc3d4ff](https://github.com/rvben/splunk-cli/commit/dc3d4ff2c42a27a0d0f3f4f9280203832805d717))
@@ -2277,6 +2277,17 @@ dependencies = [
2277
2277
  "serde",
2278
2278
  ]
2279
2279
 
2280
+ [[package]]
2281
+ name = "sha1"
2282
+ version = "0.11.0"
2283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2284
+ checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
2285
+ dependencies = [
2286
+ "cfg-if",
2287
+ "cpufeatures 0.3.1",
2288
+ "digest 0.11.3",
2289
+ ]
2290
+
2280
2291
  [[package]]
2281
2292
  name = "sha2"
2282
2293
  version = "0.10.9"
@@ -2355,11 +2366,13 @@ dependencies = [
2355
2366
 
2356
2367
  [[package]]
2357
2368
  name = "splunk-cli"
2358
- version = "0.0.2"
2369
+ version = "0.1.0"
2359
2370
  dependencies = [
2371
+ "base64 0.23.1",
2360
2372
  "clap",
2361
2373
  "clap_complete",
2362
2374
  "dirs",
2375
+ "futures-util",
2363
2376
  "jsonschema",
2364
2377
  "keyring",
2365
2378
  "reqwest",
@@ -2368,8 +2381,11 @@ dependencies = [
2368
2381
  "serde_json",
2369
2382
  "sha2 0.10.9",
2370
2383
  "tempfile",
2384
+ "terminal_size",
2371
2385
  "tokio",
2386
+ "tokio-tungstenite",
2372
2387
  "toml",
2388
+ "unicode-width",
2373
2389
  "wiremock",
2374
2390
  ]
2375
2391
 
@@ -2446,6 +2462,16 @@ dependencies = [
2446
2462
  "windows-sys 0.61.2",
2447
2463
  ]
2448
2464
 
2465
+ [[package]]
2466
+ name = "terminal_size"
2467
+ version = "0.4.4"
2468
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2469
+ checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874"
2470
+ dependencies = [
2471
+ "rustix",
2472
+ "windows-sys 0.61.2",
2473
+ ]
2474
+
2449
2475
  [[package]]
2450
2476
  name = "thiserror"
2451
2477
  version = "2.0.21"
@@ -2492,6 +2518,7 @@ dependencies = [
2492
2518
  "libc",
2493
2519
  "mio",
2494
2520
  "pin-project-lite",
2521
+ "signal-hook-registry",
2495
2522
  "socket2",
2496
2523
  "tokio-macros",
2497
2524
  "windows-sys 0.61.2",
@@ -2518,6 +2545,18 @@ dependencies = [
2518
2545
  "tokio",
2519
2546
  ]
2520
2547
 
2548
+ [[package]]
2549
+ name = "tokio-tungstenite"
2550
+ version = "0.30.0"
2551
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2552
+ checksum = "17a073bfed563fa236697a068031408a93cd9522e08abf9933ead3e73411bd71"
2553
+ dependencies = [
2554
+ "futures-util",
2555
+ "log",
2556
+ "tokio",
2557
+ "tungstenite",
2558
+ ]
2559
+
2521
2560
  [[package]]
2522
2561
  name = "tokio-util"
2523
2562
  version = "0.7.20"
@@ -2665,6 +2704,22 @@ version = "0.2.5"
2665
2704
  source = "registry+https://github.com/rust-lang/crates.io-index"
2666
2705
  checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
2667
2706
 
2707
+ [[package]]
2708
+ name = "tungstenite"
2709
+ version = "0.30.0"
2710
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2711
+ checksum = "e48ac77174b19c110a50ab2128b24215ac9cb40e0e12e093fb602d175c569d22"
2712
+ dependencies = [
2713
+ "bytes",
2714
+ "data-encoding",
2715
+ "http",
2716
+ "httparse",
2717
+ "log",
2718
+ "rand",
2719
+ "sha1",
2720
+ "thiserror",
2721
+ ]
2722
+
2668
2723
  [[package]]
2669
2724
  name = "typenum"
2670
2725
  version = "1.20.1"
@@ -2694,6 +2749,12 @@ version = "1.0.27"
2694
2749
  source = "registry+https://github.com/rust-lang/crates.io-index"
2695
2750
  checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
2696
2751
 
2752
+ [[package]]
2753
+ name = "unicode-width"
2754
+ version = "0.2.3"
2755
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2756
+ checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557"
2757
+
2697
2758
  [[package]]
2698
2759
  name = "untrusted"
2699
2760
  version = "0.9.0"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "splunk-cli"
3
- version = "0.0.2"
3
+ version = "0.1.0"
4
4
  edition = "2024"
5
5
  rust-version = "1.90"
6
6
  description = "Search and manage Splunk from the terminal with structured, agent-friendly output"
@@ -21,18 +21,23 @@ name = "splunk-cli"
21
21
  path = "src/main.rs"
22
22
 
23
23
  [dependencies]
24
+ base64 = "0.23"
24
25
  clap = { version = "4", features = ["derive", "env"] }
25
26
  clap_complete = "4"
26
27
  serde = { version = "1", features = ["derive"] }
27
28
  serde_json = "1"
28
29
  dirs = "7"
30
+ futures-util = "0.3"
29
31
  keyring = "4.2"
30
32
  rpassword = "7"
31
33
  sha2 = "0.10"
32
34
  reqwest = { version = "0.13", default-features = false, features = ["rustls", "json", "query", "form"] }
33
35
  tempfile = "3"
34
- tokio = { version = "1", features = ["macros", "rt-multi-thread", "time"] }
36
+ tokio = { version = "1", features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "time", "signal"] }
37
+ tokio-tungstenite = "0.30"
35
38
  toml = "1.1"
39
+ unicode-width = "0.2"
40
+ terminal_size = "0.4"
36
41
 
37
42
  [dev-dependencies]
38
43
  wiremock = "0.6"
@@ -1,4 +1,4 @@
1
- .PHONY: build release test lint fmt check conformance clean install release-patch release-minor release-major update-deps
1
+ .PHONY: build release test test-live test-live-matrix lint fmt check conformance clean install release-patch release-minor release-major update-deps
2
2
 
3
3
  build:
4
4
  cargo build
@@ -9,6 +9,14 @@ release:
9
9
  test:
10
10
  cargo test --locked
11
11
 
12
+ # Opt-in, native x86 Docker daemon; supports homelab contexts / DOCKER_HOST.
13
+ test-live:
14
+ bash scripts/test-live.sh
15
+
16
+ test-live-matrix:
17
+ SPLUNK_TEST_VERSION=10.6.1.1 bash scripts/test-live.sh
18
+ SPLUNK_TEST_VERSION=9.4.9 bash scripts/test-live.sh
19
+
12
20
  lint:
13
21
  cargo fmt -- --check
14
22
  cargo clippy --locked --all-targets -- -D warnings