https://github.com/ftzi/bitburner
https://github.com/ftzi/bitburner
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ftzi/bitburner
- Owner: ftzi
- Created: 2023-12-06T22:35:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T17:24:20.000Z (about 2 years ago)
- Last Synced: 2025-05-07T03:37:55.741Z (about 1 year ago)
- Language: TypeScript
- Size: 318 KB
- Stars: 0
- 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.
```