Skip to content

nestdotland/eggs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


logo

Eggs CLI

The CLI used to publish and update modules in nest.land.

nest.land badge Eggs lint Eggs test Eggs ship Discord

Contents

Installation

Note: You need to upgrade to Deno v1.6.0 or newer in order to use our CLI.

deno install -Afq --unstable https://x.nest.land/[email protected]/eggs.ts

For more information, see the documentation.

List Of Commands

Link

Before publishing a package to our registry, you'll need to get an API key. Visit nest.land to generate one.

Then, use link to add it to the CLI:

eggs link <key>

Alternatively, you can manually create a .nest-api-key file at your user home directory.

Init

To publish a package, you need to create an egg.json file at the root of your project as well. To do this easily, type:

eggs init

Note: If you'd like to specify a version that you'll publish to, you can include a version variable in egg.json.

Publish

After you've filled in the information located in egg.json, you can publish your package to our registry with this command:

eggs publish

You'll receive a link to your package on our registry, along with an import URL for others to import your package from the Arweave blockchain!

Note: It may take some time for the transaction to process in Arweave. Until then, we upload your files to our server, where they are served for 20 minutes to give the transaction time to process.

Update

You can easily update your dependencies and global scripts with the update command.

eggs update [deps] <options>

Your dependencies are by default checked in the deps.ts file (current working directory). You can change this with --file

eggs update # default to deps.ts
eggs update --file dependencies.ts

In regular mode, all your dependencies are updated. You can choose which ones will be modified by adding them as arguments.

eggs update # Updates everything
eggs update http fs eggs # Updates only http, fs, eggs

Several registries are supported. The current ones are:

  • x.nest.land
  • deno.land/x
  • deno.land/std
  • raw.githubusercontent.com
  • denopkg.com

If you want to add a registry, open an issue by specifying the registry url and we'll add it.

An example of updated file:

import * as colors from "https://deno.land/[email protected]/fmt/colors.ts";
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts";
import * as eggs from "https://x.nest.land/[email protected]/mod.ts";
import * as http from "https://deno.land/std/http/mod.ts";

After eggs update:

import * as colors from "https://deno.land/[email protected]/fmt/colors.ts";
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts";
import * as eggs from "https://x.nest.land/[email protected]/mod.ts";
import * as http from "https://deno.land/std/http/mod.ts";

Install

Just like deno install, you can install scripts globally with eggs. By installing it this way, you will be notified if an update is available for your script.

The verification is smart, it can't be done more than once a day. To install a script, simply replace deno with eggs.

deno install --allow-write --allow-read -n [NAME] https://x.nest.land/[MODULE]@[VERSION]/cli.ts

Becomes

eggs install --allow-write --allow-read -n [NAME] https://x.nest.land/[MODULE]@[VERSION]/cli.ts

The supported registries are the same as for the update command.

Upgrade

To upgrade the eggs CLI, use the command shown:

eggs upgrade

Contributing

All contributions are welcome! If you can think of a command or feature that might benefit nest.land, fork this repository and make a pull request from your branch with the additions. Make sure to use Conventional Commits

Contribution guide