Skip to content

Commit aa13911

Browse files
committed
chore: add npx prefix for nuxthub commands
1 parent 3077181 commit aa13911

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

docs/content/1.docs/1.getting-started/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The [NuxtHub admin](https://admin.hub.nuxt.com) is a web based dashboard to mana
9191
It abstracts the complexity of managing full-stack Nuxt applications on Cloudflare:
9292

9393
- Link your Cloudflare account and stay in control, we never mark-up Cloudflare prices
94-
- [Deploy your application](/docs/getting-started/deploy) with `nuxthub deploy` command or with Cloudflare Pages CI
94+
- [Deploy your application](/docs/getting-started/deploy) with `npx nuxthub deploy` command or with Cloudflare Pages CI
9595
- Relax while it provisions all the necessary resources (ai, blob, cache, database, kv)
9696
- Manage your app's resources with an admin panel
9797
- Visualize application, database, and cache metrics

docs/content/1.docs/1.getting-started/3.deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
```
9595
9696
You need to add the following secrets to your GitHub repository:
97-
- `NUXT_HUB_PROJECT_KEY`: Your project key (available in your project settings in the NuxtHub Admin or in your `.env` file if you ran `nuxthub link`)
97+
- `NUXT_HUB_PROJECT_KEY`: Your project key (available in your project settings in the NuxtHub Admin or in your `.env` file if you ran `npx nuxthub link`)
9898
- `NUXT_HUB_USER_TOKEN`: Your user token available in **User settings** → **Tokens** in the NuxtHub Admin
9999

100100
::tip

docs/content/1.docs/1.getting-started/4.remote-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You should not use the `remote` option in your `nuxt.config` file in production
5555
::
5656

5757
::note
58-
NuxtHub will use the remote storage from your deployed project **as long as you are logged in with the [NuxtHub CLI](https://github.com/nuxt-hub/cli) and the local project is linked to a NuxtHub project** with `nuxthub link` or `nuxthub deploy`.
58+
NuxtHub will use the remote storage from your deployed project **as long as you are logged in with the [NuxtHub CLI](https://github.com/nuxt-hub/cli) and the local project is linked to a NuxtHub project** with `npx nuxthub link` or `npx nuxthub deploy`.
5959
::
6060

6161
### Production vs Preview

docs/content/1.docs/1.getting-started/5.server-logs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Using the [NuxtHub CLI](https://github.com/nuxt-hub/cli), you can access to the
1818
By default, the CLI will detect based on the current branch the canonical deployment of your project and stream the logs of that deployment in the CLI.
1919

2020
```bash [Terminal]
21-
nuxthub logs
21+
npx nuxthub logs
2222
```
2323

2424
:nuxt-img{src="/images/landing/nuxthub-cli-server-logs.png" alt="NuxtHub CLI Server Logs" width="915" height="515" data-zoom-src="/images/landing/nuxthub-cli-server-logs.png" class="rounded"}
@@ -28,13 +28,13 @@ nuxthub logs
2828
To access the logs of the production environment, you can use the `--production` flag.
2929

3030
```bash [Terminal]
31-
nuxthub logs --production
31+
npx nuxthub logs --production
3232
```
3333

3434
### Preview environment
3535

3636
In preview environment, NuxtHub will stream the logs of the latest successful deployment in the CLI.
3737

3838
```bash [Terminal]
39-
nuxthub logs --preview
39+
npx nuxthub logs --preview
4040
```

docs/content/5.blog/1.beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The [NuxtHub admin](https://admin.hub.nuxt.com) is a web based dashboard to mana
7070
Some of the features are:
7171
- Link your Cloudflare account and stay in control (we never mark-up Cloudflare prices)
7272
- Clone one of our full-stack Nuxt templates
73-
- Deploy your application with nuxthub deploy command or link your GitHub or GitLab repository
73+
- Deploy your application with `npx nuxthub deploy` command or link your GitHub or GitLab repository
7474
- Relax while it provisions all the necessary resources (database, kv, blob)
7575
- Manage your app's resources with an admin panel
7676
- Share team member access to manage your app without sharing your Cloudflare account

src/features.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function setupBase(nuxt: Nuxt, hub: HubConfig) {
8080
export async function setupAI(nuxt: Nuxt, hub: HubConfig) {
8181
// If we are in dev mode and the project is not linked, disable it
8282
if (nuxt.options.dev && !hub.remote && !hub.projectKey) {
83-
return log.warn('`hubAI()` is disabled: link a project with `nuxthub link` to run AI models in development mode.')
83+
return log.warn('`hubAI()` is disabled: link a project with `npx nuxthub link` to run AI models in development mode.')
8484
}
8585
// If we are in dev mode and the project is linked, verify it
8686
if (nuxt.options.dev && !hub.remote && hub.projectKey) {
@@ -95,9 +95,9 @@ export async function setupAI(nuxt: Nuxt, hub: HubConfig) {
9595
if (!err.status) {
9696
log.warn ('`hubAI()` is disabled: it seems that you are offline.')
9797
} else if (err.status === 401) {
98-
log.warn ('`hubAI()` is disabled: you are not logged in, make sure to run `nuxthub login`.')
98+
log.warn ('`hubAI()` is disabled: you are not logged in, make sure to run `npx nuxthub login`.')
9999
} else {
100-
log.error('`hubAI()` is disabled: failed to fetch linked project `' + hub.projectKey + '` on NuxtHub, make sure to run `nuxthub link` again.')
100+
log.error('`hubAI()` is disabled: failed to fetch linked project `' + hub.projectKey + '` on NuxtHub, make sure to run `npx nuxthub link` again.')
101101
}
102102
return
103103
}
@@ -262,9 +262,9 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) {
262262
if (!err.status) {
263263
log.error('It seems that you are offline.')
264264
} else if (err.status === 401) {
265-
log.error('It seems that you are not logged in, make sure to run `nuxthub login`.')
265+
log.error('It seems that you are not logged in, make sure to run `npx nuxthub login`.')
266266
} else {
267-
log.error('Failed to fetch linked project on NuxtHub, make sure to run `nuxthub link` again.')
267+
log.error('Failed to fetch linked project on NuxtHub, make sure to run `npx nuxthub link` again.')
268268
}
269269
process.exit(1)
270270
})
@@ -286,7 +286,7 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) {
286286
hub.projectUrl = hub.projectUrl || (env === 'production' ? project.url : project.previewUrl)
287287
// No production or preview URL found
288288
if (!hub.projectUrl) {
289-
log.error(`No deployment found for \`${env}\`, make sure to deploy the project using \`nuxthub deploy\`.`)
289+
log.error(`No deployment found for \`${env}\`, make sure to deploy the project using \`npx nuxthub deploy\`.`)
290290
process.exit(1)
291291
}
292292
// Update hub.env in runtimeConfig
@@ -295,7 +295,7 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) {
295295

296296
// Make sure we have a projectUrl when using the remote option
297297
if (!hub.projectUrl) {
298-
log.error('No project URL defined, make sure to link your project with `nuxthub link` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable (if self-hosted).')
298+
log.error('No project URL defined, make sure to link your project with `npx nuxthub link` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable (if self-hosted).')
299299
process.exit(1)
300300
}
301301

@@ -314,11 +314,11 @@ export async function setupRemote(_nuxt: Nuxt, hub: HubConfig) {
314314
}
315315
})
316316
.catch(async (err) => {
317-
let message = 'Project not found.\nMake sure to deploy the project using `nuxthub deploy` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable.'
317+
let message = 'Project not found.\nMake sure to deploy the project using `npx nuxthub deploy` or add the deployed URL as `NUXT_HUB_PROJECT_URL` environment variable.'
318318
if (err.status >= 500) {
319319
message = 'Internal server error'
320320
} else if (err.status === 401) {
321-
message = 'Authorization failed.\nMake sure to provide a valid NUXT_HUB_PROJECT_SECRET_KEY or being logged in with `nuxthub login`'
321+
message = 'Authorization failed.\nMake sure to provide a valid NUXT_HUB_PROJECT_SECRET_KEY or being logged in with `npx nuxthub login`'
322322
}
323323
log.error(`Failed to fetch remote storage: ${message}`)
324324
process.exit(1)

src/types/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ export interface ModuleOptions {
9494
*/
9595
url?: string
9696
/**
97-
* The project's key on the NuxtHub platform, added with `nuxthub link`.
97+
* The project's key on the NuxtHub platform, added with `npx nuxthub link`.
9898
* @default process.env.NUXT_HUB_PROJECT_KEY
9999
*/
100100
projectKey?: string
101101
/**
102-
* The user token to access the NuxtHub platform, added with `nuxthub login`
102+
* The user token to access the NuxtHub platform, added with `npx nuxthub login`
103103
* @default process.env.NUXT_HUB_USER_TOKEN
104104
*/
105105
userToken?: string

0 commit comments

Comments
 (0)