{"_id":"@aisa-one/connect","_rev":"6-527f802ff4a35c20e79b9c5fb890be48","name":"@aisa-one/connect","dist-tags":{"latest":"0.7.0"},"versions":{"0.5.8":{"name":"@aisa-one/connect","version":"0.5.8","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"license":"MIT","_id":"@aisa-one/connect@0.5.8","maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"homepage":"https://aisa.one","bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"bin":{"aisa":"dist/index.js"},"dist":{"shasum":"fd47897e340fd9a051cd2c46cc76fa9945eedcb1","tarball":"https://registry.npmjs.org/@aisa-one/connect/-/connect-0.5.8.tgz","fileCount":147,"integrity":"sha512-DW6PAUyadU1hOSA5I2bNJe/PrqQao0Pp2IauV2oY15UETOD9lyabEwwxkvtJvJSUH+Hc9vlzANREyfTa4xAweA==","signatures":[{"sig":"MEUCIQCfE/k4xGAvt2C/oi1OgDG3D62jOoXvyyRNTaujH5b9agIgOD6ylUbEm5Wue8wq2Fdas/YywZIsH6l78cRvMKO3Vlk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1417344},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"c15f7123e8055eb482b048e35f6ecf2a5bcdefe0","scripts":{"dev":"tsc -w","test":"vitest run","build":"npm run clean && tsc && chmod +x dist/index.js","clean":"rm -rf dist","start":"node dist/index.js","prepare":"node -e \"if(require('fs').existsSync('tsconfig.json'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"jony-aisa","email":"jony@aisa.one"},"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"_npmVersion":"11.19.0","description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","directories":{},"_nodeVersion":"26.8.1","dependencies":{"ora":"^8.0.1","conf":"^12.0.0","chalk":"^5.3.0","commander":"^12.0.0","smol-toml":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_0.5.8_1789005406824_0.2050378651975635","host":"s3://npm-registry-packages-npm-production"}},"0.5.9":{"name":"@aisa-one/connect","version":"0.5.9","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"license":"MIT","_id":"@aisa-one/connect@0.5.9","maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"homepage":"https://aisa.one","bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"bin":{"aisa":"dist/index.js"},"dist":{"shasum":"198e32620caf8d5405440206aa29ad72aa98f6fb","tarball":"https://registry.npmjs.org/@aisa-one/connect/-/connect-0.5.9.tgz","fileCount":147,"integrity":"sha512-+8bt+zp/BvT8ULa+HIVt8aQGnoPwYaHZ9v/OmrBXIHdq4vJpPmPIoag3HSZiwIL8cgT6uO15We8z0fgcRRJhqA==","signatures":[{"sig":"MEUCIHLNqRTD69yzwBpC6DXyd9MXjsWXAGNAWUby5Ce0wrOdAiEA/LBSuzJjS3cfyWQNfi6TxS3m0FmPIXPX2USx6wgZvwQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1422647},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"565be9018c3d99f394c13ef26dbd13245f4dd066","scripts":{"dev":"tsc -w","test":"vitest run","build":"npm run clean && tsc && chmod +x dist/index.js","clean":"rm -rf dist","start":"node dist/index.js","prepare":"node -e \"if(require('fs').existsSync('tsconfig.json'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"jony-aisa","email":"jony@aisa.one"},"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"_npmVersion":"11.19.0","description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","directories":{},"_nodeVersion":"26.8.1","dependencies":{"ora":"^8.0.1","conf":"^12.0.0","chalk":"^5.3.0","commander":"^12.0.0","smol-toml":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_0.5.9_1789014745366_0.02035599272088673","host":"s3://npm-registry-packages-npm-production"}},"0.6.8":{"name":"@aisa-one/connect","version":"0.6.8","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"license":"MIT","_id":"@aisa-one/connect@0.6.8","maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"homepage":"https://aisa.one","bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"bin":{"aisa":"dist/index.js"},"dist":{"shasum":"3ea037bfdcc7a31f7a83e64cfdc4687227385776","tarball":"https://registry.npmjs.org/@aisa-one/connect/-/connect-0.6.8.tgz","fileCount":151,"integrity":"sha512-7J7I3b8vrjYuhW09yskiESuDwFT0T1z22fY1SBmlsPK9BIoc+97CvE5MwzJMPq8fnW5Rs2sZyTMhOKlP97kvtQ==","signatures":[{"sig":"MEUCIQDBee3Efbr35ohSWJkDHcYsiO9A3EX/lnWCZxeILwqtsQIgI1u9pv47/hkcRYc5OhMhE7Xmfa/wURqJZfUfFxyI7ig=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1493077},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"d1121f635de4a4d36c18e479229e9084643095f2","scripts":{"dev":"tsc -w","test":"vitest run","build":"npm run clean && tsc && chmod +x dist/index.js","clean":"rm -rf dist","start":"node dist/index.js","prepare":"node -e \"if(require('fs').existsSync('tsconfig.json'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"jony-aisa","email":"jony@aisa.one"},"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"_npmVersion":"11.19.0","description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","directories":{},"_nodeVersion":"26.8.1","dependencies":{"ora":"^8.0.1","conf":"^12.0.0","chalk":"^5.3.0","commander":"^12.0.0","smol-toml":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_0.6.8_1789090808379_0.16734925507190246","host":"s3://npm-registry-packages-npm-production"}},"0.6.9":{"name":"@aisa-one/connect","version":"0.6.9","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"license":"MIT","_id":"@aisa-one/connect@0.6.9","maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"homepage":"https://aisa.one","bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"bin":{"aisa":"dist/index.js"},"dist":{"shasum":"a5f06fd1e72a7a5bc5331d1da418d93ffa013097","tarball":"https://registry.npmjs.org/@aisa-one/connect/-/connect-0.6.9.tgz","fileCount":151,"integrity":"sha512-OQvdqd8y/ooWg5e8wIIdvTwzNOO6LSiW+3g+5sC5Owb8FWo921IsbcXStQuS1M+eLtvOzkT7HriTKBkYzXnXkw==","signatures":[{"sig":"MEUCIF4p9kaQVOiGRCos0ZQDRdLNw94Pe8YvQdAvF/wA6fGgAiEAwhAWjJkVdklM6HBuBqxOp2+ZdtDYj1UJtNJhkxm31KA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1495846},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"7226ecdb41bf933a38d48775694363168927ae38","scripts":{"dev":"tsc -w","test":"vitest run","build":"npm run clean && tsc && chmod +x dist/index.js","clean":"rm -rf dist","start":"node dist/index.js","prepare":"node -e \"if(require('fs').existsSync('tsconfig.json'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"jony-aisa","email":"jony@aisa.one"},"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"_npmVersion":"11.19.0","description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","directories":{},"_nodeVersion":"26.8.1","dependencies":{"ora":"^8.0.1","conf":"^12.0.0","chalk":"^5.3.0","commander":"^12.0.0","smol-toml":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_0.6.9_1789272130652_0.6879371545281163","host":"s3://npm-registry-packages-npm-production"}},"0.6.10":{"name":"@aisa-one/connect","version":"0.6.10","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"license":"MIT","_id":"@aisa-one/connect@0.6.10","maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"homepage":"https://aisa.one","bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"bin":{"aisa":"dist/index.js"},"dist":{"shasum":"4640db5c668abfda0b2b593b634ffa20a1bb8a84","tarball":"https://registry.npmjs.org/@aisa-one/connect/-/connect-0.6.10.tgz","fileCount":151,"integrity":"sha512-S72hrIyOjo8jLVHedv5fZhkLWQl/2LKZF2+Dj8ztcBFdCzF3sFLtSWMy97p/8IC3IHda0icQZAskVotEDDn6bQ==","signatures":[{"sig":"MEYCIQDcSNkFLe7NB1JCx3BK6UZ2T4tw0ExWw6+VdyNBq4i2NQIhAPOBNOjW6uH4rd21vpPPhnk7M5hMwEOtGREm/rg++5T4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1496621},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"c59db6da9661d5bbf6be5232ab1d15d878af12d0","scripts":{"dev":"tsc -w","test":"vitest run","build":"npm run clean && tsc && chmod +x dist/index.js","clean":"rm -rf dist","start":"node dist/index.js","prepare":"node -e \"if(require('fs').existsSync('tsconfig.json'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"jony-aisa","email":"jony@aisa.one"},"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"_npmVersion":"11.19.0","description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","directories":{},"_nodeVersion":"26.8.1","dependencies":{"ora":"^8.0.1","conf":"^12.0.0","chalk":"^5.3.0","commander":"^12.0.0","smol-toml":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_0.6.10_1789280207999_0.7307412607070296","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"_id":"@aisa-one/connect@0.7.0","bin":{"aisa":"dist/index.js"},"bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"dist":{"shasum":"deb6655074a018e3f21eaf4b7b3397b01f708ce3","tarball":"https://registry.npmjs.org/@aisa-one/connect/-/connect-0.7.0.tgz","fileCount":153,"integrity":"sha512-GeMNUhJMt4rmGbMftnrVGbNpW9kulvWLgmbuC2Kddqvfixf15mrjHGufNrzZxeRUgCzdje3WEm9YqeBdgrMTOA==","signatures":[{"sig":"MEYCIQDdHmCiFRYAdEWoaUVNvQ46w2jQ/MC5mqdHxnMmhj0YXQIhAPt24/V/xmpZ6b/YbPI38hASDU54wSNjbEqj2jPLXCvs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB8aJE8MHdFFT5eu1U3o708MmN2GkZs+dAVbsI/Qi7UOAiEAyj7Aj2xSq1Gpj8UOqEwz8pyOPr8080dzMdrLXue3y0s="}],"unpackedSize":1503797},"main":"dist/index.js","name":"@aisa-one/connect","type":"module","types":"dist/index.d.ts","author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"engines":{"node":">=18"},"gitHead":"714b5ebebb00b1104f20675cf82d14112ca5e56f","license":"MIT","scripts":{"dev":"tsc -w","test":"vitest run","build":"npm run clean && tsc && chmod +x dist/index.js","clean":"rm -rf dist","start":"node dist/index.js","prepare":"node -e \"if(require('fs').existsSync('tsconfig.json'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"","test:watch":"vitest","prepublishOnly":"npm run build"},"version":"0.7.0","_npmUser":{"name":"jony-aisa","email":"jony@aisa.one"},"homepage":"https://aisa.one","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"_npmVersion":"11.19.0","description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","directories":{},"maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"_nodeVersion":"26.8.1","dependencies":{"ora":"^8.0.1","conf":"^12.0.0","chalk":"^5.3.0","commander":"^12.0.0","smol-toml":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/connect_0.7.0_1789631711518_0.7432068928344611"}}},"time":{"created":"2026-09-10T01:56:46.615Z","modified":"2026-09-17T07:55:11.872Z","0.5.8":"2026-09-10T01:56:46.985Z","0.5.9":"2026-09-10T04:32:25.529Z","0.6.8":"2026-09-11T01:40:08.551Z","0.6.9":"2026-09-13T04:02:10.779Z","0.6.10":"2026-09-13T06:16:48.210Z","0.7.0":"2026-09-17T07:55:11.627Z"},"bugs":{"url":"https://github.com/AIsa-team/aisa-connect/issues"},"author":{"url":"https://aisa.one","name":"AIsa Team","email":"support@aisa.one"},"license":"MIT","homepage":"https://aisa.one","keywords":["aisa","ai","llm","cli","api","gateway","skills","mcp","openai-compatible","ai-agents"],"repository":{"url":"git+https://github.com/AIsa-team/aisa-connect.git","type":"git"},"description":"One command to connect your coding agent to AIsa - sign in once, and every MCP server and model is configured for you","maintainers":[{"name":"renning22","email":"renning22@gmail.com"},{"name":"aisatom","email":"tom@aisa.one"},{"name":"bit_haonan","email":"liuhaonan00@gmail.com"},{"name":"idan_aisa","email":"idan@aisa.one"},{"name":"zhenlong911","email":"zhenlonghe@gmail.com"},{"name":"jony-aisa","email":"jony@aisa.one"}],"readme":"# @aisa-one/connect\n\nCommand-line access to [AIsa](https://aisa.one): **one API key** for\n**Claude, GPT, Gemini, DeepSeek, Kimi, GLM** and the live data behind them —\nfinance, web search, social, research, and video generation.\n\n## Install\n\n```bash\nnpm install -g @aisa-one/connect\n```\n\n## Quick Start\n\n```bash\n# Authenticate (or set AISA_API_KEY)\naisa login --key sk-your-api-key\n\n# See what's available — no API key needed for this part\naisa api list\naisa api search \"insider trades\"\n\n# Chat with any model\naisa chat \"Explain quantum computing\" --model claude-opus-4-6\n\n# Look up a stock\naisa stock AAPL\n\n# Search the web\naisa web-search \"latest AI research\"\n\n# Call any endpoint in the catalog directly\naisa run financial /insider-trades -q \"ticker=AAPL\"\n```\n\nGet your API key at\n[console.aisa.one/api-keys](https://console.aisa.one/api-keys). New accounts\nreceive $5 in free credits.\n\n## API Catalog\n\nThe catalog is the fastest way to find what the platform can do. It reads a\npublic endpoint, so `list`, `show`, `search`, and `code` all work before you log\nin.\n\n```bash\naisa api list                          # all 29 providers\naisa api list --category finance       # finance, search, social, productivity, other\naisa api list --health                 # include provider health\n\naisa api show financial                # every endpoint in one provider\naisa api show financial /news          # one endpoint: params, price, run command\naisa api show dataforseo --all         # 453 endpoints (truncated to 40 by default)\n\naisa api search \"stock screener\"       # search across every endpoint\naisa api search rank --provider dataforseo\n\naisa api code financial /news --lang curl     # curl, python, node, typescript\n```\n\nTwo things worth knowing: a provider's **id is not always its URL slug** —\n`brave-search` serves `/apis/v1/brave/...`, and `api show` prints the path you\nactually call. And the catalog reports every method as `GET`; pass `--method` to\n`api code` when an endpoint takes a POST.\n\nThe catalog is cached in `~/.aisa/cache` (override with `AISA_CACHE_DIR`). Pass\n`--refresh` to any command to bypass it, or `aisa cache clear`.\n\n## Execute Any Endpoint\n\n```bash\naisa run financial /insider-trades -q \"ticker=AAPL\"\naisa run coingecko /simple/price -q \"ids=bitcoin&vs_currencies=usd\"\naisa run brave /web/search -q \"q=AI agents\"\naisa run tavily /search -d '{\"query\": \"AI news\"}'\naisa run twitter /tweet/advanced_search -q \"query=AI agents\" --raw\naisa run dataforseo /serp/google/organic/live -d '{...}' --show-cost\n```\n\n`run` sends anything that isn't a known LLM gateway route to the integration\nAPIs, so providers added to the platform work without a CLI upgrade. Use\n`--llm` or `--domain` to force a base.\n\n`--show-cost` prints the gateway's billing headers on stderr, so it stays out of\nthe way of `--raw | jq`. Metered providers (DataForSEO, Jina) report the amount\nactually charged and the credits consumed — for those the catalog's flat\nper-request price is not what you pay. Other routes report only a price key, and\nthe LLM gateway reports nothing; the output says so rather than implying a call\nwas free.\n\n## LLM Gateway\n\nGPT, Claude, Gemini, DeepSeek, Kimi, GLM, Qwen and the rest behind one\nOpenAI-compatible endpoint.\n\n```bash\naisa chat \"your message\" --model gpt-4.1-mini\naisa chat \"explain this\" --model claude-opus-4-6\naisa chat \"respond in JSON\" --model gemini-2.5-pro --json\necho \"summarize this\" | aisa chat                  # pipe support\n\naisa models                          # list all models\naisa models --provider anthropic     # filter by provider\naisa models show gpt-4.1-mini        # model details\n```\n\nStreaming is on by default; pass `--no-stream` to disable it.\n\n## Finance\n\n```bash\naisa stock AAPL                     # summary: company info + estimates + news\naisa stock AAPL --field insider     # insider trades\naisa stock AAPL --field news        # company news\naisa stock TSLA --field filings     # SEC filings\naisa stock MSFT --field estimates   # analyst EPS & revenue estimates\naisa stock AAPL --field financials  # balance sheets, income statements\n\naisa crypto BTC                     # price, 24h change, market cap\naisa crypto ETH --period 30d        # historical\naisa crypto --id render-token RNDR  # exact CoinGecko id when a symbol is ambiguous\n\naisa screener --sector \"Information Technology\"\naisa screener --min-market-cap 1000000000000 --limit 10\naisa screener --filter market_cap:gt:1e12 --filter sector:eq:Financials\n```\n\nSectors use GICS names; short forms like `Technology` are mapped automatically.\n\n## Web Search\n\n```bash\naisa web-search \"query\"                     # Tavily (default)\naisa web-search \"query\" --type youtube      # YouTube search\naisa scholar \"transformer architecture\"     # academic papers\n```\n\n`--type smart` and `--type full` are currently degraded upstream and return 404\nregardless of parameters. Use `tavily` until that is resolved.\n\n## Twitter/X\n\n```bash\naisa twitter user elonmusk                  # user profile\naisa twitter search \"AI agents\" --limit 20  # search tweets\naisa twitter trends                         # trending topics\naisa twitter user-tweets elonmusk           # recent tweets\naisa twitter thread <tweet-id>              # full conversation\n```\n\nRead operations work with just your API key. **Write operations** (`aisa tweet`,\n`like`, `retweet`, `follow`, `dm`) additionally require Twitter login cookies\nand a proxy — run `aisa twitter login --username <u> --password <p> --proxy <url>`\nfirst. Run `aisa twitter --help` for the full list of 30+ subcommands.\n\n## Video Generation\n\n```bash\naisa video create \"A sunset timelapse\"                  # returns a task id\naisa video create \"Dancing robot\" --wait                # poll until done\naisa video create \"A cat\" --output cat.mp4              # wait and download\naisa video status <task-id>\n\n# image-to-video: --image is shorthand for --media first_frame=<url>\naisa video create \"the bird turns its head\" --model wan2.7-i2v --image https://…/photo.jpg\naisa video create \"extend this clip\" --model wan2.7-r2v --media first_clip=https://…/in.mp4\n\n# Seedance uses a different request shape; the CLI handles it\naisa video create \"a cat walking\" --model dreamina-seedance-2-0-fast-260128\n```\n\n| Model | Needs | Billing |\n|-------|-------|---------|\n| `wan2.7-t2v` (default), `happyhorse-1.1-t2v` | prompt only | per second |\n| `wan2.7-i2v`, `happyhorse-1.1-i2v` | `--image` / `--media first_frame=` | per second |\n| `wan2.7-r2v`, `happyhorse-1.1-r2v` | `--media first_clip=` | per second |\n| `dreamina-seedance-2-0-260128`, `…-fast-260128` | prompt only | per token |\n\nMedia types: `first_frame`, `last_frame`, `driving_audio`, `first_clip`.\n\nThe gateway forwards the request body to whichever vendor owns the model, so the\nshape differs per family — the CLI builds it for you and refuses up front if a\nmodel needs source media you did not supply (the upstream would otherwise accept\nthe job, bill it, and fail a minute later). For a vendor or parameter the CLI\ndoes not model, `--body '<json>'` is sent verbatim.\n\n## Account\n\n```bash\naisa balance                        # wallet and API key credit balance\naisa balance --json\naisa topup                          # open the console billing page to add credit\naisa topup 20                       # same, deep-linked to $20\n```\n\nPayment always finishes in the browser: card details belong to Stripe's hosted\npage, not to us, and a bank's 3-D Secure step needs one. `topup` opens the\nright page; `--no-open` prints the URL instead.\n\n`aisa usage` is not available yet — the gateway does not serve\n`GET /v1/credits/usage` (it 404s, while `/v1/credits/balance` on the same route\ngroup works). Use the [console](https://console.aisa.one/logs) for usage history\nin the meantime.\n\n## Skills\n\nSkills are markdown files that teach AI coding agents (Claude Code, Cursor,\nCopilot, …) how to use AIsa APIs. They come from the\n[agent-skills](https://github.com/AIsa-team/agent-skills) repository — 42 skills\nacross six categories.\n\n```bash\naisa skills list                              # all skills\naisa skills list --category financial         # one category\naisa skills search \"financial analysis\"\naisa skills show marketpulse                  # bare name or financial/marketpulse\naisa skills install marketpulse               # install to detected agent directories\naisa skills install marketpulse --force       # replace whatever occupies that directory\naisa skills remove marketpulse\n```\n\nInstalling replaces the target directory rather than merging into it, so a\nprevious skill's scripts and assets cannot linger and keep being loaded, and a\npartial download aborts without touching what is already there. Each install\nwrites a small `.aisa-skill.json` recording which skill owns the directory —\nthat marker is what lets the CLI tell two same-named skills apart.\n\nNaming a category (`financial/marketpulse`) means \"this specific skill\", so the\nCLI checks the marker before replacing or removing anything. A directory\ninstalled before markers existed cannot be verified that way, so those need\n`--force`. A bare name (`marketpulse`) means \"whatever holds that directory\" and\nalways works — it only resolves when the leaf name is unique across the repo.\n\nSkills install to whichever agent directories exist on your machine:\n\n| Agent | Directory |\n|-------|-----------|\n| Claude Code | `~/.claude/skills/` |\n| Cursor | `~/.cursor/skills/` |\n| GitHub Copilot | `~/.github/skills/` |\n| Windsurf | `~/.codeium/windsurf/skills/` |\n| Codex | `~/.agents/skills/` |\n| Gemini | `~/.gemini/skills/` |\n| OpenClaw | `~/.openclaw/skills/` |\n\n### Create Skills\n\n```bash\naisa skills init my-skill                          # default template\naisa skills init my-skill --template finance       # finance, llm, search, twitter, video\n```\n\nTo publish a skill, open a pull request against\n[AIsa-team/agent-skills](https://github.com/AIsa-team/agent-skills).\n\n## MCP Server\n\n### One-liner: `connect`\n\n```bash\nnpx @aisa-one/connect connect\n```\n\nOpens a small local page (served by this process on `127.0.0.1`, shut down\nwhen finished) where you tick the AIsa MCP servers you want and the coding\nagents to install them into. Claude Code is configured through its own\n`claude mcp add` (user scope), then signed in through its own OAuth: connect\nruns `claude mcp login` per server, your browser opens the AIsa\nauthorization, and the tokens live in Claude Code's own store where it also\nrefreshes them — no API key, nothing pasted. Cursor, Claude Desktop and\nWindsurf get config entries and run the same OAuth themselves on first use.\nThe page matches the AIsa Console style, reports authorization progress\nlive, and a success page with copy-paste try-it-now prompts opens when\neverything is connected. No daemon stays behind.\n\nOnce an agent has been connected, `connect` opens on **your connections**\ninstead of on step one: a card per agent this machine has set up, with what\nit got — servers, model, skills — and a button to launch it or to set it up\nagain. Every card leads to the page that run finished on. `--new` skips the\nlist and starts a new connection straight away; `--no-open` prints the URL\ninstead of launching a browser; `--dry-run` shows what would be written.\n\nThe list lives in `~/.aisa/connections.json`, written when a run succeeds.\nIt records what was set up, not what the machine currently holds, so each\ncard is checked against the machine when it is drawn — the command on your\nPATH, the files the run wrote, the stored key — and says \"needs a look\"\nrather than promising a setup that has since been changed by hand.\n\n### Scripted: `mcp setup`\n\n```bash\naisa mcp setup                          # configure the default servers for every detected client\naisa mcp setup --all                    # every live server, not just the defaults\naisa mcp setup --agent cursor           # one client only\naisa mcp status                         # list entries and ping each configured endpoint\n```\n\n`setup` reads the platform's discovery manifest (`aisa.one/.well-known/mcp.json`)\nat run time and writes one entry per live server, in the shape each client\nexecutes: a `url` entry for Cursor, an `npx mcp-remote` stdio bridge for\nClaude Desktop and Windsurf. With an API key configured the entries carry it\nas a Bearer header; without one they carry no credentials and the server's\nOAuth flow opens in your browser on first use. A config file that exists but\ndoes not parse is never overwritten. The docs-search MCP is always included\nas `aisa-docs`.\n\n## Shell Completion\n\n```bash\n# zsh\naisa completion zsh > \"${fpath[1]}/_aisa\"      # then restart your shell\n# or, without touching fpath:\necho 'eval \"$(aisa completion zsh)\"' >> ~/.zshrc\n\n# bash\naisa completion bash > /usr/local/etc/bash_completion.d/aisa\n# or:\necho 'eval \"$(aisa completion bash)\"' >> ~/.bashrc\n\n# fish\naisa completion fish > ~/.config/fish/completions/aisa.fish\n```\n\n`aisa completion` with no argument detects your shell from `$SHELL`.\n\nCompletion covers commands, subcommands, and options, plus values pulled from\nthe local cache:\n\n```\naisa run <TAB>                 → 29 provider slugs\naisa run financial <TAB>       → that provider's endpoints\naisa api show <TAB>            → provider ids\naisa skills show <TAB>         → 42 skill names\naisa chat --model <TAB>        → model ids\naisa web-search --type <TAB>   → tavily, youtube, scholar, …\n```\n\nThe cache-backed suggestions only appear once the relevant command has been run\nat least once — completion never makes a network request, so a cold cache\ncompletes commands and flags but no dynamic values. Run `aisa api list`,\n`aisa models`, and `aisa skills list` once to warm everything up.\n\n## Configuration\n\n```bash\naisa config set defaultModel claude-opus-4-6\naisa config get defaultModel\naisa config list                                # also shows derived base URLs\naisa config reset\n```\n\nSettings:\n- `defaultModel` — default model for `aisa chat` (default: `gpt-4.1-mini`)\n- `baseUrl` — platform root; the LLM (`/v1`), integration (`/apis/v1`), and\n  catalog bases are all derived from it\n- `outputFormat` — `text` or `json`\n\nEnvironment variables: `AISA_API_KEY` takes precedence over the stored key.\n`AISA_CACHE_DIR` relocates the cache. `GITHUB_TOKEN` raises the GitHub rate\nlimit for skills commands.\n\n## Development\n\n```bash\ngit clone https://github.com/AIsa-team/cli.git\ncd cli\nnpm install\nnpm run build       # compile TypeScript\nnpm run dev         # watch mode\nnpm test            # run tests\n```\n\n## Appendix: Notes for Contributors\n\n**Three bases, one root.** `resolveBases()` in `src/api.ts` derives the LLM base\n(`/v1`), the integration base (`/apis/v1`), and the catalog root from a single\nconfigured `baseUrl`. It tolerates a value with either suffix already attached,\nbecause the shipped default has always included `/v1` and is persisted in every\nexisting user's config.\n\n**Routing in `run`.** `resolveRunTarget()` (`src/commands/run.ts`) treats the LLM\ngateway routes as the whitelist and everything else as an integration API. That\ndirection matters: gateway routes are hardcoded server-side and change roughly\nannually, while provider slugs are database rows that operations edit\ncontinuously.\n\n**The catalog's shape has three traps.** `endpoints[].method` is hardcoded to\n`GET` server-side. `endpoint_groups[].name` is an operator-entered label\n(`Zero`, `One`, `default`) with no business meaning, which is why `api show`\nflattens by default. And health is tracked per provider, not per endpoint, so\nper-endpoint counts are one value repeated.\n\n**Parameter naming varies by endpoint.** Scholar uses `query`, finance uses\n`ticker` (not `symbol`), Twitter uses `userName`. `aisa api show <api> <path>`\nprints each endpoint's description and path parameters.\n\n**Video generation is async.** `POST /v1/video/generations` returns `202` with a\ngateway-local `video_task_<hex>` id. Poll `GET /v1/video/generations/:id` until\n`status` is one of `completed`, `failed`, or `cancelled`. The finished URL sits\nat a different place in `result` for each vendor, so `findVideoUrl()` searches\nfor it.\n\n**Twitter write operations require login cookies.** `create_tweet_v2` and the\nother action endpoints need `login_cookies` and `proxy` in the body — the\ngateway does not hold your Twitter session.\n\n**Some financial endpoints return empty data.** `financial/prices` and\n`financial/financial-metrics/snapshot` return `{}` for all tickers. `aisa stock`\nuses `company/facts` + `analyst-estimates` + `news` instead. Working fields:\n`info`, `estimates`, `financials`, `filings`, `insider`, `institutional`, `news`.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}