@docyrus/cli 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +51 -107
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -2,78 +2,86 @@
2
2
 
3
3
  Official command-line interface for Docyrus - authentication, project scaffolding, and code generation tools.
4
4
 
5
- ## Installation
5
+ ## Usage
6
6
 
7
7
  ```bash
8
- npm install -g docyrus
9
- # or
10
- pnpm add -g docyrus
8
+ npx @docyrus/cli <command>
11
9
  ```
12
10
 
13
11
  ## Commands
14
12
 
15
13
  ### Authentication
16
14
 
17
- #### `docyrus login`
15
+ #### `login`
18
16
 
19
17
  Log in to Docyrus using browser-based SSO (default).
20
18
 
21
19
  ```bash
22
- docyrus login # Opens browser for SSO authentication
23
- docyrus login --email # Use email/password instead (prompts for credentials)
24
- docyrus login -e user@example.com # Pre-fill email address
20
+ npx @docyrus/cli login # Opens browser for SSO authentication
21
+ npx @docyrus/cli login --email # Use email/password instead (prompts for credentials)
22
+ npx @docyrus/cli login -e user@example.com # Pre-fill email address
25
23
  ```
26
24
 
27
- #### `docyrus logout`
25
+ #### `logout`
28
26
 
29
27
  Log out from Docyrus and clear stored credentials.
30
28
 
31
29
  ```bash
32
- docyrus logout
30
+ npx @docyrus/cli logout
33
31
  ```
34
32
 
35
- #### `docyrus whoami`
33
+ #### `whoami`
36
34
 
37
35
  Display the currently logged-in user.
38
36
 
39
37
  ```bash
40
- docyrus whoami
38
+ npx @docyrus/cli whoami
41
39
  # Output: Email: user@example.com
42
40
  # Name: John Doe
43
41
  ```
44
42
 
45
43
  ### Project Creation
46
44
 
47
- #### `docyrus create [name]`
45
+ #### `create [name]`
48
46
 
49
47
  Create a new Docyrus project from a template.
50
48
 
51
49
  ```bash
52
- docyrus create # Interactive mode - prompts for all options
53
- docyrus create my-app # Create project with specified name
54
- docyrus create my-app --nextjs # Next.js + plain Tailwind
55
- docyrus create my-app --nextjs --shadcn # Next.js + shadcn/ui
56
- docyrus create my-app --react --heroui # React + HeroUI
57
- docyrus create my-app --vue --shadcn # Vue + shadcn-vue
58
- docyrus create my-app --astro # Astro + plain Tailwind
59
- docyrus create my-app --nextjs --shadcn --eslint --pnpm # Full flags
50
+ npx @docyrus/cli create # Interactive mode - prompts for all options
51
+ npx @docyrus/cli create my-app # Create project with specified name
52
+ npx @docyrus/cli create my-app --nextjs # Next.js + plain Tailwind
53
+ npx @docyrus/cli create my-app --nextjs --shadcn # Next.js + shadcn/ui
54
+ npx @docyrus/cli create my-app --react --heroui # React + HeroUI
55
+ npx @docyrus/cli create my-app --react --diceui # React + DiceUI
56
+ npx @docyrus/cli create my-app --vue --shadcn # Vue + shadcn-vue
57
+ npx @docyrus/cli create my-app --electron --shadcn # Electron + shadcn/ui
58
+ npx @docyrus/cli create my-app --nextjs --shadcn --zustand --eslint --pnpm # Full flags
60
59
  ```
61
60
 
62
61
  **Framework Options:**
63
62
 
64
63
  | Flag | Description |
65
64
  |------|-------------|
66
- | `--nextjs` | Use Next.js 15+ (App Router) |
65
+ | `--nextjs` | Use Next.js 16+ (App Router) |
67
66
  | `--react` | Use React 19+ with Vite |
68
- | `--astro` | Use Astro 5+ |
69
67
  | `--vue` | Use Vue 3.5+ with Vite |
68
+ | `--electron` | Use Electron + React + Vite |
70
69
 
71
70
  **UI Library Options (optional - defaults to plain Tailwind if not specified):**
72
71
 
73
- | Flag | Description |
74
- |------|-------------|
75
- | `--shadcn` | Use shadcn/ui (React/Next.js) or shadcn-vue (Vue) |
76
- | `--heroui` | Use HeroUI (React/Next.js only) |
72
+ | Flag | Compatible Frameworks |
73
+ |------|----------------------|
74
+ | `--shadcn` | Next.js, React, Electron (shadcn/ui) / Vue (shadcn-vue) |
75
+ | `--diceui` | Next.js, React, Electron |
76
+ | `--heroui` | Next.js, React |
77
+
78
+ **State Management Options (optional):**
79
+
80
+ | Flag | Compatible Frameworks |
81
+ |------|----------------------|
82
+ | `--zustand` | Next.js, React, Electron |
83
+ | `--tanstack-query` | Next.js, React, Electron |
84
+ | `--tanstack-vue-query` | Vue |
77
85
 
78
86
  **Linter Options:**
79
87
 
@@ -98,37 +106,24 @@ docyrus create my-app --nextjs --shadcn --eslint --pnpm # Full flags
98
106
  |--------|-------------|
99
107
  | `-p, --path <path>` | Target directory path |
100
108
  | `--alias <prefix>` | Custom import alias prefix (must start with @) |
101
-
102
- **Available Templates:**
103
-
104
- | Template | Description |
105
- |----------|-------------|
106
- | `nextjs` | Next.js 15+ + Tailwind CSS v4 |
107
- | `nextjs-shadcn` | Next.js 15+ + Tailwind CSS v4 + shadcn/ui |
108
- | `nextjs-heroui` | Next.js 15+ + Tailwind CSS v4 + HeroUI |
109
- | `react` | React 19+ + Vite + Tailwind CSS v4 |
110
- | `react-shadcn` | React 19+ + Vite + Tailwind CSS v4 + shadcn/ui |
111
- | `react-heroui` | React 19+ + Vite + Tailwind CSS v4 + HeroUI |
112
- | `astro` | Astro 5+ + Tailwind CSS v4 |
113
- | `vue` | Vue 3.5+ + Vite + Tailwind CSS v4 |
114
- | `vue-shadcn` | Vue 3.5+ + Vite + Tailwind CSS v4 + shadcn-vue |
109
+ | `--local` | Use local templates (development only) |
115
110
 
116
111
  Each template includes:
117
- - Pre-configured OAuth2 authentication pages
112
+ - Pre-configured OAuth2 authentication via `@docyrus/app-auth-ui`
118
113
  - Docyrus API client integration
119
114
  - Modern TypeScript setup
120
115
  - Linter configuration (ESLint or Biome)
121
116
 
122
117
  ### Code Generation
123
118
 
124
- #### `docyrus generate db [spec]`
119
+ #### `generate db [spec]`
125
120
 
126
121
  Generate TanStack Query collections from an OpenAPI 3.1.0 specification.
127
122
 
128
123
  ```bash
129
- docyrus generate db # Auto-detect openapi.json in current directory
130
- docyrus generate db ./api/openapi.json # Specify spec file path
131
- docyrus generate db ./spec.json -o ./src/api # Custom output directory
124
+ npx @docyrus/cli generate db # Auto-detect openapi.json in current directory
125
+ npx @docyrus/cli generate db ./api/openapi.json # Specify spec file path
126
+ npx @docyrus/cli generate db ./spec.json -o ./src/api # Custom output directory
132
127
  ```
133
128
 
134
129
  **Options:**
@@ -136,53 +131,23 @@ docyrus generate db ./spec.json -o ./src/api # Custom output directory
136
131
  | Option | Description |
137
132
  |--------|-------------|
138
133
  | `-o, --output <dir>` | Output directory (defaults to `src` in spec file folder) |
139
- | `-w, --watch` | Watch for changes in the spec file (coming soon) |
140
134
 
141
135
  ### CLI Management
142
136
 
143
- #### `docyrus upgrade`
137
+ #### `upgrade`
144
138
 
145
139
  Upgrade the CLI to the latest version. Automatically detects your package manager (npm, pnpm, yarn, bun).
146
140
 
147
141
  ```bash
148
- docyrus upgrade
142
+ npx @docyrus/cli upgrade
149
143
  ```
150
144
 
151
- #### `docyrus completion <shell>`
145
+ #### `info`
152
146
 
153
- Generate shell completion script for tab completion support.
147
+ Display CLI version, system information, and authentication status.
154
148
 
155
149
  ```bash
156
- # Bash - add to ~/.bashrc
157
- eval "$(docyrus completion bash)"
158
-
159
- # Zsh - add to ~/.zshrc
160
- eval "$(docyrus completion zsh)"
161
-
162
- # Fish - save to completions directory
163
- docyrus completion fish > ~/.config/fish/completions/docyrus.fish
164
- ```
165
-
166
- #### `docyrus info`
167
-
168
- Display CLI version, system information, and authentication status. Useful for debugging.
169
-
170
- ```bash
171
- docyrus info
172
- # Output:
173
- # docyrus v0.0.1
174
- #
175
- # System:
176
- # Node.js: v20.10.0
177
- # OS: darwin 23.0.0 (arm64)
178
- #
179
- # Environment:
180
- # API URL: https://api.docyrus.com
181
- # Config: /Users/you/.docyrus
182
- #
183
- # Authentication:
184
- # Status: Logged in
185
- # Email: user@example.com
150
+ npx @docyrus/cli info
186
151
  ```
187
152
 
188
153
  ## Global Options
@@ -192,42 +157,21 @@ docyrus info
192
157
  Output results in JSON format. Useful for scripting and CI/CD pipelines.
193
158
 
194
159
  ```bash
195
- docyrus whoami --json
196
- # Output: {"user": {"email": "user@example.com", "firstname": "John", "lastname": "Doe"}}
197
-
198
- docyrus generate db ./spec.json --json
199
- # Output: {"spec": "./spec.json", "output": "./src", "success": true, "message": "..."}
160
+ npx @docyrus/cli whoami --json
161
+ npx @docyrus/cli generate db ./spec.json --json
200
162
  ```
201
163
 
202
164
  ### `-v, --version`
203
165
 
204
166
  Display the CLI version.
205
167
 
206
- ```bash
207
- docyrus -v
208
- # Output: 0.0.1
209
- ```
210
-
211
168
  ### `-h, --help`
212
169
 
213
170
  Display help information.
214
171
 
215
172
  ```bash
216
- docyrus --help
217
- docyrus login --help
218
- docyrus generate --help
219
- docyrus generate db --help
220
- ```
221
-
222
- ## Auto-Update Notifications
223
-
224
- The CLI automatically checks for updates and displays a notification when a new version is available:
225
-
226
- ```
227
- ┌────────────────────────────────────────────┐
228
- │ Update available! 0.0.1 → 0.1.0 │
229
- │ Run npm i -g docyrus to update │
230
- └────────────────────────────────────────────┘
173
+ npx @docyrus/cli --help
174
+ npx @docyrus/cli create --help
231
175
  ```
232
176
 
233
177
  ## Environment Variables
@@ -236,7 +180,7 @@ The CLI automatically checks for updates and displays a notification when a new
236
180
  |----------|-------------|
237
181
  | `DOCYRUS_API_URL` | Override the API base URL |
238
182
  | `DOCYRUS_OAUTH_CLIENT_ID` | Override the OAuth2 client ID |
239
- | `DEBUG` | Enable debug output |
183
+ | `DOCYRUS_OAUTH_SCOPES` | Override the OAuth2 scopes |
240
184
 
241
185
  ## Token Storage
242
186
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Docyrus/docyrus-devkit.git",
@@ -39,8 +39,8 @@
39
39
  "keytar": "7.9.0",
40
40
  "open": "11.0.0",
41
41
  "ora": "9.3.0",
42
- "@docyrus/tanstack-db-generator": "0.4.1",
43
- "@docyrus/api-client": "0.0.8"
42
+ "@docyrus/api-client": "0.0.8",
43
+ "@docyrus/tanstack-db-generator": "0.4.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "25.2.2",