No description
  • Rust 92.9%
  • Shell 6.7%
  • Nix 0.4%
Find a file
0xrsydn 04eaa75882 fix: handle missing scrip column in April 2026 KSEI PDF
The April 2026 IDX ownership PDF omits the zero-valued scrip column for
some holders, causing the parser to leave holdings_scripless/scrip as
empty strings. This broke normalize_ksei_row which called parse_id_number
on empty input.

Two-layer fix:
- Parser: pop_numeric_tail handles 2-column (missing scrip) rows by
  defaulting scrip to "0"
- Normalizer: parse_id_number_or_zero backstop treats empty component
  share fields as 0 while still requiring total_shares

Also includes AGENTS.md refresh, formatting cleanup (rustfmt), and
version bump to 0.2.2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:15:19 +07:00
.github/workflows chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
docs chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
scripts chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
src fix: handle missing scrip column in April 2026 KSEI PDF 2026-04-06 19:15:19 +07:00
tests fix: handle missing scrip column in April 2026 KSEI PDF 2026-04-06 19:15:19 +07:00
.envrc dev: add flake.nix and .envrc for Rust dev environment 2026-03-05 16:23:49 +00:00
.gitignore chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
.pre-commit-config.yaml ci: convert prek.toml to .pre-commit-config.yaml (prek 0.3 compat) 2026-03-05 18:32:48 +00:00
AGENTS.md fix: handle missing scrip column in April 2026 KSEI PDF 2026-04-06 19:15:19 +07:00
Cargo.lock fix: handle missing scrip column in April 2026 KSEI PDF 2026-04-06 19:15:19 +07:00
Cargo.toml fix: handle missing scrip column in April 2026 KSEI PDF 2026-04-06 19:15:19 +07:00
CLAUDE.md docs: add AGENTS.md + CLAUDE.md symlink for agent-first development 2026-03-05 18:00:29 +00:00
FEATURE_SPEC.md chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
flake.lock feat: implement MVP foundation — quote, history, provider abstraction 2026-03-05 17:59:50 +00:00
flake.nix chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
LICENSE docs: add MIT license for 2026 contributors 2026-03-05 19:35:06 +00:00
README.md chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00
TODO.md chore: prepare v0.2.1 release 2026-04-06 17:47:20 +07:00

idx-cli

CLI tool for Indonesian stock market (IDX) analysis, built in Rust for humans and AI agents.

Installation

Cargo

cargo install idx-cli

This installs the idx binary. idx-cli currently requires Rust 1.85+.

If you use the Cargo install path directly, some commands also require helper tools at runtime:

  • Yahoo-authenticated flows require a curl_chrome* binary from curl-impersonate-chrome in PATH, or IDX_CURL_IMPERSONATE_BIN pointing at that binary.
  • Ownership PDF import requires mutool from MuPDF in PATH.

Install those helpers with your OS package manager, or use the Nix app/package below so they are wrapped automatically.

Nix

nix run github:0xrsydn/idx-cli -- version
nix profile install github:0xrsydn/idx-cli#default

The Nix app wraps idx with curl-impersonate and mupdf, so the Yahoo auth and ownership PDF helper tools are available automatically.

Quick start

idx stocks quote BBCA
idx stocks quote BBCA,BBRI,BMRI
idx -o json stocks quote BBCA
idx stocks history BBCA --period 3mo
idx config init
idx cache info
idx --offline stocks quote BBCA

Features

  • Provider abstraction (swap data sources behind one interface)
  • Local file cache with TTL
  • Offline mode with stale-cache fallback
  • Human table output and machine-friendly JSON output

Configuration

Config file location:

  • ~/.config/idx/config.toml

You can configure using:

  • Config file (idx config init, idx config set)
  • Environment variables
  • CLI flags

Precedence order:

  1. CLI flags
  2. Environment variables
  3. Config file
  4. Built-in defaults

Agent-friendly usage

  • Use idx --help and subcommand help for discoverability
  • Use -o json / --output json for structured output

Development

nix develop
cargo test

Prek hooks are configured for quality gates:

  • pre-commit: cargo fmt --check + cargo clippy -- -D warnings
  • pre-push: cargo test

License

MIT