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

View file

@ -272,6 +272,18 @@
jq -se 'map(select(.id == 2))[0].result.tools | length == 11' out.jsonl
touch "$out"
'';
# The website's generated pages match the CLI help and the MCP
# tools golden; regenerate with web/scripts/gen-*.sh.
web-generated = pkgs.runCommand "idx-web-generated"
{ nativeBuildInputs = with pkgs; [ bash coreutils diffutils gawk gnused jq ]; }
''
export HOME="$TMPDIR" XDG_CACHE_HOME="$TMPDIR/cache" XDG_CONFIG_HOME="$TMPDIR/config"
bash ${./web/scripts/gen-cli-reference.sh} ${idxPackage}/bin/idx > reference.md
diff -u ${./web/src/content/docs/cli/reference.md} reference.md
bash ${./web/scripts/gen-mcp-tools.sh} ${./crates/idx-mcp/tests/golden/tools.json} > tools.md
diff -u ${./web/src/content/docs/mcp/tools.md} tools.md
touch "$out"
'';
install-script-sh = installerCheck "sh";
install-script-dash = installerCheck "dash";
shellcheck = pkgs.runCommand "idx-shellcheck" {
@ -281,6 +293,7 @@
shellcheck ${installerSrc}/scripts/install-sh-test.sh
shellcheck ${./scripts/live-smoke.sh}
shellcheck ${./tests/agents/agent-smoke.sh}
shellcheck ${./web/scripts/gen-cli-reference.sh} ${./web/scripts/gen-mcp-tools.sh}
touch "$out"
'';
publisher-test = pkgs.runCommand "idx-publisher-test" {
@ -314,6 +327,11 @@
'';
});
# `nix develop .#web`: bun for the website in web/.
devShells.web = pkgs.mkShell {
packages = with pkgs; [ bun nodejs_22 jq ];
};
devShells.default = pkgs.mkShell {
inputsFrom = [ idxPackage ];
packages = with pkgs; [