No description
  • Rust 82.3%
  • Shell 11.5%
  • Astro 2%
  • Nix 1.3%
  • JavaScript 1.3%
  • Other 1.6%
Find a file
hermes b4dcfceef6 fix(cli): keep total-failure JSON errors parseable
Remove obsolete unsupported-import diagnostics and defer comparison warnings until partial success. Preserve per-symbol diagnostics and quiet behavior when results remain available.
2026-10-03 16:21:35 +00:00
.agents chore: warm orb local data during setup 2026-09-20 14:30:52 +00:00
.codex/skills/idx-release docs: add idx release skill 2026-04-13 14:39:40 +07:00
.github/workflows ci: run nix flake check with crane and a cached Nix store 2026-10-02 12:57:26 +00:00
contrib/systemd feat(ownership): idempotent, packaged snapshot publisher 2026-09-24 21:40:02 +00:00
docs fix(cli): keep total-failure JSON errors parseable 2026-10-03 16:21:35 +00:00
scripts fix(ownership): bound snapshot download by manifest size; clean refused builds 2026-09-25 22:31:40 +00:00
src fix(cli): keep total-failure JSON errors parseable 2026-10-03 16:21:35 +00:00
tests fix(cli): close small JSON-contract gaps for agent consumers 2026-10-02 12:28:16 +00:00
.envrc dev: add flake.nix and .envrc for Rust dev environment 2026-03-05 16:23:49 +00:00
.gitignore fix: complete screener candidates and clean Nix merge artifacts 2026-10-02 16:51:14 +00: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 feat(ownership): discover above-1% XLSX on the IDX data page 2026-09-24 21:09:05 +00:00
Cargo.lock chore: release 0.2.4 2026-09-25 22:36:08 +00:00
Cargo.toml chore: release 0.2.4 2026-09-25 22:36:08 +00: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 fix(ownership): verify snapshot assets before publishing manifests 2026-09-25 10:37:32 +00:00
flake.lock ci: run nix flake check with crane and a cached Nix store 2026-10-02 12:57:26 +00:00
flake.nix ci: run nix flake check with crane and a cached Nix store 2026-10-02 12:57:26 +00:00
install.sh fix: expand quoted ~ in install dir and trim trailing slashes on mirror URLs 2026-09-24 19:34:18 +00:00
LICENSE docs: add MIT license for 2026 contributors 2026-03-05 19:35:06 +00:00
package.json chore: release 0.2.4 2026-09-25 22:36:08 +00:00
README.md docs: scope curl-impersonate profiles; fix screen wording 2026-09-25 23:52:51 +00:00
TODO.md fix: complete screener candidates and clean Nix merge artifacts 2026-10-02 16:51:14 +00:00

idx-cli

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

Installation

Install script (Linux, macOS)

curl -fsSL https://raw.githubusercontent.com/0xrsydn/idx-cli/main/install.sh | sh

Downloads the prebuilt idx binary for your platform from GitHub Releases, verifies it against the release SHA256SUMS, and installs it into ~/.local/bin without sudo. Pin a version or change the directory with sh -s -- --version v0.2.4 --dir ~/bin. See docs/INSTALL.md.

npm / npx

npx idx-cli --help          # run without installing
npm install --global idx-cli

The npm package downloads the same checksum-verified release binary during postinstall. pnpm 10+ and bun skip install scripts by default; allow them with pnpm add --global --allow-build=idx-cli idx-cli or bun add --global --trust idx-cli. See docs/NPM_DISTRIBUTION.md.

Prebuilt binaries cover Linux x64/arm64 (static musl) and macOS arm64/x64. On Windows, use WSL.

Nix

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

The Nix package wraps idx with curl-impersonate and mupdf, so every helper tool below is available automatically.

Cargo

cargo install idx-cli

Builds from source; requires Rust 1.85+.

Runtime helper tools

The install script, npm, and Cargo installs ship only the idx binary. A few commands call external tools:

Tool Needed for
curl_chrome* from curl-impersonate (ownership also tries its Firefox and Safari profiles), or IDX_CURL_IMPERSONATE_BIN ownership discover / import --url from IDX (behind Cloudflare), and Yahoo fundamentals when IDX_PROVIDER=yahoo
mutool from MuPDF importing legacy PDF ownership reports only

Everyday use (stocks with the default MSN provider, including history, ownership sync, and every local ownership query) needs neither.

Quick start

# Stocks
idx stocks quote BBCA
idx stocks quote BBCA,BBRI,BMRI
idx stocks history BBCA --period 3mo
idx stocks technical BBCA
idx stocks fundamental BBCA
idx stocks compare BBCA BBRI BMRI
idx -o json stocks quote BBCA

# Ownership: download the maintained snapshot once, then query locally
idx ownership sync
idx ownership ticker BBCA
idx ownership entity "ANTHONI SALIM"
idx ownership search salim
idx ownership changes --from 2026-07-31 --to 2026-08-31

Features

Stocks

  • Quotes, OHLC history, company profile, financial statements, earnings, news, crowd sentiment, and AI insights
  • Analysis: technical, growth, valuation, risk, and a combined fundamental report; multi-symbol compare; MSN stock screen
  • Providers: MSN is the default for quotes, fundamentals, and screening; Yahoo serves history. Switch with IDX_PROVIDER=msn|yahoo and IDX_HISTORY_PROVIDER=auto|yahoo|msn
  • Local file cache with TTL, and --offline mode with stale-cache fallback

Ownership (KSEI shareholders above 1%)

  • Source: the monthly KSEI holder register ("Pemegang Saham di Atas 1%") published by IDX. Since June 2026 it is an XLSX file on IDX's Data Kepemilikan Saham page; earlier months were PDF announcements
  • ownership sync installs a maintained SQLite snapshot (checked daily, currently the latest three months), after which every query runs offline
  • Queries: holders per ticker, holdings per entity, entity search, month-over-month changes, concentration, cross-holders, and an ownership graph
  • Self-serve ingest: ownership discover finds the latest reports, and ownership import --url <xlsx-or-pdf> / --file loads them into your local database. See docs/OWNERSHIP_SYNC.md

Output

  • Human-readable tables on stdout, JSON with -o json, errors on stderr

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
  • idx completions <shell> generates shell completions

Documentation

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

Script test suites (no live network): scripts/install-sh-test.sh, scripts/publish-ownership-snapshot-test.sh, and scripts/npm-smoke.sh.

License

MIT