@tradejs/cli 1.0.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 +65 -0
- package/dist/cli.js +10727 -0
- package/dist/lib/runBot.js +157 -0
- package/dist/scripts/backtest.js +2044 -0
- package/dist/scripts/bot.js +153 -0
- package/dist/scripts/cleanDir.js +40 -0
- package/dist/scripts/cleanRedis.js +40 -0
- package/dist/scripts/cleanTests.js +81 -0
- package/dist/scripts/continuity.js +183 -0
- package/dist/scripts/derivativesIngest.js +107 -0
- package/dist/scripts/derivativesIngestCoinalyzeAll.js +391 -0
- package/dist/scripts/doctor.js +5143 -0
- package/dist/scripts/findMlSignalsByTestSuite.js +83 -0
- package/dist/scripts/infraCommon.js +135 -0
- package/dist/scripts/infraDown.js +82 -0
- package/dist/scripts/infraInit.js +107 -0
- package/dist/scripts/infraUp.js +82 -0
- package/dist/scripts/migration.js +67 -0
- package/dist/scripts/mlExport.js +95 -0
- package/dist/scripts/mlExportSelect.js +100 -0
- package/dist/scripts/mlInspect.js +553 -0
- package/dist/scripts/mlTrainLatestSelect.js +1056 -0
- package/dist/scripts/results.js +1909 -0
- package/dist/scripts/selectStrategy.js +99 -0
- package/dist/scripts/signals.js +300 -0
- package/dist/scripts/test-ml.js +133 -0
- package/dist/scripts/test.js +16 -0
- package/dist/scripts/user-add.js +64 -0
- package/dist/workers/testerWorker.js +54 -0
- package/package.json +75 -0
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @tradejs/cli
|
|
2
|
+
|
|
3
|
+
Official TradeJS command line interface.
|
|
4
|
+
|
|
5
|
+
- Homepage: https://tradejs.dev
|
|
6
|
+
- Documentation: https://docs.tradejs.dev
|
|
7
|
+
- CLI API docs: https://docs.tradejs.dev/api/cli
|
|
8
|
+
- Quickstart: https://docs.tradejs.dev/getting-started/quickstart
|
|
9
|
+
|
|
10
|
+
## Where It Fits
|
|
11
|
+
|
|
12
|
+
`@tradejs/cli` is the operational entrypoint for the standard external TradeJS project flow:
|
|
13
|
+
|
|
14
|
+
- initialize local infra files
|
|
15
|
+
- start/stop Redis + PostgreSQL/Timescale
|
|
16
|
+
- verify runtime dependencies
|
|
17
|
+
- create users
|
|
18
|
+
- run backtests, signals, bots, and ML workflows
|
|
19
|
+
|
|
20
|
+
## Standard External Install Flow
|
|
21
|
+
|
|
22
|
+
For a normal external project with CLI + runtime + UI:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm i @tradejs/app @tradejs/core @tradejs/node @tradejs/types @tradejs/base @tradejs/cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Add `tradejs.config.ts` in project root:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { defineConfig } from '@tradejs/core/config';
|
|
32
|
+
import { basePreset } from '@tradejs/base';
|
|
33
|
+
|
|
34
|
+
export default defineConfig(basePreset);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## First Commands In A Fresh Project
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @tradejs/cli infra-init
|
|
41
|
+
npx @tradejs/cli infra-up
|
|
42
|
+
npx @tradejs/cli doctor
|
|
43
|
+
npx @tradejs/cli user-add -u root -p 'StrongPassword123!'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
After that you can run:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx @tradejs/cli backtest
|
|
50
|
+
npx @tradejs/cli signals
|
|
51
|
+
npx @tradejs/cli results
|
|
52
|
+
npx @tradejs/cli bot
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
And start the UI separately:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx tradejs-app dev
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- `@tradejs/cli` expects project wiring from `tradejs.config.ts` via `@tradejs/core/config`.
|
|
64
|
+
- Local infrastructure is created through `infra-init` and started through `infra-up`.
|
|
65
|
+
- Use `npx @tradejs/cli <command> --help` for command-specific flags.
|