mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
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:
parent
e231061820
commit
e6805474f5
37 changed files with 3629 additions and 4 deletions
75
web/src/content/docs/start/config.md
Normal file
75
web/src/content/docs/start/config.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
---
|
||||
title: Configuration
|
||||
description: Config file, environment variables and their precedence.
|
||||
---
|
||||
|
||||
idx works without configuration. To change defaults, use the config file,
|
||||
environment variables or flags. When they disagree, the first one wins:
|
||||
|
||||
1. command-line flags
|
||||
2. environment variables
|
||||
3. the config file
|
||||
4. built-in defaults
|
||||
|
||||
## Config file
|
||||
|
||||
`~/.config/idx/config.toml` (or `$XDG_CONFIG_HOME/idx/config.toml`):
|
||||
|
||||
```bash
|
||||
idx config init # write the defaults below
|
||||
idx config set general.output json
|
||||
idx config get cache.quote_ttl
|
||||
idx config path
|
||||
```
|
||||
|
||||
```toml
|
||||
[general]
|
||||
provider = "msn" # msn | yahoo
|
||||
history_provider = "auto" # auto | yahoo | msn
|
||||
exchange = "JK"
|
||||
output = "auto" # auto | table | json | jsonl
|
||||
color = true
|
||||
|
||||
[cache]
|
||||
quote_ttl = 300 # seconds
|
||||
fundamental_ttl = 3600
|
||||
|
||||
[ownership]
|
||||
# db_path = "/path/to/ownership.db"
|
||||
# snapshot_manifest = "https://..."
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable | Overrides |
|
||||
| --- | --- |
|
||||
| `IDX_PROVIDER` | `general.provider` |
|
||||
| `IDX_HISTORY_PROVIDER` | `general.history_provider` |
|
||||
| `IDX_EXCHANGE` | `general.exchange` |
|
||||
| `IDX_OUTPUT` | `general.output` |
|
||||
| `IDX_NO_COLOR` | `general.color` (`1` or `true` disables colour) |
|
||||
| `IDX_CACHE_QUOTE_TTL` | `cache.quote_ttl` |
|
||||
| `IDX_CACHE_FUNDAMENTAL_TTL` | `cache.fundamental_ttl` |
|
||||
| `IDX_OWNERSHIP_SNAPSHOT_MANIFEST` | `ownership.snapshot_manifest` |
|
||||
| `IDX_CURL_IMPERSONATE_BIN` | path to a `curl_chrome*` binary |
|
||||
|
||||
## Files idx keeps
|
||||
|
||||
| What | Where |
|
||||
| --- | --- |
|
||||
| Config | `~/.config/idx/config.toml` |
|
||||
| Cache | `~/.cache/idx/` (`idx cache info`, `idx cache clear`) |
|
||||
| Ownership database | `~/.local/share/idx/ownership.db` |
|
||||
|
||||
The MCP server reads the same config, cache and database.
|
||||
|
||||
## Offline and caching
|
||||
|
||||
Quotes are cached for `quote_ttl` seconds and fundamentals for
|
||||
`fundamental_ttl`. `--offline` makes no network requests and serves cached
|
||||
data, even when stale; `--no-cache` always fetches.
|
||||
|
||||
:::note
|
||||
A config created by `idx config init` before v0.3 pins `output = "table"`.
|
||||
Run `idx config set general.output auto` to get JSON when piped.
|
||||
:::
|
||||
Loading…
Add table
Add a link
Reference in a new issue