@@ -158,11 +158,135 @@ The software is self-hosted. You keep control of the exchange account, API keys,
158158
159159For additional management options, including Telegram, CLI, and WebUI access, request a manager.
160160
161- ### Documentation
161+ ## Requirements
162+
163+ - Ubuntu 20+ or CentOS 8+ (other Linux distros may work but are not tested)
164+ - Node.js v22.2+
165+ - npm v9+
166+ - MongoDB ([ installation instructions] ( https://www.mongodb.com/docs/manual/administration/install-community/ )
167+
168+ ## Setup
169+
170+ ``` bash
171+ su - adamant
172+ git clone https://github.com/Adamant-im/adamant-tradebot
173+ cd adamant-tradebot
174+ npm i
175+ ```
176+
177+ ## Pre-launch tuning
178+
179+ The bot uses ` config.jsonc ` if present, otherwise ` config.default.jsonc ` .
180+ For named configs, use ` config.<name>.jsonc ` and pass ` <name> ` as a launch argument.
181+
182+ ``` bash
183+ cp config.default.jsonc config.jsonc
184+ nano config.jsonc
185+ ```
186+
187+ Parameter descriptions are in comments inside ` config.jsonc ` .
188+
189+ ## Launching
190+
191+ You can start the bot with ` node app.js ` , but a process manager is recommended.
192+
193+ ### NPM scripts
194+
195+ ``` bash
196+ npm start # config.default.jsonc or config.jsonc
197+ npm run start:config -- < name> # config.<name>.jsonc
198+ npm run start:dev # config.dev.jsonc
199+ npm run clear # clear DB for default config
200+ npm run clear:config -- < name> clear_db # clear DB for config.<name>.jsonc
201+ ```
202+
203+ ### PM2
204+
205+ ``` bash
206+ pm2 start app.js --name tradebot
207+ ```
208+
209+ With a named config:
210+
211+ ``` bash
212+ pm2 start app.js --name tradebot-p2b -- p2b_mmtest
213+ ```
214+
215+ Add the process to ` pm2 startup ` or cron so it restarts on reboot.
216+
217+ ## Updating
218+
219+ ``` bash
220+ su - adamant
221+ cd adamant-tradebot
222+ pm2 stop tradebot
223+ git pull
224+ npm i
225+ ```
226+
227+ If ` config.default.jsonc ` changed, merge new fields into your ` config.jsonc ` .
228+
229+ Then:
230+
231+ ``` bash
232+ pm2 restart tradebot
233+ ```
234+
235+ ## Quick start with ` mm ` CLI
236+
237+ The ` mm ` command simplifies install, configuration, and day-to-day operation. It works in ** npm/local** mode and ** Docker Compose** mode.
238+
239+ ### Install via npm
240+
241+ ``` bash
242+ npm install -g adamant-tradebot
243+ mkdir my-bot && cd my-bot
244+ mm init
245+ mm doctor
246+ mm on
247+ mm status
248+ ```
249+
250+ Both ` mm ` and ` adamant-tradebot ` are available as CLI aliases.
251+
252+ ### Install via Docker Compose
253+
254+ ``` bash
255+ git clone https://github.com/Adamant-im/adamant-tradebot
256+ cd adamant-tradebot
257+ ./mm init
258+ ./mm doctor
259+ ./mm on
260+ ./mm status
261+ ```
262+
263+ The stack runs ` mm-app ` and MongoDB (` mongo:8 ` ). User data is stored in ` ./docker/config ` , ` ./docker/trade-config ` , and ` ./docker/logs ` (gitignored).
264+
265+ ### Command reference
266+
267+ | Command | Description |
268+ | --- | --- |
269+ | ` mm init ` | Interactive first-time setup wizard |
270+ | ` mm on ` | Start the bot (preflight ` doctor ` , no duplicate instance) |
271+ | ` mm off ` | Stop the bot (` --all ` also stops MongoDB in Docker) |
272+ | ` mm restart ` | Restart the bot |
273+ | ` mm status ` | Installation, process, and health summary (` --json ` , ` --short ` ) |
274+ | ` mm config ` | View or change config parameters (` --edit ` , ` --restart ` ) |
275+ | ` mm doctor ` | Diagnose config, MongoDB, exchange API, and runtime |
276+ | ` mm logs ` | Show logs (` -f ` , ` --tail ` , ` --since ` , ` --level ` , ` --grep ` ) |
277+ | ` mm update ` | Update the app without touching user config (` --check ` ) |
278+
279+ Use ` --mode npm ` or ` --mode docker ` when auto-detection is ambiguous.
280+
281+ ## Documentation
162282
163283- [ Installation and usage guide] ( https://marketmaking.app/cex-mm/installation/ )
164284- [ Command reference] ( https://marketmaking.app/cex-mm/command-reference/ )
165285
286+ ## Tests & Developer tools
287+
288+ See [ CONTRIBUTING.md — Tests] ( CONTRIBUTING.md#tests ) for Jest suites, interactive simulators, and live exchange scripts.
289+
166290## Contact
167291
168292Want to try it for your token project or request exchange support?
0 commit comments