Model or dataset
kansoku-trade/kansoku avatar
kansoku-trade/kansoku

Kansoku: a local-first macOS trading cockpit where every AI claim carries its evidence

AI Stock Partner on Your Mac – Local Market Information, Multi-timeframe K-line, AI Intraday Comments and Follow-up Analysis

315 stars37 forksTypeScriptNOASSERTION

At a glance

What is it?
Kansoku is a macOS desktop app that pulls quotes from your own Longbridge account, computes every indicator locally in TypeScript, and attaches an AI layer whose conclusions carry an evidence chain and freeze once archived. It is licensed AGPL-3.0 plus Commons Clause.
Who is it for?
Use Kansoku if you are on macOS with Apple Silicon, already hold a Longbridge account, and want charts and AI commentary running against your own data and your own model keys rather than a hosted service. Skip it if you expect a hosted product or want to run it as a paid service, since the Commons Clause prohibits selling it and the app depends on a local broker CLI.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 17, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What it is, and what stays on your machine

Kansoku is a macOS desktop application for watching markets. The README describes it as an AI market companion where every statement can be checked: conclusions carry a full evidence chain, archived predictions are frozen and cannot be revised, and results are scored afterwards by hit rate.

The local-first claim is the part worth unpacking. Quotes and account data are pulled from your own Longbridge account with no intermediate server. Moving averages, MACD, relative strength, the trend template, volume distribution, candlestick patterns and divergence are all computed on the machine in TypeScript. AI keys are encrypted in a local SQLite database. Analysis conclusions and chart snapshots are written out as local markdown and JSON files.

Markets covered are US equities primarily, with Hong Kong symbols such as 700.HK and A-shares such as 600519.SH and 000001.SH already wired in. Trading sessions, lunch breaks and time zones follow each market, and US-only capabilities hide themselves on non-US symbols.

Installation, and the Longbridge prerequisite

You download a desktop-v release from the Releases page, take the Kansoku arm64 dmg for macOS on Apple Silicon, and drag it into Applications. Updates arrive through Sparkle with EdDSA signatures and delta packages, so one install is the last manual download.

One prerequisite is not optional. The longbridge CLI must be installed and logged in on the machine, because all quote and account data goes through it.

The app carries no paid developer signature, so the first launch needs a right-click and Open rather than a double-click, which the README documents in apps/desktop/README.md. First-run onboarding connects Longbridge data and then asks how you want the AI attached: your local codex login, LobeHub Cloud, or your own API key, and the step can be skipped entirely.

The AI layer: scenarios, follow-ups and frozen archives

Open a symbol and the AI combines multi-period candlesticks, pattern annotations and live quotes to give a short-term directional read plus Bull, Base and Bear scenarios whose probabilities sum to 100 percent, each with trigger conditions attached. Turn on follow-up and it keeps patrolling in the background after you close the chart, notifying you when the read changes. An earnings and macro event calendar sits in the right column, and tabs switch between prediction, environment, news, review and AI commentary.

Two design choices stand out. Every analysis can be challenged in place, and the AI reads your drawings before answering; ask it to mark key levels and it draws them on the chart as purple dashed lines with hover explanations, with a toolbar control that clears only AI-drawn lines. And archived predictions are frozen records, so follow-up questions can explain them but never rewrite them.

The research library works the same way. You browse and search local stock profiles and research logs, ask questions inside a document, and the assistant can propose edits you accept, reject or undo, or refresh a piece of research by source through a plan, verify, check, synthesize, propose sequence.

The charting layer and the SEPA dashboard

Under the AI sits a full charting tool. Multi-period candles at 5m, 15m and 1h refresh with the tape, with moving averages, MACD, pattern annotations and entry, stop and target lines overlaid. Drawing tools cover trendlines, polylines, horizontals, rectangles and Fibonacci, with colour, thickness, dash and arrow settings, plus style presets that apply to every line you draw afterwards.

The SEPA dashboard implements the Minervini trend template as eight checkboxes, and puts the long-term moving average value zone, the volume concentration zone, distance from 52-week highs and lows, relative strength against SPY and a volume ratio on one screen, ending in an automatic Buy, Watch List or Avoid conclusion.

There is also a review surface: an intraday board and a historical review that switch by time of day, a clickable trading-day timeline, judgement-versus-outcome tracking, historical prediction hit rate, daily capital flow, and a ledger of what the AI cost you.

Model choice and per-purpose routing

Four purposes get their own model selection: intraday quick takes, upgraded analysis, deep research and follow-up questions. Each can follow the main model, be pinned to a specific one, or be switched off entirely.

Providers listed are your local codex login, which the README notes costs nothing extra, LobeHub Cloud, which works on login, and your own API key for openai, anthropic, google or deepseek. Keys are encrypted in local SQLite, so which model you use and what it costs stay on your own account.

The repository, and what you can run from source

The repo is a pnpm workspace with shared libraries separated from hosts. packages/core, published as @kansoku/core, calls the longbridge CLI and computes every indicator in TypeScript; shared holds cross-package types and time utilities; bench holds a model trading benchmark with a public half; pro-api holds the type contracts for the pro slot. On the app side, server is a thin HTTP host for browser mode, desktop is the Electron shell with typed IPC and Sparkle updates, and web is a Vite and React front end that picks HTTP or IPC transport based on where it runs.

bash
pnpm install
pnpm dev
pnpm dev:desktop

pnpm dev runs web plus server in browser mode at http://localhost:1792. pnpm dev:desktop runs web inside Electron and does not start a server process. pnpm test and pnpm typecheck run across the whole workspace.

Releases are automated end to end: a release skill writes the notes, bumps the version and opens a pull request, and once merged CI tags, builds, signs and publishes, with installed users getting an in-app prompt. The repository also doubles as a Claude Code research workbench, with skills covering macro data, regulatory filings, global news flow, capital rotation and trading decision gates.

Licence, release cadence and who should not use it

The licence is AGPL-3.0 plus the Commons Clause, which the README states plainly is not OSI-approved open source but source-available. Personal use, internal company use, forking, study and modification are allowed, and if you modify it and offer it as a service to others you must release the source under AGPL-3.0. Selling the software itself, or its substantial functionality, as a paid product or paid service including hosting or paid support, is prohibited.

The release log shows steady work: desktop-v0.43.4 on 2026-09-11 updated the underlying runtime to Electron 44.3 and React 19.3 with security and stability patches, v0.43.2 the same day cut startup cost by loading the canvas compiler only when a canvas is first compiled, saving roughly 900KB of parsing in the main process and enabling the V8 compile cache, and v0.43.1 on 2026-09-09 fixed question editing layout, added validation on canvas save, and made the stop button interrupt running tools.

Who should not use it: anyone not on macOS with Apple Silicon, since that is the only build offered, anyone unwilling to install and authenticate the Longbridge CLI, and anyone looking for a hosted product rather than an app that depends on their own brokerage connection and their own model credentials.

Editorial conclusion

Use Kansoku if you are on macOS with Apple Silicon, already hold a Longbridge account, and want charts and AI commentary running against your own data and your own model keys rather than a hosted service. Skip it if you expect a hosted product or want to run it as a paid service, since the Commons Clause prohibits selling it and the app depends on a local broker CLI. Install and authenticate the longbridge CLI before you download anything, because without it the application has no market data at all.

Frequently asked questions

Does Kansoku send my data to a server?

No intermediate server is involved. Quotes and account data come from your own Longbridge account, indicators are computed locally in TypeScript, and AI keys are encrypted in a local SQLite database.

Do I need a Longbridge account for Kansoku?

Yes. The longbridge CLI must be installed and logged in on your Mac, because all quote and account data is pulled through it, and there is no other data path.

Can I host Kansoku as a paid service?

No. The licence is AGPL-3.0 plus the Commons Clause, which allows personal and internal use, forking and modification, but prohibits selling the software or its substantial functionality as a paid product or service.

Official sources

  1. Issues
  2. kansoku-trade/kansoku on GitHub
  3. Project website
  4. README
  5. Releases
Community notes

Community notes