fastpass-cli 0.2.3 → 0.2.5
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/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastpass-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Cloudflare Access in 60 seconds.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"fastpass-cli": "./bin/fastpass.js"
|
|
7
|
+
"fastpass-cli": "./bin/fastpass-cli.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
11
|
-
"src/"
|
|
12
|
-
"skill/"
|
|
11
|
+
"src/"
|
|
13
12
|
],
|
|
14
13
|
"keywords": [
|
|
15
14
|
"cloudflare",
|
package/src/cli.js
CHANGED
package/src/commands/list.js
CHANGED
|
@@ -14,7 +14,7 @@ export async function list(api) {
|
|
|
14
14
|
|
|
15
15
|
if (!result?.length) {
|
|
16
16
|
console.log(pc.dim('\n No Access applications found.\n'));
|
|
17
|
-
console.log(` Run ${pc.cyan('fastpass protect <domain>')} to get started.\n`);
|
|
17
|
+
console.log(` Run ${pc.cyan('fastpass-cli protect <domain>')} to get started.\n`);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
|
package/src/commands/protect.js
CHANGED
|
@@ -39,8 +39,8 @@ export async function protect(api, opts = {}) {
|
|
|
39
39
|
const existing = await checkExistingApp(api, domain.trim());
|
|
40
40
|
if (existing) {
|
|
41
41
|
console.log(`\n ${pc.yellow('This domain is already protected by Access.')}\n`);
|
|
42
|
-
console.log(` Run ${pc.cyan(`fastpass inspect ${domain.trim()}`)} to view its configuration.`);
|
|
43
|
-
console.log(` Run ${pc.cyan(`fastpass remove ${domain.trim()}`)} to remove it first.\n`);
|
|
42
|
+
console.log(` Run ${pc.cyan(`fastpass-cli inspect ${domain.trim()}`)} to view its configuration.`);
|
|
43
|
+
console.log(` Run ${pc.cyan(`fastpass-cli remove ${domain.trim()}`)} to remove it first.\n`);
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -135,8 +135,8 @@ export async function protect(api, opts = {}) {
|
|
|
135
135
|
s.fail(`Failed to create Access application for ${pc.bold(domain.trim())}`);
|
|
136
136
|
if (err instanceof ApiError && err.message.includes('application_already_exists')) {
|
|
137
137
|
console.log(`\n ${pc.yellow('This domain is already protected by Access.')}\n`);
|
|
138
|
-
console.log(` Run ${pc.cyan(`fastpass inspect ${domain.trim()}`)} to view its configuration.`);
|
|
139
|
-
console.log(` Run ${pc.cyan(`fastpass remove ${domain.trim()}`)} to remove it first.\n`);
|
|
138
|
+
console.log(` Run ${pc.cyan(`fastpass-cli inspect ${domain.trim()}`)} to view its configuration.`);
|
|
139
|
+
console.log(` Run ${pc.cyan(`fastpass-cli remove ${domain.trim()}`)} to remove it first.\n`);
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
throw err;
|
package/skill/fastpass-skill.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fastpass
|
|
3
|
-
description: Protect a domain with Cloudflare Access — interactive or one-liner
|
|
4
|
-
user_invocable: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# fastpass: Cloudflare Access for Humans
|
|
8
|
-
|
|
9
|
-
You are helping the user set up Cloudflare Access on their domain using the `fastpass` CLI tool.
|
|
10
|
-
|
|
11
|
-
## What you can do
|
|
12
|
-
|
|
13
|
-
- **Protect a domain** with a login page (email code, GitHub, or Google)
|
|
14
|
-
- **List** currently protected domains
|
|
15
|
-
- **Remove** protection from a domain
|
|
16
|
-
- **Status** — overview dashboard of team, apps, IdPs, and recent activity
|
|
17
|
-
- **Logs** — view recent access events, optionally filtered by domain
|
|
18
|
-
- **Inspect** — deep dive into a specific app's configuration and policies
|
|
19
|
-
|
|
20
|
-
## How to use
|
|
21
|
-
|
|
22
|
-
### Interactive mode
|
|
23
|
-
Run the wizard and let the user answer prompts:
|
|
24
|
-
```bash
|
|
25
|
-
npx fastpass-cli
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### One-liner mode
|
|
29
|
-
If the user has already told you the domain, auth method, and who should have access:
|
|
30
|
-
```bash
|
|
31
|
-
npx fastpass-cli protect <domain> --auth <email|github|google> --allow "<rule>"
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Allow rules:
|
|
35
|
-
- `"me@email.com"` — specific email(s), comma-separated
|
|
36
|
-
- `"*@company.com"` — anyone with that email domain
|
|
37
|
-
- `"org:my-github-org"` — members of a GitHub organization (use with `--auth github`)
|
|
38
|
-
- `"everyone"` — just require login, allow all
|
|
39
|
-
|
|
40
|
-
### List protected domains
|
|
41
|
-
```bash
|
|
42
|
-
npx fastpass-cli list
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Remove protection
|
|
46
|
-
```bash
|
|
47
|
-
npx fastpass-cli remove <domain>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Status dashboard
|
|
51
|
-
```bash
|
|
52
|
-
npx fastpass-cli status
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### View recent access logs
|
|
56
|
-
```bash
|
|
57
|
-
npx fastpass-cli logs [domain] --limit 25 --since 2025-01-15
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Options:
|
|
61
|
-
- `[domain]` — optional, filter events to a specific domain
|
|
62
|
-
- `--limit <n>` — number of events (default 25)
|
|
63
|
-
- `--since <date>` — only events after this date (ISO 8601)
|
|
64
|
-
|
|
65
|
-
### Inspect app configuration
|
|
66
|
-
```bash
|
|
67
|
-
npx fastpass-cli inspect [domain]
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
If no domain is provided, shows an interactive picker. Displays: domain, type, session duration, allowed identity providers (resolved to names), and policy rules translated to plain English.
|
|
71
|
-
|
|
72
|
-
## Prerequisites
|
|
73
|
-
|
|
74
|
-
The user needs Cloudflare credentials. Check if they have either:
|
|
75
|
-
1. `CLOUDFLARE_API_TOKEN` env var set, OR
|
|
76
|
-
2. `npx wrangler login` already done
|
|
77
|
-
|
|
78
|
-
If not, help them create an API token at https://dash.cloudflare.com/profile/api-tokens with:
|
|
79
|
-
- Access: Organizations, Identity Providers, and Groups — Edit
|
|
80
|
-
- Access: Apps and Policies — Edit
|
|
81
|
-
- Zone: Zone — Read
|
|
82
|
-
|
|
83
|
-
## Conversational flow
|
|
84
|
-
|
|
85
|
-
When the user asks to protect a domain, gather these three things:
|
|
86
|
-
1. **Domain** — what domain to protect (must be in their CF account)
|
|
87
|
-
2. **Auth method** — email (easiest), github, or google
|
|
88
|
-
3. **Access rule** — who should be allowed in
|
|
89
|
-
|
|
90
|
-
Then construct and run the appropriate `npx fastpass-cli` command.
|
|
91
|
-
|
|
92
|
-
If the user is unsure, recommend **email** auth — it requires zero external setup.
|
|
File without changes
|