Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@aisa-one/cli

CLI for the AISA unified AI infrastructure platform. Access 70+ LLMs, web search, financial data, Twitter/X, and video generation APIs β€” all from one command line.

Install

npm install -g @aisa-one/cli

Quick Start

# Authenticate
aisa login --key sk-your-api-key

# Chat with any LLM
aisa chat "Explain quantum computing" --model claude-opus-4-6

# Search the web
aisa web-search "latest AI research"

# Look up stock data
aisa stock AAPL

# Post a tweet
aisa tweet "Hello from AISA CLI!"

# Generate a video
aisa video create "A cat playing piano" --wait

Get your API key at aisa.one/dashboard. New accounts receive $5 in free credits.

Commands

Authentication

aisa login --key <key>    # Store API key (also reads AISA_API_KEY env var)
aisa logout               # Remove stored key
aisa whoami               # Show auth status

LLM Gateway

Chat with 70+ models (GPT, Claude, Gemini, Qwen, Deepseek, Grok) through a single OpenAI-compatible endpoint.

aisa chat "your message" --model gpt-4.1-mini
aisa chat "explain this" --model claude-opus-4-6 --stream
aisa chat "respond in JSON" --model gemini-2.5-pro --json
echo "summarize this" | aisa chat                        # pipe support

aisa models                          # list all models
aisa models --provider anthropic     # filter by provider
aisa models show gpt-4.1-mini        # model details

API Discovery & Execution

aisa api list                                # 🚧 WIP β€” not yet available
aisa api search "email finder"               # 🚧 WIP
aisa api show finance /stock/price           # 🚧 WIP
aisa api code finance /stock/price --lang python  # 🚧 WIP

# Execute any API (works now)
aisa run financial /insider-trades -q "ticker=AAPL"
aisa run tavily /search -d '{"query": "AI news"}'
aisa run twitter /tweet/advanced_search -q "query=AI agents" --raw

Web Search

aisa web-search "query"                     # smart search (default)
aisa web-search "query" --type full         # full-text search
aisa web-search "query" --type youtube      # YouTube search
aisa web-search "query" --type tavily       # Tavily deep search
aisa scholar "transformer architecture"     # academic papers

Finance

aisa stock AAPL                     # summary: company info + estimates + news
aisa stock AAPL --field insider     # insider trades
aisa stock AAPL --field news        # company news
aisa stock TSLA --field filings     # SEC filings
aisa stock MSFT --field estimates   # analyst EPS & revenue estimates
aisa stock AAPL --field financials  # balance sheets, income statements
aisa crypto BTC                     # crypto price snapshot
aisa crypto ETH --period 30d       # historical
aisa screener --sector Technology   # stock screener

Twitter/X

aisa twitter user elonmusk                  # user profile
aisa twitter search "AI agents" --limit 20  # search tweets
aisa twitter trends                         # trending topics
aisa tweet "Hello world!"                   # post (⚠️ requires login cookies, see docs)

Video Generation

aisa video create "A sunset timelapse"           # create task
aisa video create "Dancing robot" --wait         # wait for result
aisa video status <task-id>                      # check status

Account

aisa balance                # Show wallet and API key credit balance
aisa balance --json         # Output the balance response as JSON
aisa usage --limit 20       # 🚧 WIP

Skills

Skills are markdown files that teach AI coding agents (Claude Code, Cursor, Copilot, etc.) how to use AISA APIs. Skills are sourced from the agent-skills repository.

Browse & Install

aisa skills list                              # list all available skills
aisa skills search "financial analysis"       # search by keyword
aisa skills show marketpulse                  # show skill details
aisa skills install marketpulse               # install to agent directories
aisa skills remove marketpulse                # uninstall

Skills install to agent directories automatically:

Agent Directory
Claude Code ~/.claude/skills/
Cursor ~/.cursor/skills/
GitHub Copilot ~/.github/skills/
Windsurf ~/.codeium/windsurf/skills/
Codex ~/.agents/skills/
Gemini ~/.gemini/skills/
OpenClaw ~/.openclaw/skills/

Create Skills

aisa skills init my-skill                          # create from default template
aisa skills init my-skill --template finance       # finance template
aisa skills init my-skill --template llm           # LLM template

Available templates: default, llm, search, finance, twitter, video

To publish a skill, submit a pull request to AIsa-team/agent-skills.

MCP Server

Auto-configure AISA's MCP server for your AI agents:

aisa mcp setup                          # configure all detected agents
aisa mcp setup --agent cursor           # Cursor only
aisa mcp setup --agent claude-desktop   # Claude Desktop only
aisa mcp status                         # check configuration

Configuration

aisa config set defaultModel claude-opus-4-6   # change default model
aisa config get defaultModel                    # read a value
aisa config list                                # show all settings
aisa config reset                               # reset to defaults

Settings:

  • defaultModel β€” default model for aisa chat (default: gpt-4.1-mini)
  • baseUrl β€” API base URL (default: https://api.aisa.one)
  • outputFormat β€” output format: text or json

Environment variable AISA_API_KEY takes precedence over stored key.

Known Issues

GPT-4.1 streaming returns empty output. The AISA gateway currently strips choices[].delta.content from GPT model SSE chunks, so streaming mode produces blank output for GPT models. Workaround: use --no-stream or switch to Claude/Qwen models which stream correctly. Non-streaming GPT works fine.

Development

git clone https://github.com/AIsa-team/cli.git
cd cli
npm install
npm run build       # compile TypeScript
npm run dev         # watch mode
npm test            # run tests

Appendix: Architecture Notes for Contributors

Two base URLs. The AISA platform uses separate base paths:

  • LLM endpoints (chat, models): https://api.aisa.one/v1/
  • Domain API endpoints (search, finance, twitter, video): https://api.aisa.one/apis/v1/

The domain: true option in RequestOptions (see src/api.ts) selects which base URL to use. The run command auto-detects based on the slug prefix.

Parameter naming varies by endpoint. Smart/full search uses q, scholar uses query, finance uses ticker (not symbol), Twitter uses userName (camelCase). Always check the API Reference for exact parameter names.

Video generation is async. POST to /services/aigc/video-generation/video-synthesis with header X-DashScope-Async: enable, then poll GET /services/aigc/tasks?task_id=<id> for status. Response shape uses output.task_id, output.task_status, output.video_url.

Twitter write operations require login cookies. create_tweet_v2 and other action endpoints need login_cookies and proxy fields β€” they don't work with just the API key.

Models API follows OpenAI format. The /v1/models endpoint returns owned_by (not provider) and has no name, pricing, or contextWindow fields.

Some financial endpoints return empty data. financial/prices and financial/financial-metrics/snapshot return {} for all tickers (backend issue). The default aisa stock now fetches company/facts + analyst-estimates + news instead. Working fields: info, estimates, financials, filings, insider, institutional, news.

License

MIT

About

CLI for the AISA unified AI infrastructure platform - access 70+ LLMs, web search, finance, Twitter, and video generation APIs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages