@suchitraswain/nightcode-cli 1.0.0 → 1.0.2
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 +128 -0
- package/docs/screenshots/commands.png +0 -0
- package/docs/screenshots/home.png +0 -0
- package/docs/screenshots/session.png +0 -0
- package/package.json +21 -4
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# NightCode CLI
|
|
2
|
+
|
|
3
|
+
A terminal AI coding agent. Chat, plan, and build inside your local project — files stay on your machine, AI runs through the hosted NightCode API.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@suchitraswain/nightcode-cli)
|
|
6
|
+
[](https://github.com/SuchitraSwain/nightcode/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
## Screenshots
|
|
9
|
+
|
|
10
|
+
### Home
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
### Chat session
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
### Command menu
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
**Requirements:** [Bun](https://bun.sh) 1.0+
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bun install -g @suchitraswain/nightcode-cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cd your-project
|
|
36
|
+
nightcode
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
1. Type **`/login`** — sign in via browser (Clerk OAuth, one-time)
|
|
40
|
+
2. Type **`/upgrade`** — buy credits if prompted
|
|
41
|
+
3. Start chatting — NightCode reads and edits files in your current directory
|
|
42
|
+
|
|
43
|
+
No `.env` file, no API keys, no repo clone. The CLI connects to the hosted API automatically.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `/login` | Sign in |
|
|
52
|
+
| `/logout` | Sign out |
|
|
53
|
+
| `/new` | New conversation |
|
|
54
|
+
| `/sessions` | Browse past sessions |
|
|
55
|
+
| `/agents` | Switch plan vs build mode |
|
|
56
|
+
| `/models` | Change AI model |
|
|
57
|
+
| `/upgrade` | Buy credits |
|
|
58
|
+
| `/usage` | Open billing portal |
|
|
59
|
+
| `/theme` | Change color theme |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Supported models
|
|
64
|
+
|
|
65
|
+
| Model | Provider |
|
|
66
|
+
|-------|----------|
|
|
67
|
+
| `claude-opus-4-6` | Anthropic (default) |
|
|
68
|
+
| `claude-sonnet-4-6` | Anthropic |
|
|
69
|
+
| `claude-haiku-4-5` | Anthropic |
|
|
70
|
+
| `gpt-5.4` | OpenAI |
|
|
71
|
+
| `gpt-5.4-mini` | OpenAI |
|
|
72
|
+
| `gpt-5.4-nano` | OpenAI |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## How it works
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Your terminal Hosted API Your files
|
|
80
|
+
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
|
|
81
|
+
│ nightcode │ ────► │ Railway API │ │ local git │
|
|
82
|
+
│ (OpenTUI) │ ◄──── │ + Anthropic │ │ project │
|
|
83
|
+
└─────────────┘ └──────────────┘ └─────────────┘
|
|
84
|
+
│ ▲
|
|
85
|
+
└──────── local file tools ────────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- **CLI** runs on your machine and executes file tools locally
|
|
89
|
+
- **API** handles auth, billing, and AI requests — secrets never ship in the package
|
|
90
|
+
- **Credits** are metered per usage via Polar
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Troubleshooting
|
|
95
|
+
|
|
96
|
+
### Login fails — redirect URI mismatch
|
|
97
|
+
|
|
98
|
+
The maintainer must add `https://nightcode-production.up.railway.app/auth/callback` in the Clerk OAuth app settings.
|
|
99
|
+
|
|
100
|
+
### `nightcode: command not found`
|
|
101
|
+
|
|
102
|
+
Ensure Bun’s global bin is on your `PATH`:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
bun pm bin -g
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### API unreachable
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
curl https://nightcode-production.up.railway.app/health
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Expected: `{"status":"ok"}`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Links
|
|
119
|
+
|
|
120
|
+
- **Repository:** [github.com/SuchitraSwain/nightcode](https://github.com/SuchitraSwain/nightcode)
|
|
121
|
+
- **Issues:** [github.com/SuchitraSwain/nightcode/issues](https://github.com/SuchitraSwain/nightcode/issues)
|
|
122
|
+
- **API health:** [nightcode-production.up.railway.app/health](https://nightcode-production.up.railway.app/health)
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT © [Suchitra Swain](https://github.com/SuchitraSwain)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suchitraswain/nightcode-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Terminal AI coding agent — chat, plan, and edit local files via a hosted API. No API keys required.",
|
|
5
|
+
"author": "Suchitra Swain <suchitraswain.2012@gmail.com>",
|
|
6
|
+
"homepage": "https://github.com/SuchitraSwain/nightcode#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/SuchitraSwain/nightcode/issues"
|
|
9
|
+
},
|
|
5
10
|
"type": "module",
|
|
6
11
|
"license": "MIT",
|
|
7
12
|
"repository": {
|
|
@@ -9,12 +14,24 @@
|
|
|
9
14
|
"url": "git+https://github.com/SuchitraSwain/nightcode.git",
|
|
10
15
|
"directory": "packages/cli"
|
|
11
16
|
},
|
|
12
|
-
"keywords": [
|
|
17
|
+
"keywords": [
|
|
18
|
+
"nightcode",
|
|
19
|
+
"cli",
|
|
20
|
+
"ai",
|
|
21
|
+
"terminal",
|
|
22
|
+
"coding-agent",
|
|
23
|
+
"bun",
|
|
24
|
+
"opentui",
|
|
25
|
+
"anthropic",
|
|
26
|
+
"claude"
|
|
27
|
+
],
|
|
13
28
|
"bin": {
|
|
14
|
-
"nightcode": "
|
|
29
|
+
"nightcode": "bin/nightcode.cjs"
|
|
15
30
|
},
|
|
16
31
|
"files": [
|
|
32
|
+
"README.md",
|
|
17
33
|
"bin",
|
|
34
|
+
"docs",
|
|
18
35
|
"src",
|
|
19
36
|
"vendor"
|
|
20
37
|
],
|