@telebort/question-banks-cli 1.0.0

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/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @telebort/exit-tickets-cli
2
+
3
+ CLI tool for the Exit Tickets API - authentication, API key management, usage tracking, and billing.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @telebort/exit-tickets-cli
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Authenticate
15
+ exit-tickets login
16
+
17
+ # Check your account
18
+ exit-tickets whoami
19
+
20
+ # View usage
21
+ exit-tickets usage
22
+
23
+ # Manage API keys
24
+ exit-tickets api-keys list
25
+ exit-tickets api-keys create --name "Production" --mode live
26
+
27
+ # Manage billing
28
+ exit-tickets billing
29
+ ```
30
+
31
+ ## Commands
32
+
33
+ ### Authentication
34
+
35
+ | Command | Description |
36
+ |---------|-------------|
37
+ | `exit-tickets login` | Authenticate with Exit Tickets API |
38
+ | `exit-tickets logout` | Clear local authentication tokens |
39
+ | `exit-tickets whoami` | Display current account information |
40
+
41
+ ### API Keys
42
+
43
+ | Command | Description |
44
+ |---------|-------------|
45
+ | `exit-tickets api-keys list` | List all API keys |
46
+ | `exit-tickets api-keys create` | Create a new API key |
47
+ | `exit-tickets api-keys revoke <id>` | Revoke an API key |
48
+ | `exit-tickets api-keys rotate <id>` | Rotate an API key |
49
+
50
+ ### Usage & Billing
51
+
52
+ | Command | Description |
53
+ |---------|-------------|
54
+ | `exit-tickets usage` | Display API usage statistics |
55
+ | `exit-tickets billing` | Open Stripe Customer Portal |
56
+
57
+ ### Local Validation
58
+
59
+ | Command | Description |
60
+ |---------|-------------|
61
+ | `exit-tickets validate <file>` | Validate a question JSON file locally |
62
+
63
+ ## API Key Modes
64
+
65
+ - **Test keys** (`sk_test_...`): For development, don't count against quota
66
+ - **Live keys** (`sk_live_...`): For production, count against quota
67
+
68
+ ## Configuration
69
+
70
+ Configuration is stored in `~/.exit-tickets/`:
71
+
72
+ - `tokens.json` - Authentication tokens (secure, 0600 permissions)
73
+ - `config.json` - User preferences
74
+
75
+ ## Environment Variables
76
+
77
+ | Variable | Description |
78
+ |----------|-------------|
79
+ | `EXIT_TICKETS_API_URL` | Override API base URL |
80
+ | `DEBUG` | Enable debug mode for verbose output |
81
+
82
+ ## Pricing Tiers
83
+
84
+ | Tier | Price | Daily Limit | Features |
85
+ |------|-------|-------------|----------|
86
+ | Free | $0 | 100/day | Schemas only |
87
+ | Standard | $29/mo | 10,000/day | Validation API |
88
+ | Premium | $99/mo | 50,000/day | Full API + Grading |
89
+ | Enterprise | Custom | Unlimited | SLA, SSO |
90
+
91
+ ## Documentation
92
+
93
+ - [SDK Documentation](https://docs.exit-tickets.dev)
94
+ - [API Reference](https://docs.exit-tickets.dev/api)
95
+
96
+ ## License
97
+
98
+ MIT
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Minimal shim to invoke compiled CLI
4
+ import('../dist/index.js').then(({ run }) => {
5
+ run().catch((error) => {
6
+ console.error(error)
7
+ process.exit(1)
8
+ })
9
+ })
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+
3
+ declare function createCLI(): Command;
4
+ declare function run(): Promise<void>;
5
+
6
+ export { createCLI, run };