feat(web): idx website and user docs (Astro Starlight)

Landing page plus docs for install, quickstart, config, the stocks and
ownership CLI, output and exit codes, the MCP server and per-agent setup,
agent usage, and an agent-led install page (agents/install.md) that a
coding agent follows from a one-line prompt.

- Every docs page is also served as Markdown at <path>.md; llms.txt and
  llms-full.txt come from starlight-llms-txt; a SKILL.md for skill-based
  harnesses is under /skills/idx/.
- The CLI reference and MCP tools pages are generated from idx --help and
  the tools golden; a new web-generated flake check fails when they drift.
- nix develop .#web provides bun; Cloudflare Pages builds web/ on pushes.
- Package homepage metadata points at https://idx.rasyidanaf.com.
- .cloudflare/ (the cf CLI's account cache) is git-ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hermes 2026-10-15 05:12:45 +00:00
commit e6805474f5
37 changed files with 3629 additions and 4 deletions

65
web/astro.config.mjs Normal file
View file

@ -0,0 +1,65 @@
// @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',
],
components: {
PageTitle: './src/components/PageTitle.astro',
},
sidebar: [
{
label: 'Start',
items: ['start/install', 'start/quickstart', 'start/config'],
},
{
label: 'CLI',
items: ['cli/stocks', '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'),
}),
],
}),
],
});