Skip to content

Commit 5baff7d

Browse files
committed
docs: Update CHANGELOG and README for v1.3.0
1 parent f08a0ea commit 5baff7d

3 files changed

Lines changed: 40 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.3.0] - 2025-08-28
9+
10+
### Added
11+
12+
- Added a `--limit` flag to the `run` and `results` commands to control the maximum number of results returned.
13+
- Added a `limit` field to the `config.json` file to allow setting a default result limit.
14+
15+
### Changed
16+
17+
- The default behavior for result fetching is now to return all results (`limit=0`) unless specified otherwise by the `--limit` flag or in the config file.
18+
19+
### Fixed
20+
21+
- Fixed a display issue where the "Waiting for job to complete..." message was not printed on a new line.
22+
823
## [1.2.1] - 2025-08-18
924

1025
### Fixed

README.ja.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ make build
4848
"token": "your-splunk-token-here",
4949
"app": "search",
5050
"insecure": true,
51-
"httpTimeout": "60s"
51+
"httpTimeout": "60s",
52+
"limit": 100
5253
}
5354
```
5455

@@ -78,8 +79,8 @@ make build
7879

7980
**使用例**:
8081
```bash
81-
# 過去1時間のデータを検索
82-
splunk-cli run --spl "index=_internal" --earliest "-1h"
82+
# 過去1時間のデータを10件に絞って検索
83+
splunk-cli run --spl "index=_internal" --earliest "-1h" --limit 10
8384

8485
# ファイルからSPLを読み込んで検索
8586
cat my_query.spl | splunk-cli run -f -
@@ -90,6 +91,7 @@ cat my_query.spl | splunk-cli run -f -
9091
- `--earliest <time>`: 検索の開始時刻。(-1h, @d, 1672531200など)
9192
- `--latest <time>`: 検索の終了時刻。(now, @d, 1672617600など)
9293
- `--timeout <duration>`: ジョブ全体のタイムアウト時間。(10m, 1h30mなど)
94+
- `--limit <int>`: 最大取得件数 (0を指定すると全件取得)。
9395
- `--silent`: 進捗メッセージを非表示にします。
9496

9597
> **💡 Ctrl+C の挙動**: `run`の実行中に `Ctrl+C` を押すと、ジョブをキャンセルするか、バックグラウンドで実行し続けるかを選択できます。
@@ -119,9 +121,13 @@ splunk-cli status --sid "$JOB_ID"
119121

120122
**使用例**:
121123
```bash
122-
splunk-cli results --sid "$JOB_ID" --silent | jq .
124+
# 指定したジョブの結果を50件まで取得
125+
splunk-cli results --sid "$JOB_ID" --limit 50 --silent | jq .
123126
```
124127

128+
- `--sid <string>`: ジョブの検索ID (SID)。
129+
- `--limit <int>`: 最大取得件数 (0を指定すると全件取得)。
130+
125131
### 共通フラグ
126132

127133
ほとんどのコマンドで利用できる共通フラグです。
@@ -132,6 +138,7 @@ splunk-cli results --sid "$JOB_ID" --silent | jq .
132138
- `--password <string>`: パスワード(指定しない場合はプロンプトで入力を求められます)。
133139
- `--app <string>`: 検索を実行するAppのコンテキスト。
134140
- `--owner <string>`: App内のナレッジオブジェクトの所有者。デフォルトは`nobody`
141+
- `--limit <int>`: 最大取得件数 (0を指定すると全件取得)。デフォルトは0(全件取得)です。
135142
- `--insecure`: TLS証明書の検証をスキップします。
136143
- `--http-timeout <duration>`: 個々のAPIリクエストのタイムアウト時間。(30s, 1mなど)
137144
- `--debug`: 詳細なデバッグ情報を表示します。
@@ -153,4 +160,4 @@ splunk-cli results --sid "$JOB_ID" --silent | jq .
153160

154161
---
155162

156-
*このツールは、Googleの大規模言語モデルであるGeminiとの対話を通じて初期構築および開発されました。*
163+
*このツールは、Googleの大規模言語モデルであるGeminiとの対話を通じて初期構築および開発されました。*

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ The most convenient way to use the tool is by creating a configuration file.
4848
"token": "your-splunk-token-here",
4949
"app": "search",
5050
"insecure": true,
51-
"httpTimeout": "60s"
51+
"httpTimeout": "60s",
52+
"limit": 100
5253
}
5354
```
5455

@@ -78,8 +79,8 @@ Starts a search, waits for it to complete, and displays the results.
7879

7980
**Examples**:
8081
```bash
81-
# Search data from the last hour
82-
splunk-cli run --spl "index=_internal" --earliest "-1h"
82+
# Search data from the last hour, limiting to 10 results
83+
splunk-cli run --spl "index=_internal" --earliest "-1h" --limit 10
8384

8485
# Read SPL from a file and execute
8586
cat my_query.spl | splunk-cli run -f -
@@ -90,6 +91,7 @@ cat my_query.spl | splunk-cli run -f -
9091
- `--earliest <time>`: The earliest time for the search (e.g., -1h, @d, 1672531200).
9192
- `--latest <time>`: The latest time for the search (e.g., now, @d, 1672617600).
9293
- `--timeout <duration>`: Total timeout for the job (e.g., 10m, 1h30m).
94+
- `--limit <int>`: Maximum number of results to return (0 for all).
9395
- `--silent`: Suppress progress messages.
9496

9597
> **💡 Ctrl+C Behavior**: When you press `Ctrl+C` during a `run` command, you can choose to either cancel the job or let it continue running in the background.
@@ -119,9 +121,13 @@ Fetches the results of a completed job. This is useful in combination with tools
119121

120122
**Example**:
121123
```bash
122-
splunk-cli results --sid "$JOB_ID" --silent | jq .
124+
# Fetch up to 50 results for a given job
125+
splunk-cli results --sid "$JOB_ID" --limit 50 --silent | jq .
123126
```
124127

128+
- `--sid <string>`: The Search ID (SID) of the job.
129+
- `--limit <int>`: Maximum number of results to return (0 for all).
130+
125131
### Common Flags
126132

127133
These flags are available for most commands:
@@ -132,6 +138,7 @@ These flags are available for most commands:
132138
- `--password <string>`: The password (will be prompted for if not provided).
133139
- `--app <string>`: The app context for the search.
134140
- `--owner <string>`: The owner of knowledge objects within the app (defaults to `nobody`).
141+
- `--limit <int>`: Maximum number of results to return (0 for all). The default is 0 (all results).
135142
- `--insecure`: Skip TLS certificate verification.
136143
- `--http-timeout <duration>`: Timeout for individual API requests (e.g., 30s, 1m).
137144
- `--debug`: Enable detailed debug logging.
@@ -143,8 +150,7 @@ This project uses a `Makefile` for common development tasks.
143150

144151
- `make build`: Build binaries for all target platforms (macOS, Linux, Windows).
145152
- `make test`: Run tests.
146-
- `make lint`: Run the linter (`golangci-lint`).
147-
- `make vulncheck`: Scan for known vulnerabilities (`govulncheck`).
153+
- `make lint`: Run the linter (`golangci-lint`).n- `make vulncheck`: Scan for known vulnerabilities (`govulncheck`).
148154
- `make clean`: Clean up build artifacts.
149155

150156
## License
@@ -153,4 +159,4 @@ This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) f
153159

154160
---
155161

156-
*This tool was bootstrapped and developed in collaboration with Gemini, a large language model from Google.*
162+
*This tool was bootstrapped and developed in collaboration with Gemini, a large language model from Google.*

0 commit comments

Comments
 (0)