Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions docs/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
---
title: Nest CLI
sidebar_label: Introduction
title: Getting started
sidebar_label: Getting started
slug: /cli
---

:::caution Not a 404 but almost
:::caution Work in progress

This page is a work in progress.
Until the release of nest 1.0.0, the current CLI for nest is [eggs](../eggs/README.md).

In the future, [eggs](../eggs/README.md) will be a reference module manager that has first-class support for Nest including private modules. Other module managers can use this reference to integrate Nest into their software.

:::

[More info](https://github.com/nestdotland/cli)
The nest command line interface allows developers to easily create and publish modules on [nest.land](https://nest.land).

It's written in TypesScript, utilizing the power of Deno. It's lightweight yet efficient, and it provides an easy and safe way for developers to manage their modules.

### Install

```shell script
deno install -Afq https://nest.land/-/nest/nest.ts
```

### Publish

Log into your Nest account

```shell script
nest login <username> <auth_token>
```

:::note New to Nest.land?
[Create an account](https://nest.land/#).
:::

Initialize a nest module

```shell script
cd <module directory>
nest init <name> # follow the prompts
```

Publish to Nest

```shell script
nest publish <version>
```

You should now see your module on the [gallery](https://nest.land/gallery) !

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. [Learn more](https://github.com/nestdotland/nest/blob/main/.github/CONTRIBUTING.md)

4 changes: 4 additions & 0 deletions docs/cli/cicd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Continuous Integration / Continuous Development
sidebar_label: CI/CD
---
28 changes: 28 additions & 0 deletions docs/cli/commands/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: nest help
sidebar_label: help
---

Show the global help or the help of a sub-command.

```shell script
nest help [...command]
```

## Arguments

argument | description
-------- | -----------
...command | A command or a sub-command

:::info
Show the global help if no command is provided
:::

## Examples

```shell script
nest help
nest help login
nest help publish 1.2.5 --pre
```
43 changes: 43 additions & 0 deletions docs/cli/commands/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: nest init
sidebar_label: init
---

Initiate a new module for the nest.land registry. Will create the necessary configuration files.

```shell script
nest init
```

:::tip
Use [`nest setup`](./setup.md) if your module already exists !
:::

## Prompts

```script shell
Initialize directory ? >
```
Exits if `false`

```script shell
Link to an existing module? >
```

:::info
If you answer `yes`, behaves in the same way as the [`nest setup`](./setup.md) command.
:::

```script shell
Module name >
Module full name >
Description >
Homepage >
Homepage >
```

## Examples

```shell script
nest init
```
35 changes: 35 additions & 0 deletions docs/cli/commands/login.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: nest login
sidebar_label: login
---

Add an existing user account.

```shell script
nest login [username] [token]
```

See [users.json](../configuration/users.json.md) for technical details.

:::note New to Nest.land?
[Create an account](https://nest.land/#).
:::

## Arguments

argument | description
-------- | -----------
username | A username
token | A login token

:::info
If `[username]` or `[token]` is missing, you will be prompted to enter it.
:::

## Examples

```shell script
nest login
nest login me
nest login me OltCnjbXVnkNYIr60/4IvA==
```
29 changes: 29 additions & 0 deletions docs/cli/commands/logout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: nest logout
sidebar_label: logout
---

Remove an existing user account.

```shell script
nest login [username]
Comment thread
SteelAlloy marked this conversation as resolved.
Outdated
```

See [users.json](../configuration/users.json.md) for technical details.

## Arguments

argument | description
-------- | -----------
username | A username

:::info
If `[username]` is missing, you will be prompted to enter it.
:::

## Examples

```shell script
nest login
nest login me
Comment thread
SteelAlloy marked this conversation as resolved.
Outdated
```
67 changes: 67 additions & 0 deletions docs/cli/commands/publish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: nest publish
sidebar_label: publish
---

Publish your module to the nest.land registry.

```shell script
nest publish [version]
```

## Arguments

argument | default | description
-------- | ------- | -----------
version | `"patch"` | [Semver tag](https://semver.org/) or one of "major", "minor", "patch"

If a release type is provided as `version`, increments the previous version from the given release type. See [examples](#examples) below.

:::info
If no version is published yet, `version` defaults to `0.1.0`
:::

## Options

options | description
------- | -----------
`-Y, --yes` | Disable confirmation prompts
`-d, --dry-run` | No changes will actually be made, reports the details of what would have been published
`-g, --git-tag` | Use the latest git tag as version (ignored if `[version]` is provided)
`--pre [tag]` | Publish as a prerelease with optional identifier
`--deno <semver>` | [Semver range](https://github.com/nestdotland/semver#ranges) for supported deno versions
`-w, --wallet <path>` | Path to custom arweave wallet
`--unlisted` | Publish as an unlisted version

:::tip
Use `--git-tag` when publishing to [deno.land](https://deno.land) and [nest.land](https://nest.land) on Github.
:::

## Examples

```shell script
# say the current version is module@1.0.0

nest publish # module@1.0.1
nest publish 1.2.3 # module@1.2.3
nest publish patch # module@1.0.1
nest publish minor # module@1.1.0
nest publish major # module@2.0.0

nest publish --pre # module@1.0.1-0
nest publish 1.2.3 --pre # module@1.2.3-0
nest publish patch --pre # module@1.0.1-0
nest publish minor --pre # module@1.1.0-0
nest publish major --pre # module@2.0.0-0

nest publish --pre alpha # module@1.0.1-alpha.0
nest publish 1.2.3 --pre beta # module@1.2.3-beta.0
nest publish patch --pre rc # module@1.0.1-rc.0
nest publish minor --pre asdf # module@1.1.0-asdf.0
nest publish major --pre pre # module@1.0.1-pre.0
```

```shell script
nest publish --deno ^1.7.1
nest publish --deno ">=1.2.3 <1.7.0"
```
29 changes: 29 additions & 0 deletions docs/cli/commands/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: nest setup
sidebar_label: setup
---

Link current directory to an existing module.

```shell script
nest setup [author] [module]
```

## Arguments

argument | description
-------- | -----------
author | A module author
module | A module name

:::info
If `[author]` or `[module]` is missing, you will be prompted to enter it.
:::

## Examples

```shell script
nest setup
nest setup me
nest setup me my-module
```
31 changes: 31 additions & 0 deletions docs/cli/commands/switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: nest switch
sidebar_label: switch
---

Publish your module to the nest.land registry.

```shell script
nest switch [username]
```

:::tip
Use this command when you need to work on multiple projects with different accounts.
:::

## Arguments

argument | description
-------- | -----------
username | A username

:::info
If `[username]` is missing, you will be prompted to enter it.
:::

## Examples

```shell script
nest switch
nest switch user12648
```
16 changes: 16 additions & 0 deletions docs/cli/commands/sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: nest sync
sidebar_label: sync
---

Synchronize remote and local configuration.

```shell script
nest sync
```

## Examples

```shell script
nest sync
```
23 changes: 23 additions & 0 deletions docs/cli/commands/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: nest upgrade
sidebar_label: upgrade
---

Upgrade nest cli to the given version.

```shell script
nest upgrade [version]
```

## Arguments

argument | default | description
-------- | ------- | -----------
version | latest | A given semver version

## Examples

```shell script
nest upgrade
nest upgrade 1.0.0
```
4 changes: 4 additions & 0 deletions docs/cli/configuration/data.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: data.json
sidebar_label: data.json
---
4 changes: 4 additions & 0 deletions docs/cli/configuration/ignore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: ignore
sidebar_label: ignore
---
4 changes: 4 additions & 0 deletions docs/cli/configuration/module.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: module.json
sidebar_label: module.json
---
4 changes: 4 additions & 0 deletions docs/cli/configuration/users.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: users.json
sidebar_label: users.json
---
Loading