experimental-cli/README.md

85 lines
3.2 KiB
Markdown
Raw Normal View History

2020-08-02 18:59:32 +00:00
# Pigeon CLI
A single executable to manage a Pigeon node.
2020-08-11 12:25:45 +00:00
# Project Status
Don't use the Go version yet. If you want something stable, there is a [Ruby version that is feature complete](https://tildegit.org/PigeonProtocolConsortium/Pigeon-Ruby).
2020-08-11 12:25:45 +00:00
2020-09-11 12:12:51 +00:00
# Setup
By default, data is stored in `~/.pigeon`.
You can override this value by specifying a `PIGEON_PATH` ENV var.
2020-10-05 13:07:43 +00:00
# Help Wanted
Want to get involved? Below are a few things I need help with.
Email `contact@vaporsoft.xyz` if you have any questions.
2020-10-05 13:07:43 +00:00
* Writing a BNF grammar for message parsing
* Test coverage increases
* Manual QA of features and edge cases
* Providing constructive feedback on documentation
2020-10-05 13:07:43 +00:00
* Cross-compiling windows binaries
* Security auditing and vulnerability discovery. Please send security concerns to `contact@vaporsoft.xyz` privately.
2020-10-05 13:07:43 +00:00
2020-08-11 12:25:45 +00:00
# TODO
2020-08-10 12:19:20 +00:00
2020-11-08 21:34:29 +00:00
- [ ] Add forgery protection tests
2020-08-19 12:36:37 +00:00
- [ ] Add a real testing lib to DRY things up.
2020-11-08 21:34:29 +00:00
- [ ] Validate and scrutinize `depth`, `prev` fields when ingesting message bundles to account for poorly written peer clients.
2020-09-01 12:52:44 +00:00
- [ ] Get a good CI system going? Run tests at PR time, provide prebuilt binaries, prevent coverage slips, etc..
2020-09-28 00:15:00 +00:00
- [ ] Add a `transact()` helper to ensure all transactions are closed out.
2020-09-28 00:56:55 +00:00
- [ ] Switch to [SQLX](https://github.com/jmoiron/sqlx) for extra sanity.
- [ ] Write docs for all CLI commands / args AFTER completion.
- [ ] Start using the `check` helper instead of `error != nil`.
- [ ] Update spec to only allow UPPERCASE MULTIHASHES
- [ ] Implement `query.pgn` protocol, as outlined [here](%CSBzyskUxqbFSgOBh8OkVLn18NqX3zu3CF58mm2JHok=.sha256) and [here](%KWETmo1cmlfYK4N6FVL9BHYfFcKMy49E94XGuZSPGCw=.sha256).
- [ ] Add a note about "shallow" vs. "deep" verification.
- [ ] Finish all the things below
2020-10-19 12:33:20 +00:00
|Done?|Noun |Verb | Flag / arg 1 | Flag 2 |
|-----|------------|-----------|---------------|-----------|
2020-10-04 20:19:28 +00:00
| |bundle |ingest | | |
| |message |show | message mhash | |
| |message |find | --all | |
2020-10-19 12:33:20 +00:00
| |blob |remove | mhash | |
2020-10-04 20:19:28 +00:00
| |message |find | --last | |
| |draft |create | | |
| |draft |publish | | |
| |draft |show | | |
| |draft |update | --key=? | --value=? |
| |bundle |create | | |
| X |blob |find | | |
2020-09-30 12:56:20 +00:00
| X |blob |add | file path | |
| X |blob |add | STDIO pipe | |
2020-09-28 01:21:49 +00:00
| X |peer |untrack | peer mhash | |
| X |peers |list | | |
| X |peer |block | peer mhash | |
| X |peer |follow | peer mhash | |
| X |identity |show | | |
| X |identity |create | | |
| X |help | | | |
| X |version | | | |
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
# Run Tests
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
Without coverage:
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
```
./tests.sh
2020-08-11 12:25:45 +00:00
```
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
With coverage:
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
```
./coverage.sh
2020-08-11 12:25:45 +00:00
```
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
# Build Project
2020-08-10 12:19:20 +00:00
2020-08-11 12:25:45 +00:00
```
2020-09-10 12:33:41 +00:00
./build.sh
2020-08-11 12:25:45 +00:00
```