xp-command 1.0.1 → 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 +15 -18
- package/package.json +32 -16
- package/src/config.yml +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
**Quick cockpit commands for X-Plane 12** - set your radios, altimeter, autopilot, and more from the terminal while flying.
|
|
4
4
|
|
|
5
|
+
|  |  |
|
|
6
|
+
| ----------------- | ---------------- |
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
## 🎯 What does this tool do?
|
|
@@ -26,11 +30,7 @@ You need Node.js version 22 or higher installed on your system:
|
|
|
26
30
|
|
|
27
31
|
1. **Download Node.js**: Go to https://nodejs.org/en/download/ and download the **LTS version** (Long Term Support)
|
|
28
32
|
2. **Install**: Run the downloaded installer
|
|
29
|
-
3. **Verify**: Open Terminal and type
|
|
30
|
-
```bash
|
|
31
|
-
node --version
|
|
32
|
-
```
|
|
33
|
-
You should see something like `v22.x.x`
|
|
33
|
+
3. **Verify**: Open Terminal and type `node --version` (you should see something like `v22.x.x`)
|
|
34
34
|
|
|
35
35
|
### Step 2: Install xp-command globally
|
|
36
36
|
|
|
@@ -60,10 +60,7 @@ You shouldn't need to perform any extra setup steps in X-Plane. There is no plug
|
|
|
60
60
|
|
|
61
61
|
1. **Load into an aircraft** in X-Plane 12
|
|
62
62
|
2. **Open Terminal** on your machine
|
|
63
|
-
3. **Run
|
|
64
|
-
```bash
|
|
65
|
-
xp-command
|
|
66
|
-
```
|
|
63
|
+
3. **Run** `xp-command`
|
|
67
64
|
|
|
68
65
|
You'll see a prompt:
|
|
69
66
|
```
|
|
@@ -90,7 +87,7 @@ Type `exit` or press `Ctrl+C`
|
|
|
90
87
|
|
|
91
88
|
All pre-configured commands work well with most aircraft I currently fly, but you may want to adjust them for **your** aircraft (see _Aircraft-specific profiles_ section below).
|
|
92
89
|
|
|
93
|
-
### Barometric
|
|
90
|
+
### Barometric pressure
|
|
94
91
|
|
|
95
92
|
| Command | Action | Example |
|
|
96
93
|
|---------|-----------------------------------------|--------------|
|
|
@@ -148,11 +145,11 @@ You can edit these YAML files to add aircraft-specific commands or modify existi
|
|
|
148
145
|
**Example**: Add a command to set heading with 10-degree increments:
|
|
149
146
|
|
|
150
147
|
```yaml
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
148
|
+
- pattern: "^hdg(\\d{2})$"
|
|
149
|
+
type: set
|
|
150
|
+
dataref: sim/cockpit/autopilot/heading_mag
|
|
151
|
+
transform:
|
|
152
|
+
- mult10
|
|
156
153
|
```
|
|
157
154
|
|
|
158
155
|
**Key components:**
|
|
@@ -161,7 +158,7 @@ You can edit these YAML files to add aircraft-specific commands or modify existi
|
|
|
161
158
|
- `dataref`: X-Plane dataref path (find these in X-Plane's DataRef Editor)
|
|
162
159
|
- `transform`: Optional value conversions (multiply, divide, round, etc.)
|
|
163
160
|
|
|
164
|
-
**Finding datarefs**: Use
|
|
161
|
+
**Finding datarefs**: Use [the DataRefTool plugin](https://datareftool.com) or check [X-Plane datarefs documentation](https://developer.x-plane.com/datarefs/).
|
|
165
162
|
|
|
166
163
|
#### Array Datarefs
|
|
167
164
|
|
|
@@ -266,7 +263,7 @@ npm uninstall -g xp-command
|
|
|
266
263
|
|
|
267
264
|
---
|
|
268
265
|
|
|
269
|
-
##
|
|
266
|
+
## 💡 How it works (technical overview)
|
|
270
267
|
|
|
271
268
|
1. **Web API connection**: Uses [X-Plane local REST Web API](https://developer.x-plane.com/article/x-plane-web-api/)
|
|
272
269
|
2. **Dataref system**: Reads/writes X-Plane datarefs (internal simulator variables)
|
|
@@ -295,4 +292,4 @@ Found a bug or want to add features? Submit issues or pull requests on the [GitH
|
|
|
295
292
|
|
|
296
293
|
---
|
|
297
294
|
|
|
298
|
-
**👋🏻 Happy flying!**
|
|
295
|
+
**👋🏻 Happy flying!**
|
package/package.json
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-command",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Quick cockpit commands for X-Plane 12 - set your radios, altimeter, autopilot, and more from the terminal while flying.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"xplane",
|
|
7
|
+
"x-plane",
|
|
8
|
+
"aviation",
|
|
9
|
+
"cli"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/borisdiakur/xp-command#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/borisdiakur/xp-command/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/borisdiakur/xp-command.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Boris Diakur (https://borisdiakur.de)",
|
|
5
21
|
"type": "module",
|
|
6
22
|
"bin": {
|
|
7
23
|
"xp-command": "./bin/index.js"
|
|
8
24
|
},
|
|
25
|
+
"files": [
|
|
26
|
+
"bin/",
|
|
27
|
+
"src/",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
9
31
|
"scripts": {
|
|
10
32
|
"start": "node bin/index.js",
|
|
11
33
|
"start:clean": "npm run clean && npm start",
|
|
12
34
|
"clean": "rm -rf ~/.xp-command/"
|
|
13
35
|
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@inquirer/core": "^10.3.0",
|
|
38
|
+
"chalk": "^5.6.2",
|
|
39
|
+
"commander": "^14.0.2",
|
|
40
|
+
"conf": "^15.0.2",
|
|
41
|
+
"inquirer": "^12.10.0",
|
|
42
|
+
"js-yaml": "^4.1.0",
|
|
43
|
+
"ora": "^9.0.0"
|
|
44
|
+
},
|
|
14
45
|
"devDependencies": {
|
|
15
46
|
"@types/js-yaml": "^4.0.9",
|
|
16
47
|
"@types/node": "^24.9.2",
|
|
@@ -23,21 +54,6 @@
|
|
|
23
54
|
"typescript": "^5.9.3",
|
|
24
55
|
"typescript-eslint": "^8.46.2"
|
|
25
56
|
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"X-Plane"
|
|
28
|
-
],
|
|
29
|
-
"author": "Boris Diakur (https://borisdiakur.de)",
|
|
30
|
-
"repository": "borisdiakur/xp-command",
|
|
31
|
-
"license": "MIT",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@inquirer/core": "^10.3.0",
|
|
34
|
-
"chalk": "^5.6.2",
|
|
35
|
-
"commander": "^14.0.2",
|
|
36
|
-
"conf": "^15.0.2",
|
|
37
|
-
"inquirer": "^12.10.0",
|
|
38
|
-
"js-yaml": "^4.1.0",
|
|
39
|
-
"ora": "^9.0.0"
|
|
40
|
-
},
|
|
41
57
|
"engines": {
|
|
42
58
|
"node": ">=22"
|
|
43
59
|
}
|