Skip to content

Commit 9d30bde

Browse files
committed
chore: add README, LICENSE, and CI workflow
1 parent e4d8b09 commit 9d30bde

4 files changed

Lines changed: 133 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version-file: go.mod
17+
18+
- name: gofmt
19+
run: |
20+
diff <(gofmt -l .) <(printf "")
21+
22+
- name: go vet
23+
run: go vet ./...
24+
25+
- name: go build
26+
run: go build ./...
27+
28+
- name: go test
29+
run: go test ./...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/forgebit-cli
22
/forgebit
33
/dist/
4+
.DS_Store

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Boone Studios, LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# forgebit-cli
2+
3+
A standalone CLI for [Forgebit](https://forgebit.io) — issue, verify, and manage software licenses from the terminal, with fully offline signature verification for supported license types.
4+
5+
> Pre-release. No tagged versions or prebuilt binaries yet — see [CHANGELOG.md](CHANGELOG.md).
6+
7+
## Install
8+
9+
Requires Go 1.26+.
10+
11+
```
12+
git clone git@github.com:boone-studios/forgebit-cli.git
13+
cd forgebit-cli
14+
go build -o forgebit .
15+
```
16+
17+
Move the resulting `forgebit` binary onto your `PATH`.
18+
19+
## Getting started
20+
21+
```
22+
forgebit login
23+
```
24+
25+
Prints a short code, opens your browser to approve the request, and stores a vendor-scoped API key locally (`~/.config/forgebit/config.json` or your OS equivalent). No password ever touches the CLI.
26+
27+
```
28+
forgebit status
29+
```
30+
31+
Reports whether the CLI is authenticated against the live API or running offline.
32+
33+
## Multiple vendors
34+
35+
If you operate more than one vendor account, run `forgebit login` again for each — the CLI stores one credential per vendor and switches instantly with no re-authentication:
36+
37+
```
38+
forgebit vendor list # see everything you're logged into
39+
forgebit vendor switch <id|name> # change the default for future commands
40+
forgebit licenses list --vendor <id|name> # target one vendor for a single call
41+
```
42+
43+
`--vendor` never lets the CLI act as a vendor it doesn't already hold a credential for — it only selects among ones you've logged into.
44+
45+
## Licenses
46+
47+
```
48+
forgebit licenses issue --product-id <id> --customer-email you@example.com \
49+
--tier pro --duration-type trial --license-type jwt
50+
51+
forgebit licenses list
52+
forgebit licenses show <license-id>
53+
forgebit licenses verify <key>
54+
forgebit licenses revoke <license-id> --reason "chargeback"
55+
forgebit licenses renew <license-id> --duration 30_days
56+
```
57+
58+
Every `licenses` command accepts `--json` for scripting.
59+
60+
### Offline verification
61+
62+
`jwt` and `forgebit`-type keys are signed with the vendor's Ed25519 key and can be verified with zero network calls — useful for embedding in a product's own license check:
63+
64+
```
65+
forgebit licenses public-key --vendor-id <id> --out vendor.pem
66+
forgebit licenses verify <key> --offline --public-key vendor.pem
67+
```
68+
69+
`serial`, `hmac`, `hwid`, and `encfile`-type keys aren't self-describing and still require the online check.
70+
71+
## Development
72+
73+
```
74+
go build ./...
75+
go vet ./...
76+
go test ./...
77+
gofmt -l .
78+
```
79+
80+
## License
81+
82+
[MIT](LICENSE)

0 commit comments

Comments
 (0)