@babylonjsmarket/cli 1.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 BabylonJS Market
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,179 @@
1
+ # BJS CLI
2
+
3
+ Official command-line interface for [BabylonJS Market](https://bjsmarket.com) - your gateway to 3D assets and educational content.
4
+
5
+ ## Features
6
+
7
+ - **BBS-Style Interface**: Retro terminal UI for browsing courses and 3D assets
8
+ - **OAuth Authentication**: Secure device flow authentication
9
+ - **Asset Downloads**: Download 3D models, textures, and other assets
10
+ - **Multiple Themes**: Classic green phosphor, desert amber, or Matrix-style themes
11
+ - **Progress Tracking**: Real-time download progress with visual feedback
12
+ - **Rate Limiting**: Automatic handling of API rate limits
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install -g @babylonjsmarket/cli
18
+ ```
19
+
20
+ Or using yarn:
21
+
22
+ ```bash
23
+ yarn global add @babylonjsmarket/cli
24
+ ```
25
+
26
+ ## Requirements
27
+
28
+ - Node.js 18.0.0 or higher
29
+ - Terminal with UTF-8 support
30
+ - Internet connection for authentication and downloads
31
+
32
+ ## Usage
33
+
34
+ ### Authentication
35
+
36
+ Login to your BabylonJS Market account:
37
+
38
+ ```bash
39
+ bjs login
40
+ ```
41
+
42
+ Check your authentication status:
43
+
44
+ ```bash
45
+ bjs whoami
46
+ ```
47
+
48
+ Logout:
49
+
50
+ ```bash
51
+ bjs logout
52
+ ```
53
+
54
+ ### BBS Interface
55
+
56
+ Launch the retro BBS-style interface:
57
+
58
+ ```bash
59
+ bjs bbs
60
+ ```
61
+
62
+ #### BBS Options
63
+
64
+ ```bash
65
+ # Set color theme
66
+ bjs bbs --theme classic # Green phosphor (default)
67
+ bjs bbs --theme desert # Amber/orange
68
+ bjs bbs --theme matrix # Matrix-style green
69
+
70
+ # Disable animations
71
+ bjs bbs --no-animations
72
+
73
+ # Disable mouse support
74
+ bjs bbs --no-mouse
75
+ ```
76
+
77
+ #### BBS Navigation
78
+
79
+ - **Arrow Keys**: Navigate lists
80
+ - **Enter**: Select item
81
+ - **ESC**: Go back
82
+ - **C**: View courses
83
+ - **T**: View toys (3D assets)
84
+ - **S**: Settings
85
+ - **D**: Download selected item
86
+ - **M/Space**: Mark/unmark items
87
+ - **B**: Open in browser
88
+ - **Q**: Quit
89
+
90
+ ### Direct Downloads
91
+
92
+ Download assets by ID:
93
+
94
+ ```bash
95
+ bjs download <asset-id>
96
+ ```
97
+
98
+ Specify output directory:
99
+
100
+ ```bash
101
+ bjs download <asset-id> --output ./my-assets
102
+ ```
103
+
104
+ ## Configuration
105
+
106
+ Configuration is stored in `~/.bjs/config.json` and includes:
107
+ - Authentication tokens
108
+ - User preferences
109
+ - Theme settings
110
+ - Animation settings
111
+
112
+ ## Rate Limiting
113
+
114
+ The CLI respects API rate limits:
115
+ - Downloads have a 30-second cooldown between requests
116
+ - Rate limit messages display remaining wait time
117
+ - Automatic retry suggestions for rate-limited requests
118
+
119
+ ## Troubleshooting
120
+
121
+ ### Authentication Issues
122
+
123
+ If you encounter authentication problems:
124
+
125
+ 1. Try logging out and back in:
126
+ ```bash
127
+ bjs logout
128
+ bjs login
129
+ ```
130
+
131
+ 2. Check your internet connection
132
+
133
+ 3. Ensure your BabylonJS Market account is active
134
+
135
+ ### Download Issues
136
+
137
+ If downloads fail:
138
+
139
+ 1. Verify you have access to the asset
140
+ 2. Check available disk space
141
+ 3. Wait for rate limit cooldown if applicable
142
+ 4. Try downloading again after 30 seconds
143
+
144
+ ### Terminal Display Issues
145
+
146
+ If the BBS interface doesn't display correctly:
147
+
148
+ 1. Ensure your terminal supports UTF-8
149
+ 2. Try a different terminal emulator
150
+ 3. Disable animations: `bjs bbs --no-animations`
151
+ 4. Use a different theme: `bjs bbs --theme desert`
152
+
153
+ ## Environment Variables
154
+
155
+ - `BJS_ENV`: Set to `development` to use dev API endpoints
156
+ - `BJS_API_URL`: Override production API URL
157
+ - `BJS_DEV_API_URL`: Override development API URL
158
+
159
+ ## Support
160
+
161
+ - Website: [https://bjsmarket.com](https://bjsmarket.com)
162
+ - Issues: [GitHub Issues](https://github.com/babylonjsmarket/cli/issues)
163
+ - Documentation: [BabylonJS Market Docs](https://bjsmarket.com/docs)
164
+
165
+ ## License
166
+
167
+ MIT License - see LICENSE file for details
168
+
169
+ ## Contributing
170
+
171
+ Contributions are welcome! Please see our [Contributing Guide](https://github.com/babylonjsmarket/cli/blob/main/CONTRIBUTING.md) for details.
172
+
173
+ ## Credits
174
+
175
+ Built with:
176
+ - [Commander.js](https://github.com/tj/commander.js/) - CLI framework
177
+ - [Terminal Kit](https://github.com/cronvel/terminal-kit) - Terminal manipulation
178
+ - [Figlet](https://github.com/patorjk/figlet.js/) - ASCII art generation
179
+ - [Chalk](https://github.com/chalk/chalk) - Terminal styling
@@ -0,0 +1,2 @@
1
+
2
+ export { }