@astra-code/astra-ai 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example ADDED
@@ -0,0 +1,19 @@
1
+ ASTRA_BACKEND_URL=https://api.astraaifor.me
2
+ ASTRA_MODEL=gpt-5.1-codex
3
+ ASTRA_CLIENT_ID=astra-code
4
+ ASTRA_RUNTIME_MODE=astra-code
5
+ # Optional provider override when model-based detection is not desired.
6
+ # Examples: openai, claude
7
+ ASTRA_PROVIDER=
8
+ # Optional voice mode adapters:
9
+ # - TTS: command receives spoken text as final argument (default on macOS uses `say`)
10
+ # - STT: one-shot command must print transcript text to stdout
11
+ ASTRA_TTS_COMMAND=
12
+ ASTRA_STT_COMMAND=
13
+ # Optional: live Whisper transcription tuning
14
+ ASTRA_STT_MODEL=whisper-1
15
+ ASTRA_STT_CHUNK_SECONDS=2.5
16
+ # Optional override for microphone capture.
17
+ # Use placeholders {output} and {seconds}.
18
+ # Example (macOS): sox -q -d -r 16000 -c 1 -b 16 "{output}" trim 0 {seconds}
19
+ ASTRA_STT_CAPTURE_COMMAND=
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ # Astra Code Terminal (TypeScript + Ink)
2
+
3
+ `astra-code-term` is the npm-first Astra terminal client built with TypeScript, React, and Ink.
4
+
5
+ ## Install
6
+
7
+ ### Global (recommended)
8
+
9
+ ```bash
10
+ cd astra-code-term
11
+ npm install
12
+ npm run build
13
+ npm install -g .
14
+ ```
15
+
16
+ Then run:
17
+
18
+ ```bash
19
+ astra
20
+ ```
21
+
22
+ ### Local development
23
+
24
+ ```bash
25
+ cd astra-code-term
26
+ npm install
27
+ npm run dev
28
+ ```
29
+
30
+ ## Configure
31
+
32
+ Create `.env` from `.env.example`:
33
+
34
+ ```bash
35
+ cp .env.example .env
36
+ ```
37
+
38
+ Supported variables:
39
+
40
+ - `ASTRA_BACKEND_URL` (default: `https://api.astraaifor.me`)
41
+ - `ASTRA_MODEL` (default: `gpt-5.1-codex`)
42
+ - `ASTRA_CLIENT_ID` (default: `astra-code`)
43
+ - `ASTRA_RUNTIME_MODE` (default: `astra-code`)
44
+ - `ASTRA_TTS_COMMAND` (optional; command used for text-to-speech, receives text as final arg)
45
+ - `ASTRA_STT_COMMAND` (optional; command used for one-shot speech-to-text; must print transcript to stdout)
46
+ - `ASTRA_STT_MODEL` (default: `whisper-1`, low-cost OpenAI Whisper transcription)
47
+ - `ASTRA_STT_CHUNK_SECONDS` (default: `2.5`, chunk size for live transcription)
48
+ - `ASTRA_STT_CAPTURE_COMMAND` (optional; custom mic capture command with `{output}` and `{seconds}` placeholders)
49
+ - `OPENAI_API_KEY` or `ASTRA_OPENAI_API_KEY` (required for built-in Whisper live STT)
50
+
51
+ ## Runtime behavior
52
+
53
+ No-args mode launches the Ink terminal UI:
54
+
55
+ - login / signup
56
+ - chat streaming via `/api/agent/chat/stream`
57
+ - slash commands:
58
+ - `/help`, `/new`, `/settings`, `/logout`, `/exit`
59
+ - `/history` (open searchable session history panel)
60
+ - `/voice on|off|status|start|stop|input`
61
+ - tool-event rendering (`tool_start`, `tool_result`, `credits_update`, `error`)
62
+ - terminal bridge auto-run for `run_in_terminal` + callback to `/api/agent/terminal-result`
63
+
64
+ Command mode:
65
+
66
+ ```bash
67
+ astra help
68
+ astra whoami
69
+ astra sessions
70
+ astra skills
71
+ astra skills --suggest "build dashboard with animations"
72
+ astra session-messages --session <session_id>
73
+ astra logout
74
+ astra legacy-python --help
75
+ ```
76
+
77
+ ## Validation
78
+
79
+ ```bash
80
+ npm run typecheck
81
+ npm run build
82
+ npm run start -- help
83
+ ```
84
+
85
+ ## Legacy Python runtime
86
+
87
+ The previous Python runtime remains in `../astra-code` during transition. Use:
88
+
89
+ ```bash
90
+ astra-code legacy-python
91
+ ```
92
+
93
+ If your shell resolves `astra-code` to an older Python symlink first, run the npm-installed binary directly (example):
94
+
95
+ ```bash
96
+ ~/.nvm/versions/node/<node-version>/bin/astra-code help
97
+ ```
98
+
99
+ Published package:
100
+
101
+ ```bash
102
+ npm i -g @astra-code/astra-ai
103
+ ```
104
+
105
+ Run without global install:
106
+
107
+ ```bash
108
+ npx @astra-code/astra-ai
109
+ ```