Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srbrahma/bitburner
https://github.com/srbrahma/bitburner
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/srbrahma/bitburner
- Owner: SrBrahma
- Created: 2023-12-06T22:35:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-16T17:24:20.000Z (10 months ago)
- Last Synced: 2024-10-12T17:42:11.310Z (3 months ago)
- Language: TypeScript
- Size: 318 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## About
My codes for [BitBurner](https://store.steampowered.com/app/1812820/Bitburner/) that I have some fun with in my spare time. Still WIP.
## Quick start
- Do the following steps https://github.com/bitburner-official/typescript-template/blob/main/BeginnersGuide.md. Instead of downloading the linked template, download this repo you are reading now!
## [src/scripts/lib/program.ts](https://github.com/SrBrahma/bitburner/blob/main/src/scripts/lib/program/program.ts)
This is a util function that quickly creates a CLI program with typed arguments and options support and returns the `main` and `autocomplete` functions, consumed by BitBurner.
Your programs will automatically have `--help` options that will print its description, arguments, and options like this example, present in its [test file](https://github.com/SrBrahma/bitburner/blob/main/src/scripts/lib/program/program.test.ts):
```bash
This is a cool program that does cool stuff.Usage: $SCRIPT_NAME [options]
Arguments:
source The path of the file you are copying.
destination The path where the file should be copied to.Options:
--name, -n Some cool description.
--value, -v An even cooler description.
--help, -h Display the help.
```