@nexoracoding/cli 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/README.md ADDED
@@ -0,0 +1,122 @@
1
+ # Nexora CLI
2
+
3
+ The Nexora CLI (`nexora`) is a customizable command line coding agent.
4
+
5
+ ![Nexora CLI Demo](./media/demo.gif)
6
+
7
+ ## Installation
8
+
9
+ **macOS / Linux:**
10
+
11
+ ```bash
12
+ curl -fsSL https://raw.githubusercontent.com/kemzang-Bryan/Nexora/main/extensions/cli/scripts/install.sh | bash
13
+ ```
14
+
15
+ **Windows (PowerShell):**
16
+
17
+ ```powershell
18
+ irm https://raw.githubusercontent.com/kemzang-Bryan/Nexora/main/extensions/cli/scripts/install.ps1 | iex
19
+ ```
20
+
21
+ Or install with npm if you have Node.js 20+:
22
+
23
+ ```bash
24
+ npm i -g @nexoracoding/cli
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ nexora
31
+ ```
32
+
33
+ ### Headless Mode
34
+
35
+ Headless mode (`-p` flag) runs without an interactive terminal UI, making it perfect for:
36
+
37
+ - Scripts and automation
38
+ - CI/CD pipelines
39
+ - Docker containers
40
+ - VSCode/IntelliJ extension integration
41
+ - Environments without a TTY
42
+
43
+ ```bash
44
+ # Basic usage
45
+ nexora -p "Generate a conventional commit name for the current git changes."
46
+
47
+ # With piped input
48
+ echo "Review this code" | nexora -p
49
+
50
+ # JSON output for scripting
51
+ nexora -p "Analyze the code" --format json
52
+
53
+ # Silent mode (strips thinking tags)
54
+ nexora -p "Write a README" --silent
55
+ ```
56
+
57
+ **TTY-less Environments**: Headless mode is designed to work in environments without a terminal (TTY), such as when called from VSCode/IntelliJ extensions using terminal commands. The CLI will not attempt to read stdin or initialize the interactive UI when running in headless mode with a supplied prompt.
58
+
59
+ ### Session Management
60
+
61
+ The CLI automatically saves your chat history for each terminal session. You can resume where you left off:
62
+
63
+ ```bash
64
+ # Resume the last session in this terminal
65
+ nexora --resume
66
+
67
+ # List recent sessions and choose one to resume
68
+ nexora ls
69
+
70
+ # List sessions in JSON format (for scripting)
71
+ nexora ls --json
72
+ ```
73
+
74
+ ## Command Line Options
75
+
76
+ - `-p`: Run in headless mode (no TUI)
77
+ - `--config <path>`: Specify agent configuration path
78
+ - `--resume`: Resume the last session for this terminal
79
+ - `<prompt>`: Optional prompt to start with
80
+
81
+ ## Environment Variables
82
+
83
+ - `CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE`: Disable adding the commit signature to generated commit messages
84
+ - `FORCE_NO_TTY`: Force TTY-less mode, prevents stdin reading (useful for testing and automation)
85
+
86
+ ## Commands
87
+
88
+ - `nexora`: Start an interactive chat session
89
+ - `nexora ls`: List recent sessions with TUI selector to choose one to resume
90
+ - `nexora login`: Authenticate with Nexora
91
+ - `nexora logout`: Sign out of current session
92
+ - `nexora remote`: Launch a remote instance
93
+ - `nexora serve`: Start HTTP server mode
94
+
95
+ ### Session Listing (`nexora ls`)
96
+
97
+ Shows recent sessions, limited by screen height to ensure it fits on your terminal.
98
+
99
+ - `--json`: Output in JSON format for scripting (always shows 10 sessions)
100
+
101
+ ## TTY-less Support
102
+
103
+ The CLI fully supports running in environments without a TTY (terminal):
104
+
105
+ ```bash
106
+ # From Docker without TTY allocation
107
+ docker run --rm my-image nexora -p "Generate docs"
108
+
109
+ # From CI/CD pipeline
110
+ nexora -p "Review changes" --format json
111
+
112
+ # From VSCode/IntelliJ extension terminal tool
113
+ nexora -p "Analyze code" --silent
114
+ ```
115
+
116
+ The CLI automatically detects TTY-less environments and adjusts its behavior:
117
+
118
+ - Skips stdin reading when a prompt is supplied
119
+ - Disables interactive UI components
120
+ - Ensures clean stdout/stderr output
121
+
122
+ For more details, see [`spec/tty-less-support.md`](./spec/tty-less-support.md).
package/dist/cn.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from './index.js';
3
+ await runCli();