diff --git a/README.md b/README.md index d07b517..662dd09 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,72 @@ -
+ + + Kandle: free, open source charts in your browser that your AI agent can read and draw on + -Kandle - -# Kandle - -**Free, open-source charts for crypto, stocks and forex, and your AI agent can drive them.**
-Indicators, drawing tools, your own scripts and strategy backtests, alerts, bar replay and up to four charts on screen. It runs in your browser and keeps everything on your machine. - -[![Web app](https://img.shields.io/badge/web_app-live-22ab94?style=for-the-badge&logo=googlechrome&logoColor=white&labelColor=0d1117)](https://kernel-hunter.github.io/kandle/) -[![kandle-mcp](https://img.shields.io/github/v/release/Kernel-Hunter/kandle?style=for-the-badge&label=kandle-mcp&logo=modelcontextprotocol&logoColor=white&labelColor=0d1117&color=22ab94)](https://github.com/Kernel-Hunter/kandle/releases/latest) -[![Stars](https://img.shields.io/github/stars/Kernel-Hunter/kandle?style=for-the-badge&logo=github&logoColor=white&labelColor=0d1117&color=22ab94)](https://github.com/Kernel-Hunter/kandle/stargazers) -[![License](https://img.shields.io/badge/license-MIT-22ab94?style=for-the-badge&labelColor=0d1117)](LICENSE) -[![CI](https://img.shields.io/github/actions/workflow/status/Kernel-Hunter/kandle/ci.yml?branch=main&style=for-the-badge&label=CI&logo=githubactions&logoColor=white&labelColor=0d1117)](https://github.com/Kernel-Hunter/kandle/actions/workflows/ci.yml) -[![No account](https://img.shields.io/badge/no_account-22ab94?style=for-the-badge&labelColor=0d1117)](https://kernel-hunter.github.io/kandle/) - -[Open the app](https://kernel-hunter.github.io/kandle/)  ·  -[Docs](#scripts)  ·  -[Connect your agent](#use-it-with-your-ai-agent)  ·  -[Report a bug](https://github.com/Kernel-Hunter/kandle/issues/new/choose) - -[English](README.md) · [简体中文](README.zh-CN.md) - -
+

+ Open the app · + Connect your agent · + Script docs · + Releases · + 简体中文 +

-Kandle with support and resistance levels, a support zone, an EMA cross script and RSI on BTC/USDT 4H +

+ License + Latest release +

-
+**Kandle** is a free, open source charting app for crypto, stocks and forex that runs in your browser. You don't need an account, and Kandle has no server of its own: market data goes from each provider straight to your browser, and your charts, scripts and API keys stay in local storage. It also ships an MCP server, so Claude Code, Codex, Cursor or Gemini CLI can read the chart, draw levels, add indicators and run scripts while you watch. -
+

+ An agent reads BTC/USDT, marks resistance and a support zone, adds RSI and runs an EMA cross script +

-Many charting sites put indicators, alerts and backtests behind an account and a monthly plan. Kandle gives you all of them for free, with no account, no paywall and no limit on indicators. It has no server: market data goes from each provider's API straight to your browser, and your charts, scripts and API keys stay in local storage. It also ships an MCP server, so Claude Code, Codex, Cursor or Gemini CLI can read the chart, draw support and resistance, add indicators, write scripts and set alerts while you watch. +

An agent connected over MCP marks resistance and a support zone, adds RSI and runs an EMA cross script.

## Get started -Open **[kernel-hunter.github.io/kandle](https://kernel-hunter.github.io/kandle/)**. Nothing to install, and live crypto data from five exchanges works without a key. Type any letter to search for a symbol, press `/` for indicators and `Alt+S` for the script editor. +Open **[kernel-hunter.github.io/kandle](https://kernel-hunter.github.io/kandle/)**. There is nothing to install, and live crypto data from five exchanges works without a key. Type any letter to search for a symbol, press `/` for indicators and `Alt+S` for the script editor. To run your own copy, see [Run it locally](#run-it-locally). ## Use it with your AI agent -Kandle ships an MCP server, `kandle-mcp`. Your agent starts it, and the Kandle tab in your browser connects to it over a WebSocket on `127.0.0.1`. The agent can then read the chart and change it while you watch. +Kandle ships an MCP server, `kandle-mcp`. Your agent starts it, and the Kandle tab in your browser connects to it over a WebSocket on `127.0.0.1`. You need Node.js 22.12 or newer. + +For Claude Code: ```sh -claude mcp add kandle -- npx -y --package=https://github.com/Kernel-Hunter/kandle/releases/download/v0.10.1/kandle-mcp-0.10.1.tgz kandle-mcp +claude mcp add kandle -- npx -y \ + --package=https://github.com/Kernel-Hunter/kandle/releases/download/v0.10.1/kandle-mcp-0.10.1.tgz \ + kandle-mcp ``` -Then open Kandle, click **Agent**, paste the pairing code your agent gives you and turn on **Agent bridge**. Ask it something like "mark the last swing high and low on BTC and draw a Fibonacci retracement between them". Setup for Codex, Cursor, Gemini CLI and Claude Desktop is [below](#set-up). - -

- An agent reads BTC/USDT, marks resistance and a support zone, adds RSI and runs an EMA cross script -

+Other agents are below. Then ask something like "mark the last swing high and low on BTC and draw a Fibonacci retracement between them". ### Set up -1. Add the server to your agent (the snippets are below). -2. Ask the agent for the Kandle pairing code. It calls `get_bridge_status` and shows a code like `K7QD-9MXR-2HPA`. The code is also saved in `~/.kandle/bridge-token`. -3. In Kandle, click **Agent** in the top bar, paste the code, and turn on **Agent bridge**. The dot on the button turns green when the agent is connected. +1. Add the server to your agent (the command above, or a snippet below). +2. Ask the agent for the Kandle pairing code. It calls `get_bridge_status` and shows a code like `K7QD-9MXR-2HPA`. +3. In Kandle, click **Agent** in the top bar, paste the code and turn on **Agent bridge**. The dot on the button turns green when the agent is connected. + +The code is saved in your browser and in `~/.kandle/bridge-token`, so you only pair once. This works with the [hosted app](https://kernel-hunter.github.io/kandle/) and with a copy you run yourself. With the hosted app, your browser may ask whether the page can reach devices on your local network; allow it so the page can talk to `kandle-mcp` on `127.0.0.1`. + +
+Claude Desktop -The code is saved in your browser and in `~/.kandle/bridge-token`, so you only pair once. +
-This works with the [hosted app](https://kernel-hunter.github.io/kandle/) and with a copy you run yourself. With the hosted app, your browser may ask whether the page can reach devices on your local network; allow it so the page can talk to `kandle-mcp` on `127.0.0.1`. +Download [kandle-mcp-0.10.1.mcpb](https://github.com/Kernel-Hunter/kandle/releases/download/v0.10.1/kandle-mcp-0.10.1.mcpb) and open it to install the server. -`npx` runs `kandle-mcp` from a GitHub release, so you only need Node.js 22.12 or newer. When a new version of Kandle comes out, change the version in the URL; `get_bridge_status` tells your agent when the app is newer than its server. To run it from a clone instead, use `pnpm install && pnpm build` and point your agent at `node /path/to/kandle/packages/mcp/bin/kandle-mcp.js`. +
-Codex, Cursor, Gemini CLI and Claude Desktop +Codex
-Codex (`~/.codex/config.toml`): +In `~/.codex/config.toml`: ```toml [mcp_servers.kandle] @@ -76,7 +74,14 @@ command = "npx" args = ["-y", "--package=https://github.com/Kernel-Hunter/kandle/releases/download/v0.10.1/kandle-mcp-0.10.1.tgz", "kandle-mcp"] ``` -Cursor (`~/.cursor/mcp.json` or `.cursor/mcp.json` in a project) and Gemini CLI (`~/.gemini/settings.json`): +
+ +
+Cursor and Gemini CLI + +
+ +In `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project) for Cursor, and `~/.gemini/settings.json` for Gemini CLI: ```json { @@ -89,9 +94,18 @@ Cursor (`~/.cursor/mcp.json` or `.cursor/mcp.json` in a project) and Gemini CLI } ``` -Claude Desktop: download [kandle-mcp-0.10.1.mcpb](https://github.com/Kernel-Hunter/kandle/releases/download/v0.10.1/kandle-mcp-0.10.1.mcpb) and open it to install the server. +
+ +
+Other clients, updates and running from a clone + +
+ +Kandle is listed in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.Kernel-Hunter/kandle`, so clients that browse the registry can find it. -Kandle is also listed in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.Kernel-Hunter/kandle`, so clients that browse the registry can find it. +`npx` runs `kandle-mcp` from a GitHub release. When a new version of Kandle comes out, change the version in the URL; `get_bridge_status` tells your agent when the app is newer than its server. + +To run it from a clone instead, use `pnpm install && pnpm build` and point your agent at `node /path/to/kandle/packages/mcp/bin/kandle-mcp.js`.
@@ -125,10 +139,6 @@ Most tools take an optional `pane` (1 to 4) when several charts are showing. Tim [`skills/kandle/SKILL.md`](skills/kandle/SKILL.md) is an agent skill with chart analysis workflows: support and resistance, trend, indicator confluence, and annotating a chart with an explanation. Copy it into your agent's skills folder (for Claude Code, `~/.claude/skills/kandle/`). -

- An agent marked up BTC/USDT with the 120-bar high and low, a Fibonacci retracement and a note -

- ### Security model The bridge is off until you turn it on, only listens on `127.0.0.1`, and needs the pairing code on every connection. @@ -154,47 +164,42 @@ Settings: `--port` or `KANDLE_PORT` (default 7457, change the port in the Agent ## Features - - - - - - - - - - - - - - - - - - - - - -
Live crypto, no key
Binance, Coinbase, Bybit, OKX and Kraken. History over REST, updates over websockets.
Stocks, ETFs and forex
Twelve Data, Alpaca or Polygon with your own free API key. Data sources
Your own CSV data
Import OHLCV files. They are read and kept in your browser. CSV import
36 indicators
As many on the chart as you like, every parameter editable. Includes Ichimoku Cloud and a volume profile.
Drawing tools
Trend lines, rays, channels, rectangles, Fibonacci retracement, price ranges, notes, with an optional magnet.
Kandle Script
Write your own indicators in an editor under the chart, with 15 examples and request.security. Scripts
Strategy backtests
Trades on the chart, net profit, drawdown, win rate, an equity curve and every trade. Strategies
Alerts
On price levels, drawn lines and indicator values, with browser notifications. Alerts
Bar replay
Hide every bar after a point you pick, then step forward one candle at a time. Bar replay
Up to 4 charts
Each with its own symbol, timeframe and indicators, with optional sync. Layouts
Share links and embeds
The link carries the chart itself, and an iframe puts a live chart on any page. Share
Agent bridge
An MCP server so agents can read the chart, draw, set alerts and take screenshots. Agents
- - - - - - - - - - - - - - - - - - -
The script editor with an RSI script, and Supertrend and Bollinger Bands scripts on the chartA Donchian breakout strategy on BTC/USDT with its trades on the chart and the Strategy tab open
Scripts: write an indicator, press Ctrl+EnterBacktests: trades on the chart and the Strategy tab
BTC/USDT 4H with the Ichimoku Cloud and a volume profile of the visible barsThe Data sources dialog over an OKX chart
Ichimoku and volume profile of the visible barsData sources: keys stay in your browser
+- **Live crypto with no key.** Binance, Coinbase, Bybit, OKX and Kraken, with history over REST and updates over websockets. +- **Stocks, ETFs and forex.** Twelve Data, Alpaca or Polygon with your own free API key, or your own [CSV files](#csv-import). +- **36 indicators and the usual drawing tools.** Ichimoku Cloud, a volume profile, trend lines, channels, Fibonacci retracement, price ranges and notes. +- **Your own scripts.** Write indicators in Kandle Script in an editor under the chart, with 15 examples and `request.security`. See [Scripts](#scripts). +- **Strategy backtests.** Trades on the chart, net profit, drawdown, win rate, an equity curve and every trade. See [Strategies](#strategies-and-backtesting). +- **Alerts, bar replay and up to 4 charts.** See [Alerts](#alerts), [Bar replay](#bar-replay) and [Layouts](#layouts). +- **Share links and embeds.** The link carries the chart itself, and an iframe puts a live chart on any page. See [Share a chart](#share-a-chart). +- **An agent bridge.** 26 MCP tools to read the chart, draw, set alerts, run scripts and take screenshots. See [above](#use-it-with-your-ai-agent). + +### Let an agent mark up the chart + +Ask for levels and the agent draws them on your chart: here the 120-bar high and a Fibonacci retracement from it down to the 120-bar low. + +An agent marked up BTC/USDT with the 120-bar high and low, a Fibonacci retracement and a note + +### Write an indicator, press Ctrl+Enter + +The script editor with an RSI script, and Supertrend and Bollinger Bands scripts on the chart + +### Backtest a strategy + +Fills show as arrows on the chart, and the **Strategy** tab has the numbers and the list of trades. + +A Donchian breakout strategy on BTC/USDT with its trades on the chart and the Strategy tab open + +### Ichimoku and a volume profile + +The volume profile covers the bars on screen and updates as you scroll and zoom. + +BTC/USDT 4H with the Ichimoku Cloud and a volume profile of the visible bars + +### Pick a data source + +Keys stay in your browser and only go to that provider's API. + +The Data sources dialog over an OKX chart
The full feature list @@ -741,17 +746,4 @@ MIT. See [LICENSE](LICENSE). Charts are drawn with [KLineChart](https://github.com/klinecharts/KLineChart), licensed under Apache-2.0. The script editor uses [CodeMirror](https://codemirror.net), licensed under MIT. Their notices are in `public/third-party-notices.txt`. -## Star history - - - - - - Star history chart for Kandle - - - -
-
-Built by Karim Masmoudi. If Kandle is useful to you, a star helps other people find it. -
+Built by [Karim Masmoudi](https://github.com/Kernel-Hunter). If Kandle is useful to you, a star helps other people find it. diff --git a/README.zh-CN.md b/README.zh-CN.md index a578d40..522abc3 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,4 +1,20 @@ -# Kandle + + + Kandle:免费、开源的浏览器图表工具,你的 AI 助手可以直接读取和画线 + + +

+ 打开应用 · + 连接 AI 助手 · + 脚本说明 · + 版本发布 · + English +

+ +

+ License + Latest release +

**免费、开源的加密货币、股票和外汇图表工具,并且可以让你的 AI 助手直接操作。** @@ -6,11 +22,9 @@ Claude Code、Codex、Cursor 或 Gemini CLI 可以读取图表、画出支撑位和阻力位、添加指标、编写脚本、设置提醒,你可以在旁边实时看到每一步。 -**[在浏览器中打开 Kandle](https://kernel-hunter.github.io/kandle/)** · [连接 AI 助手](#连接-ai-助手) · [编写脚本](#脚本) - -[English](README.md) · [简体中文](README.zh-CN.md) - -![Kandle 在 BTC/USDT 4 小时图上显示阻力位、支撑区、EMA 交叉脚本和 RSI](docs/hero.png) +

+ AI 助手读取 BTC/USDT,标出阻力位和支撑区,添加 RSI 并运行 EMA 交叉脚本 +

## 连接 AI 助手 diff --git a/docs/readme/banner-dark.png b/docs/readme/banner-dark.png new file mode 100644 index 0000000..165a390 Binary files /dev/null and b/docs/readme/banner-dark.png differ diff --git a/docs/readme/banner-light.png b/docs/readme/banner-light.png new file mode 100644 index 0000000..bec8dde Binary files /dev/null and b/docs/readme/banner-light.png differ