idx-cli/web/astro.config.mjs
hermes 74e5bb0536 feat: login-free Stockbit intraday and quote provider
Read Stockbit's public symbol page (__NEXT_DATA__) with a plain ureq
request and an honest user agent: `stocks intraday` (today by the
minute, any provider), `--provider stockbit` quotes with the best
bid/offer only while the market is open, and MCP `get_intraday`.

- UPSTREAMBLOCKED error (exit 4) for a CDN 403; never retried
- requests paced 1 s apart across idx processes, 5 s snapshot cache
- global --provider flag (yahoo, msn, stockbit)
- roadmap: L1 ships from Stockbit; depth stays a login follow-on
2026-10-23 04:58:32 +00:00

66 lines
2.1 KiB
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLlmsTxt from 'starlight-llms-txt';
export default defineConfig({
site: 'https://idx.rasyidanaf.com',
integrations: [
starlight({
title: 'idx',
description:
'Indonesian stock market (IDX) data and KSEI shareholder ownership, from the terminal or an AI agent through MCP.',
logo: { light: './src/assets/wordmark-light.svg', dark: './src/assets/wordmark-dark.svg', alt: 'idx', replacesTitle: true },
favicon: '/favicon.svg',
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/0xrsydn/idx-cli' }],
editLink: { baseUrl: 'https://github.com/0xrsydn/idx-cli/edit/main/web/' },
customCss: [
'@fontsource/ibm-plex-sans/400.css',
'@fontsource/ibm-plex-sans/600.css',
'@fontsource/jetbrains-mono/400.css',
'./src/styles/theme.css',
],
routeMiddleware: './src/routeData.ts',
components: {
PageTitle: './src/components/PageTitle.astro',
},
sidebar: [
{
label: 'Start',
items: ['start/install', 'start/quickstart', 'start/config'],
},
{
label: 'CLI',
items: ['cli/stocks', 'cli/stockbit', 'cli/ownership', 'cli/output', 'cli/reference'],
},
{
label: 'MCP server',
items: [
{ label: 'Overview', slug: 'mcp' },
'mcp/setup',
'mcp/tools',
],
},
{
label: 'For agents',
items: [
{ label: 'Using idx from an agent', slug: 'agents' },
'agents/install',
{ label: 'llms.txt', link: '/llms.txt' },
],
},
'about',
],
plugins: [
starlightLlmsTxt({
projectName: 'idx-cli',
details: [
'- `idx` is a CLI; `idx-mcp` is an MCP server over the same library. Both read the same config, cache and ownership database.',
'- Output is JSON whenever stdout is not a terminal. Errors are one JSON object on stderr; exit codes: 2 invalid input, 3 not found, 4 upstream unavailable, 5 unsupported, 1 other.',
'- Every page is also available as Markdown by appending `.md` to its path, for example `/agents/install.md`.',
].join('\n'),
}),
],
}),
],
});