fcemail 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +90 -0
- package/.goreleaser.yaml +83 -0
- package/LICENSE +21 -0
- package/README.md +226 -0
- package/bin/fce +0 -0
- package/cmd/root.go +678 -0
- package/go.mod +26 -0
- package/go.sum +49 -0
- package/internal/api/client.go +197 -0
- package/internal/auth/auth.go +204 -0
- package/internal/config/config.go +112 -0
- package/internal/display/logo.go +242 -0
- package/internal/ws/watch.go +144 -0
- package/logo.webp +0 -0
- package/main.go +7 -0
- package/package.json +17 -0
- package/scripts/install-binary.js +11 -0
- package/scripts/install.sh +65 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
goreleaser:
|
|
13
|
+
runs-on: windows-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
|
|
20
|
+
- name: Set up Go
|
|
21
|
+
uses: actions/setup-go@v5
|
|
22
|
+
with:
|
|
23
|
+
go-version: '1.22'
|
|
24
|
+
|
|
25
|
+
- name: Run GoReleaser
|
|
26
|
+
uses: goreleaser/goreleaser-action@v6
|
|
27
|
+
continue-on-error: true
|
|
28
|
+
with:
|
|
29
|
+
distribution: goreleaser
|
|
30
|
+
version: latest
|
|
31
|
+
args: release --clean
|
|
32
|
+
env:
|
|
33
|
+
GITHUB_TOKEN: ${{ secrets.GORELEASER_PAT || secrets.GITHUB_TOKEN }}
|
|
34
|
+
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
|
|
35
|
+
|
|
36
|
+
publish-npm:
|
|
37
|
+
needs: goreleaser
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- name: Checkout
|
|
41
|
+
uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Set up Node
|
|
44
|
+
uses: actions/setup-node@v4
|
|
45
|
+
with:
|
|
46
|
+
node-version: '20'
|
|
47
|
+
registry-url: 'https://registry.npmjs.org'
|
|
48
|
+
|
|
49
|
+
- name: Publish to NPM
|
|
50
|
+
run: |
|
|
51
|
+
VERSION=${GITHUB_REF#refs/tags/v}
|
|
52
|
+
cat <<EOF > package.json
|
|
53
|
+
{
|
|
54
|
+
"name": "fcemail",
|
|
55
|
+
"version": "${VERSION}",
|
|
56
|
+
"description": "FreeCustom.Email CLI — Manage disposable inboxes from your terminal.",
|
|
57
|
+
"bin": {
|
|
58
|
+
"fce": "bin/fce"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"postinstall": "node scripts/install-binary.js"
|
|
62
|
+
},
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "git+https://github.com/DishIs/fce-cli.git"
|
|
66
|
+
},
|
|
67
|
+
"author": "DishIs",
|
|
68
|
+
"license": "MIT"
|
|
69
|
+
}
|
|
70
|
+
EOF
|
|
71
|
+
# Create a minimal install script for NPM users
|
|
72
|
+
mkdir -p bin
|
|
73
|
+
touch bin/fce
|
|
74
|
+
mkdir -p scripts
|
|
75
|
+
cat <<EOF > scripts/install-binary.js
|
|
76
|
+
const { execSync } = require('child_process');
|
|
77
|
+
const fs = require('fs');
|
|
78
|
+
const path = require('path');
|
|
79
|
+
|
|
80
|
+
console.log('Downloading fce-cli binary...');
|
|
81
|
+
try {
|
|
82
|
+
execSync('curl -fsSL https://raw.githubusercontent.com/DishIs/fce-cli/main/scripts/install.sh | BIN_DIR=./bin sh');
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error('Failed to download binary:', err.message);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
EOF
|
|
88
|
+
npm publish --access public
|
|
89
|
+
env:
|
|
90
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.goreleaser.yaml
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# .goreleaser.yaml
|
|
2
|
+
version: 2
|
|
3
|
+
project_name: fce
|
|
4
|
+
|
|
5
|
+
before:
|
|
6
|
+
hooks:
|
|
7
|
+
- go mod tidy
|
|
8
|
+
|
|
9
|
+
builds:
|
|
10
|
+
- id: fce
|
|
11
|
+
binary: fce
|
|
12
|
+
env:
|
|
13
|
+
- CGO_ENABLED=0
|
|
14
|
+
goos:
|
|
15
|
+
- linux
|
|
16
|
+
- windows
|
|
17
|
+
- darwin
|
|
18
|
+
goarch:
|
|
19
|
+
- amd64
|
|
20
|
+
- arm64
|
|
21
|
+
ldflags:
|
|
22
|
+
- -s -w -X github.com/DishIs/fce-cli/cmd.Version={{.Version}} -X github.com/DishIs/fce-cli/cmd.Commit={{.Commit}} -X github.com/DishIs/fce-cli/cmd.Date={{.Date}}
|
|
23
|
+
|
|
24
|
+
archives:
|
|
25
|
+
- id: fce
|
|
26
|
+
formats:
|
|
27
|
+
- tar.gz
|
|
28
|
+
# use zip for windows archives
|
|
29
|
+
format_overrides:
|
|
30
|
+
- goos: windows
|
|
31
|
+
formats:
|
|
32
|
+
- zip
|
|
33
|
+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
34
|
+
|
|
35
|
+
checksum:
|
|
36
|
+
name_template: 'checksums.txt'
|
|
37
|
+
|
|
38
|
+
snapshot:
|
|
39
|
+
version_template: "{{ incpatch .Version }}-next"
|
|
40
|
+
|
|
41
|
+
changelog:
|
|
42
|
+
sort: asc
|
|
43
|
+
filters:
|
|
44
|
+
exclude:
|
|
45
|
+
- '^docs:'
|
|
46
|
+
- '^test:'
|
|
47
|
+
|
|
48
|
+
brews:
|
|
49
|
+
- name: fce
|
|
50
|
+
repository:
|
|
51
|
+
owner: DishIs
|
|
52
|
+
name: homebrew-tap
|
|
53
|
+
homepage: "https://github.com/DishIs/fce-cli"
|
|
54
|
+
description: "FreeCustom.Email CLI — Manage disposable inboxes from your terminal."
|
|
55
|
+
install: |
|
|
56
|
+
bin.install "fce"
|
|
57
|
+
|
|
58
|
+
scoops:
|
|
59
|
+
- name: fce
|
|
60
|
+
repository:
|
|
61
|
+
owner: DishIs
|
|
62
|
+
name: scoop-bucket
|
|
63
|
+
homepage: "https://github.com/DishIs/fce-cli"
|
|
64
|
+
description: "FreeCustom.Email CLI — Manage disposable inboxes from your terminal."
|
|
65
|
+
license: MIT
|
|
66
|
+
|
|
67
|
+
chocolateys:
|
|
68
|
+
- name: fce
|
|
69
|
+
owners: DishIs
|
|
70
|
+
authors: DishIs
|
|
71
|
+
title: "FreeCustom.Email CLI"
|
|
72
|
+
description: "Manage disposable inboxes, extract OTPs, and stream real-time email events from your terminal."
|
|
73
|
+
summary: "FreeCustom.Email CLI — Disposable Email API"
|
|
74
|
+
project_url: "https://github.com/DishIs/fce-cli"
|
|
75
|
+
icon_url: "https://github.com/DishIs/fce-cli/logo.webp"
|
|
76
|
+
license_url: "https://github.com/DishIs/fce-cli/blob/main/LICENSE"
|
|
77
|
+
docs_url: "https://github.com/DishIs/fce-cli/blob/main/README.md"
|
|
78
|
+
bug_tracker_url: "https://github.com/DishIs/fce-cli/issues"
|
|
79
|
+
package_source_url: "https://github.com/DishIs/fce-cli"
|
|
80
|
+
project_source_url: "https://github.com/DishIs/fce-cli"
|
|
81
|
+
release_notes: "https://github.com/DishIs/fce-cli/releases/tag/{{ .Tag }}"
|
|
82
|
+
tags: "cli email disposable-email otp websocket"
|
|
83
|
+
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 FreeCustom.Email
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# fce — FreeCustom.Email CLI
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
______ _____ _ _____ _ _
|
|
5
|
+
| ___| / __ \ | | | ___| (_) |
|
|
6
|
+
| |_ _ __ ___ ___| / \/_ _ ___| |_ ___ _ __ ___ | |__ _ __ ___ __ _ _| |
|
|
7
|
+
| _| '__/ _ \/ _ \ | | | | / __| __/ _ \| '_ ` _ \ | __| '_ ` _ \ / _` | | |
|
|
8
|
+
| | | | | __/ __/ \__/\ |_| \__ \ || (_) | | | | | |_| |__| | | | | | (_| | | |
|
|
9
|
+
\_| |_| \___|\___|\____/\__,_|___/\__\___/|_| |_| |_(_)____/_| |_| |_|\__,_|_|_|
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
FreeCustom.Email
|
|
13
|
+
disposable inbox API
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Manage disposable inboxes, extract OTPs, and stream real-time email events from your terminal — in under 30 seconds.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
curl -fsSL freecustom.email/install.sh | sh
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
*(Or use your preferred package manager below)*
|
|
27
|
+
|
|
28
|
+
**macOS/Linux (Homebrew)**
|
|
29
|
+
```bash
|
|
30
|
+
brew tap DishIs/homebrew-tap
|
|
31
|
+
brew install fce
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Windows (Scoop)**
|
|
35
|
+
```powershell
|
|
36
|
+
scoop bucket add fce https://github.com/DishIs/scoop-bucket
|
|
37
|
+
scoop install fce
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Windows (Chocolatey)**
|
|
41
|
+
```powershell
|
|
42
|
+
choco install fce
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Shell Script (macOS/Linux)**
|
|
46
|
+
```bash
|
|
47
|
+
curl -sSfL https://raw.githubusercontent.com/DishIs/fce-cli/main/scripts/install.sh | sh
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Go install**
|
|
51
|
+
```bash
|
|
52
|
+
go install github.com/DishIs/fce-cli@latest
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Update
|
|
58
|
+
|
|
59
|
+
When a new version is released, you can update the CLI using your package manager:
|
|
60
|
+
|
|
61
|
+
**Homebrew**
|
|
62
|
+
```bash
|
|
63
|
+
brew update
|
|
64
|
+
brew upgrade fce
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Scoop**
|
|
68
|
+
```powershell
|
|
69
|
+
scoop update fce
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Chocolatey**
|
|
73
|
+
```powershell
|
|
74
|
+
choco upgrade fce
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**NPM**
|
|
78
|
+
```bash
|
|
79
|
+
npm install -g fcemail@latest
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Shell Script**
|
|
83
|
+
Simply re-run the installation command or use the built-in update:
|
|
84
|
+
```bash
|
|
85
|
+
fce update
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Uninstall
|
|
91
|
+
|
|
92
|
+
To remove the CLI and all local configuration:
|
|
93
|
+
|
|
94
|
+
1. **Clear Config & Credentials**
|
|
95
|
+
```bash
|
|
96
|
+
fce uninstall
|
|
97
|
+
```
|
|
98
|
+
*(This clears your API key and local cache)*
|
|
99
|
+
|
|
100
|
+
2. **Remove the Binary**
|
|
101
|
+
- **Homebrew**: `brew uninstall fce`
|
|
102
|
+
- **Scoop**: `scoop uninstall fce`
|
|
103
|
+
- **Choco**: `choco uninstall fce`
|
|
104
|
+
- **NPM**: `npm uninstall -g fcemail`
|
|
105
|
+
- **Manual**: `sudo rm /usr/local/bin/fce`
|
|
106
|
+
|
|
107
|
+
Or download a binary from [Releases](https://github.com/DishIs/fce-cli/releases).
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Quick start
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# 1. Login — opens your browser
|
|
115
|
+
fce login
|
|
116
|
+
|
|
117
|
+
# 2. Watch a random inbox for emails in real time
|
|
118
|
+
fce watch random
|
|
119
|
+
|
|
120
|
+
# 3. Or watch a specific one
|
|
121
|
+
fce watch mytest@ditmail.info
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Commands
|
|
127
|
+
|
|
128
|
+
| Command | Description | Plan required |
|
|
129
|
+
|---------|-------------|---------------|
|
|
130
|
+
| `fce login` | Authenticate via browser | Any |
|
|
131
|
+
| `fce logout` | Remove stored credentials | Any |
|
|
132
|
+
| `fce status` | Account info, plan, inbox counts | Any |
|
|
133
|
+
| `fce usage` | Request usage for current period | Any |
|
|
134
|
+
| `fce inbox list` | List registered inboxes | Any |
|
|
135
|
+
| `fce inbox add <addr>` | Register a new inbox | Any |
|
|
136
|
+
| `fce inbox add random` | Register a random inbox | Any |
|
|
137
|
+
| `fce inbox remove <addr>` | Unregister an inbox | Any |
|
|
138
|
+
| `fce messages <inbox>` | List messages in an inbox | Any |
|
|
139
|
+
| `fce domains` | List available domains | Any |
|
|
140
|
+
| `fce watch [inbox\|random]` | Stream emails via WebSocket | **Startup+** |
|
|
141
|
+
| `fce otp <inbox>` | Get latest OTP from an inbox | **Growth+** |
|
|
142
|
+
|
|
143
|
+
### Examples
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Register + watch a random inbox
|
|
147
|
+
fce inbox add random
|
|
148
|
+
fce watch random
|
|
149
|
+
|
|
150
|
+
# Watch a specific inbox (Startup plan+)
|
|
151
|
+
fce watch alerts@ditmail.info
|
|
152
|
+
|
|
153
|
+
# Get the latest OTP (Growth plan+)
|
|
154
|
+
fce otp mytest@ditmail.info
|
|
155
|
+
|
|
156
|
+
# Check quota
|
|
157
|
+
fce usage
|
|
158
|
+
|
|
159
|
+
# List all your inboxes
|
|
160
|
+
fce inbox ls
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Authentication
|
|
166
|
+
|
|
167
|
+
`fce login` opens your browser to `www.freecustom.email`. Sign in with GitHub, Google, or a magic link — a new API key is created and stored securely in your OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service / libsecret).
|
|
168
|
+
|
|
169
|
+
You can also set the `FCE_API_KEY` environment variable to skip the keychain entirely — useful in CI:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
export FCE_API_KEY=fce_your_key_here
|
|
173
|
+
fce status
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Plan limits
|
|
179
|
+
|
|
180
|
+
| Feature | Free | Developer | Startup | Growth | Enterprise |
|
|
181
|
+
|---------|------|-----------|---------|--------|------------|
|
|
182
|
+
| All basic commands | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
183
|
+
| `fce watch` (WebSocket) | ✗ | ✗ | ✓ | ✓ | ✓ |
|
|
184
|
+
| `fce otp` | ✗ | ✗ | ✗ | ✓ | ✓ |
|
|
185
|
+
|
|
186
|
+
Upgrade at: https://www.freecustom.email/api/pricing
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Build from source
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
git clone https://github.com/DishIs/fce-cli
|
|
194
|
+
cd fce
|
|
195
|
+
go build -o fce .
|
|
196
|
+
./fce --help
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Cross-platform release build** (requires [goreleaser](https://goreleaser.com)):
|
|
200
|
+
```bash
|
|
201
|
+
goreleaser build --clean --snapshot
|
|
202
|
+
# Binaries in dist/
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## CI usage
|
|
208
|
+
|
|
209
|
+
```yaml
|
|
210
|
+
# GitHub Actions example
|
|
211
|
+
- name: Get OTP
|
|
212
|
+
env:
|
|
213
|
+
FCE_API_KEY: ${{ secrets.FCE_API_KEY }}
|
|
214
|
+
run: |
|
|
215
|
+
fce inbox add random > /tmp/inbox.txt
|
|
216
|
+
INBOX=$(cat /tmp/inbox.txt | grep -o '[a-z0-9@.]*')
|
|
217
|
+
# trigger your app to send email to $INBOX
|
|
218
|
+
OTP=$(fce otp $INBOX)
|
|
219
|
+
echo "OTP: $OTP"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
MIT © FreeCustom.Email
|
package/bin/fce
ADDED
|
File without changes
|