Skip to main content

Terminal TUI for AI-powered ticker analysis

Project description

AIPA Terminal

Live site: aipriceaction.com | GitHub: aipriceaction | Frontend: aipriceaction-web | Docker image: quanhua92/aipriceaction:latest | Python SDK: aipriceaction on PyPI | AIPA Terminal: aipa-cli on PyPI

Textual-based terminal interface for AI-powered ticker analysis. Features streaming chat with thinking/reasoning display, autocomplete, slash commands, and workflow tabs.

Install

# Run directly (no install)
uvx aipa-cli

# Or install as a standalone tool
uv tool install aipa-cli

# Use either command
aipa
aipa-cli

Requirements

  • Python 3.13+
  • An OpenAI-compatible API key (OPENAI_API_KEY)
  • Optional: set OPENAI_BASE_URL for custom providers like OpenRouter

Quick Start

# Launch the TUI (chat, workflows, ticker browser)
aipa

# AI analysis with default question template
aipa analyze VCB

# AI analysis with a custom question
aipa analyze VCB --question "What is the support level and stop loss?"

# Browse available question templates
aipa analyze VCB --questions

# Use a specific question template by index
aipa analyze VCB 2 --question "What is the current trend of VCB?"

# Dump raw context data without calling the LLM (no API key needed)
aipa analyze VCB --context-only

# Override language to English (default is your saved setting)
aipa analyze VCB --lang en

# Use hourly interval with SMA instead of EMA
aipa analyze BTCUSDT --interval 1h --ma-type sma

# Analyze multiple tickers at once
aipa analyze VCB FPT VIC --interval 1D

# Run multi-agent deep research pipeline
aipa deep-research

# Deep research with a custom question and save report to file
aipa deep-research "Which sectors are leading the market?" --output report.md

# Resume a previous deep-research session from checkpoint
aipa deep-research --resume <session-id>

# Fetch raw OHLCV data as a table
aipa get-ohlcv-data VCB --interval 1D --limit 10

# Fetch with date range and no moving averages
aipa get-ohlcv-data VCB --start-date 2026-04-01 --end-date 2026-04-30 --no-ma

CLI Commands

aipa analyze

AI-powered analysis for one or more tickers. Builds context from OHLCV data and sends it to the LLM with a question.

# Default: uses question template 0 with your saved language setting
aipa analyze VCB

# Custom question
aipa analyze VCB --question "Is this a good time to buy?"

# List all question templates (trading opportunity, news, Wyckoff, etc.)
aipa analyze VCB --questions

# Raw data dump only (no LLM call, no API key required)
aipa analyze VCB --context-only

# Multi-ticker analysis
aipa analyze VCB FPT MBB

# Hourly data with SMA indicators
aipa analyze VCB --interval 1h --ma-type sma --limit 50

# Force English output
aipa analyze VCB --lang en
Flag Description
--question TEXT Custom analysis question
--questions List available question templates and exit
--context-only Dump raw context without LLM (no API key needed)
--interval Time interval: 1m, 5m, 15m, 30m, 1h, 4h, 1D, 1W (default: 1D)
--limit N Number of bars (default: 20)
--source Filter by source: vn or crypto
--start-date / --end-date Date range (e.g. 2026-04-01)
--reference-ticker Reference ticker for market context (default: VNINDEX)
--lang Language: en or vn (default: saved setting)
--ma-type Moving average type: ema or sma (default: ema)

aipa deep-research

Multi-agent deep research pipeline: supervisor decomposes into sector subtasks, parallel workers fetch data and analyze, aggregator synthesizes, and reviewer validates data integrity.

# Default: comprehensive market overview with all VN sectors
aipa deep-research

# Custom research question
aipa deep-research "Compare banking vs real estate sectors"

# Save final report to file
aipa deep-research --output ~/reports/market-analysis.md

# Resume from a previous checkpoint session
aipa deep-research --resume 019e0cbb-0466-fa9f-d68c-2da40d35a68f

# Force Vietnamese output
aipa deep-research --lang vn
Flag Description
--resume ID Resume from a checkpoint session ID
--output FILE Save final report to file
--lang Language: en or vn (default: saved setting)

aipa get-ohlcv-data

Fetch raw OHLCV data as a table (no LLM involved).

# Default: daily data with EMA indicators
aipa get-ohlcv-data VCB

# Hourly data, last 10 bars
aipa get-ohlcv-data VCB --interval 1h --limit 10

# Date range, no moving averages
aipa get-ohlcv-data VCB --start-date 2026-04-01 --end-date 2026-04-30 --no-ma

# Crypto data
aipa get-ohlcv-data BTCUSDT --interval 1D --limit 30
Flag Description
--interval Time interval (default: 1D)
--limit N Number of bars
--start-date / --end-date Date range
--source Filter by source: vn or crypto
--ma / --no-ma Include/exclude moving averages (default: included)
--ema Use EMA instead of SMA

TUI

Launch the TUI with aipa. The interface has three tabs:

  • Chat — AI-powered chat with streaming responses, thinking/reasoning display, slash commands, and arrow-key history navigation
  • Workflows — Structured analysis forms with question bank dropdown for ticker analysis and deep research
  • Tickers — Browse and search available tickers

Slash Commands (Chat tab)

/analyze VCB                  # Default AI analysis
/analyze VCB 1h               # AI analysis with hourly interval
/analyze VCB 2                # Use question template index 2
/analyze VCB --question What is support?   # Custom question
/export VCB FPT               # Export context to markdown file
/deep-research                # Multi-agent research
/clear                        # Clear chat history
/exit                         # Quit

Press Ctrl+O in the Chat tab to view thinking/reasoning history.

Settings Tab

Configure your API key, model, and base URL directly in the TUI. Settings are saved to ~/.aipriceaction/settings.json and shared across both TUI and CLI.

Configuration

Settings are loaded from ~/.aipriceaction/settings.json. You can configure them via the TUI Settings tab or set environment variables:

Variable Description Default
OPENAI_API_KEY API key for the LLM provider
OPENAI_BASE_URL Base URL for OpenAI-compatible API OpenRouter
OPENAI_MODEL Model name openrouter/owl-alpha
DATABASE_URL Backend API URL http://localhost:3000

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aipa_cli-0.1.5.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aipa_cli-0.1.5-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file aipa_cli-0.1.5.tar.gz.

File metadata

  • Download URL: aipa_cli-0.1.5.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for aipa_cli-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b0da3b69237eb15104aa919958fa6f23aaea497ef596ed6c86aacea2c8fd590a
MD5 f941b1b8bdb44b2e95fec0323feebc97
BLAKE2b-256 2af2edc6c983974d3e1c0bd2e01f03b7887aaac11afb3c3451f293d4bbdb562a

See more details on using hashes here.

File details

Details for the file aipa_cli-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: aipa_cli-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for aipa_cli-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 07150933e1a05cb4a9ebb3212fa3855cc059ded1233d5b7fcb583801acd14d74
MD5 984f8f6103c4a9b7f426786dd2ad1f06
BLAKE2b-256 eaf4487d1c468437a0a9716f8d73342fba582e98f7aa86c74483655b61ad7680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page