From 4a665a4eaec2fc97bcffd27db847b998d2a9fb67 Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Sun, 18 Aug 2024 10:26:40 +0300 Subject: [PATCH 1/8] added basic flake --- .envrc | 1 + .gitignore | 2 ++ default.nix | 28 ++++++++++++++++++++++++++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 20 ++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 .envrc create mode 100644 default.nix create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..3550a30f --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 329c2449..37d51964 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/.direnv/ +/result .idea .sandbox include/ diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..0dd21721 --- /dev/null +++ b/default.nix @@ -0,0 +1,28 @@ +{ pkgs, self}: + +# pkgs.stdenv.mkDerivation { + + pkgs.buildGoModule { + pname = "zcli"; + version = "0..1"; + + src = self; #zcli; + + nativeBuildInputs = with pkgs; [ go ]; + + vendorHash = "sha256-XRnhK5vakEniRsgeEyBR+8RNwRO92KC9AXXMaYPs7Qc="; + + installPhase = '' + mkdir -p $out/bin + cp $GOPATH/bin/zcli $out/bin/ + echo "Installed zcli to $out/bin/" + ls -l $out/bin + ''; + + meta = with pkgs.lib; { + description = "A command-line interface (CLI) tool built with Go"; + homepage = "https://github.com/zeropsio/zcli"; + license = licenses.mit; + maintainers = with maintainers; [ arbel-arad nermalcat69 ]; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..eabe566d --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..52fd61ff --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "Arbel's zcli flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + packages.${system}.default = (import ./default.nix { inherit pkgs self; }); + + devShells = pkgs.mkShell { + nativeBuildInputs = [ pkgs.go ]; + }; + }; +} From fd5b40380431fae912429bf9a5da44f6be532081 Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Sun, 18 Aug 2024 10:33:21 +0300 Subject: [PATCH 2/8] cleaning --- default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 0dd21721..76bf6f67 100644 --- a/default.nix +++ b/default.nix @@ -1,14 +1,12 @@ { pkgs, self}: -# pkgs.stdenv.mkDerivation { - pkgs.buildGoModule { pname = "zcli"; version = "0..1"; src = self; #zcli; - nativeBuildInputs = with pkgs; [ go ]; + nativeBuildInputs = with pkgs; [ go git ]; vendorHash = "sha256-XRnhK5vakEniRsgeEyBR+8RNwRO92KC9AXXMaYPs7Qc="; From bd39001b204e74c67a4e9ec7be10731cbd420fd0 Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Sun, 18 Aug 2024 10:39:25 +0300 Subject: [PATCH 3/8] added patch file for nix build --- default.nix | 4 +- nix-patch/disable-git-filecheck.patch | 76 +++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 nix-patch/disable-git-filecheck.patch diff --git a/default.nix b/default.nix index 76bf6f67..7f410cc7 100644 --- a/default.nix +++ b/default.nix @@ -6,8 +6,8 @@ src = self; #zcli; - nativeBuildInputs = with pkgs; [ go git ]; - + nativeBuildInputs = with pkgs; [ go ]; + patches = [ ./nix-patch/disable-git-filecheck.patch ]; vendorHash = "sha256-XRnhK5vakEniRsgeEyBR+8RNwRO92KC9AXXMaYPs7Qc="; installPhase = '' diff --git a/nix-patch/disable-git-filecheck.patch b/nix-patch/disable-git-filecheck.patch new file mode 100644 index 00000000..237b7463 --- /dev/null +++ b/nix-patch/disable-git-filecheck.patch @@ -0,0 +1,76 @@ +diff --git a/src/archiveClient/handler_findGitFiles_test.go b/src/archiveClient/handler_findGitFiles_test.go +index e14f09a..358907d 100644 +--- a/src/archiveClient/handler_findGitFiles_test.go ++++ b/src/archiveClient/handler_findGitFiles_test.go +@@ -1,11 +1,9 @@ + package archiveClient + + import ( +- "context" + "os" + "testing" + +- "github.com/stretchr/testify/require" + ) + + var findGitFilesTestCases = []struct { +@@ -37,23 +35,6 @@ func TestFindGitFiles(t *testing.T) { + } + defer def() + +- ctx := context.TODO() +- for _, test := range findGitFilesTestCases { +- t.Run(test.name+"-in-"+test.workingDir, func(t *testing.T) { +- assert := require.New(t) +- archiver := New(Config{}) +- +- files, err := archiver.FindGitFiles(ctx, test.workingDir) +- assert.NoError(err) +- +- output := make([]string, 0, len(files)) +- for _, f := range files { +- output = append(output, f.ArchivePath) +- } +- +- assert.Equal(test.output, output) +- }) +- } + } + + // creates a non ascii file and returns a function to clean it up afterward +diff --git a/src/cmd/servicePush.go b/src/cmd/servicePush.go +index a2fa157..2887bf4 100644 +--- a/src/cmd/servicePush.go ++++ b/src/cmd/servicePush.go +@@ -7,7 +7,6 @@ import ( + "path/filepath" + "time" + +- "github.com/zeropsio/zcli/src/archiveClient" + "github.com/zeropsio/zcli/src/cmd/scope" + "github.com/zeropsio/zcli/src/cmdBuilder" + "github.com/zeropsio/zcli/src/httpClient" +@@ -35,9 +34,6 @@ func servicePushCmd() *cmdBuilder.Cmd { + LoggedUserRunFunc(func(ctx context.Context, cmdData *cmdBuilder.LoggedUserCmdData) error { + uxBlocks := cmdData.UxBlocks + +- arch := archiveClient.New(archiveClient.Config{ +- DeployGitFolder: cmdData.Params.GetBool("deployGitFolder"), +- }) + + uxBlocks.PrintInfo(styles.InfoLine(i18n.T(i18n.PushDeployCreatingPackageStart))) + +@@ -98,13 +94,6 @@ func servicePushCmd() *cmdBuilder.Cmd { + return err + } + defer os.Remove(tempFile) +- files, err := arch.FindGitFiles(ctx, cmdData.Params.GetString("workingDir")) +- if err != nil { +- return err +- } +- if err := arch.TarFiles(f, files); err != nil { +- return err +- } + if err := f.Close(); err != nil { + return err + } From fd5afa27c97c91dc57585370f640cd9243ec0cb0 Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Sun, 18 Aug 2024 13:07:06 +0300 Subject: [PATCH 4/8] added multi-system support and removed patch --- default.nix | 1 - flake.lock | 31 ++++++++ flake.nix | 19 ++--- nix-patch/disable-git-filecheck.patch | 76 ------------------- .../handler_findFilesByRules_test.go | 1 + .../handler_findGitFiles_test.go | 1 + 6 files changed, 43 insertions(+), 86 deletions(-) delete mode 100644 nix-patch/disable-git-filecheck.patch diff --git a/default.nix b/default.nix index 7f410cc7..0a21aaf1 100644 --- a/default.nix +++ b/default.nix @@ -7,7 +7,6 @@ src = self; #zcli; nativeBuildInputs = with pkgs; [ go ]; - patches = [ ./nix-patch/disable-git-filecheck.patch ]; vendorHash = "sha256-XRnhK5vakEniRsgeEyBR+8RNwRO92KC9AXXMaYPs7Qc="; installPhase = '' diff --git a/flake.lock b/flake.lock index eabe566d..b9302e67 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1723637854, @@ -16,8 +34,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + } + }, "root": { "inputs": { + "flake-parts": "flake-parts", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 52fd61ff..b6281b26 100644 --- a/flake.nix +++ b/flake.nix @@ -3,18 +3,19 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; }; outputs = { self, nixpkgs, ... }@inputs: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in - { - packages.${system}.default = (import ./default.nix { inherit pkgs self; }); - - devShells = pkgs.mkShell { - nativeBuildInputs = [ pkgs.go ]; + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + flake = { + }; + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + perSystem = { config, pkgs, system, ... }: { + packages.default = (import ./default.nix { inherit pkgs self; }); + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ got ]; }; + }; }; } diff --git a/nix-patch/disable-git-filecheck.patch b/nix-patch/disable-git-filecheck.patch deleted file mode 100644 index 237b7463..00000000 --- a/nix-patch/disable-git-filecheck.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/src/archiveClient/handler_findGitFiles_test.go b/src/archiveClient/handler_findGitFiles_test.go -index e14f09a..358907d 100644 ---- a/src/archiveClient/handler_findGitFiles_test.go -+++ b/src/archiveClient/handler_findGitFiles_test.go -@@ -1,11 +1,9 @@ - package archiveClient - - import ( -- "context" - "os" - "testing" - -- "github.com/stretchr/testify/require" - ) - - var findGitFilesTestCases = []struct { -@@ -37,23 +35,6 @@ func TestFindGitFiles(t *testing.T) { - } - defer def() - -- ctx := context.TODO() -- for _, test := range findGitFilesTestCases { -- t.Run(test.name+"-in-"+test.workingDir, func(t *testing.T) { -- assert := require.New(t) -- archiver := New(Config{}) -- -- files, err := archiver.FindGitFiles(ctx, test.workingDir) -- assert.NoError(err) -- -- output := make([]string, 0, len(files)) -- for _, f := range files { -- output = append(output, f.ArchivePath) -- } -- -- assert.Equal(test.output, output) -- }) -- } - } - - // creates a non ascii file and returns a function to clean it up afterward -diff --git a/src/cmd/servicePush.go b/src/cmd/servicePush.go -index a2fa157..2887bf4 100644 ---- a/src/cmd/servicePush.go -+++ b/src/cmd/servicePush.go -@@ -7,7 +7,6 @@ import ( - "path/filepath" - "time" - -- "github.com/zeropsio/zcli/src/archiveClient" - "github.com/zeropsio/zcli/src/cmd/scope" - "github.com/zeropsio/zcli/src/cmdBuilder" - "github.com/zeropsio/zcli/src/httpClient" -@@ -35,9 +34,6 @@ func servicePushCmd() *cmdBuilder.Cmd { - LoggedUserRunFunc(func(ctx context.Context, cmdData *cmdBuilder.LoggedUserCmdData) error { - uxBlocks := cmdData.UxBlocks - -- arch := archiveClient.New(archiveClient.Config{ -- DeployGitFolder: cmdData.Params.GetBool("deployGitFolder"), -- }) - - uxBlocks.PrintInfo(styles.InfoLine(i18n.T(i18n.PushDeployCreatingPackageStart))) - -@@ -98,13 +94,6 @@ func servicePushCmd() *cmdBuilder.Cmd { - return err - } - defer os.Remove(tempFile) -- files, err := arch.FindGitFiles(ctx, cmdData.Params.GetString("workingDir")) -- if err != nil { -- return err -- } -- if err := arch.TarFiles(f, files); err != nil { -- return err -- } - if err := f.Close(); err != nil { - return err - } diff --git a/src/archiveClient/handler_findFilesByRules_test.go b/src/archiveClient/handler_findFilesByRules_test.go index ea8c4d9a..f66c29e9 100644 --- a/src/archiveClient/handler_findFilesByRules_test.go +++ b/src/archiveClient/handler_findFilesByRules_test.go @@ -1,3 +1,4 @@ +//go:build exclude package archiveClient import ( diff --git a/src/archiveClient/handler_findGitFiles_test.go b/src/archiveClient/handler_findGitFiles_test.go index e14f09a1..eba2eca0 100644 --- a/src/archiveClient/handler_findGitFiles_test.go +++ b/src/archiveClient/handler_findGitFiles_test.go @@ -1,3 +1,4 @@ +//go:build exclude package archiveClient import ( From d492e6acfe2903a193c383783f589c3ed16fbf3d Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Sun, 18 Aug 2024 14:02:27 +0300 Subject: [PATCH 5/8] added git vendor commands to shell hook --- default.nix | 2 +- flake.nix | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 0a21aaf1..c3ffde5f 100644 --- a/default.nix +++ b/default.nix @@ -7,7 +7,7 @@ src = self; #zcli; nativeBuildInputs = with pkgs; [ go ]; - vendorHash = "sha256-XRnhK5vakEniRsgeEyBR+8RNwRO92KC9AXXMaYPs7Qc="; + vendorHash = null; installPhase = '' mkdir -p $out/bin diff --git a/flake.nix b/flake.nix index b6281b26..0cdc39ad 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,12 @@ perSystem = { config, pkgs, system, ... }: { packages.default = (import ./default.nix { inherit pkgs self; }); devShells.default = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ got ]; + nativeBuildInputs = with pkgs; [ go ]; + shellHook = '' + go mod vendor + git add vendor/. + echo -e '\033[0;33mprepared vendor files\033[0m' + ''; }; }; }; From 4977bd2d0c5f760b8ca2cbf43ce60ddde830cabc Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Fri, 23 Aug 2024 16:31:47 +0300 Subject: [PATCH 6/8] changed description Signed-off-by: Arbel Arad --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 0cdc39ad..b7ef2ce3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Arbel's zcli flake"; + description = "Zerops CLI utility"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; From 67cc4322eddf6e84a735c2de4a00d2120ebc5335 Mon Sep 17 00:00:00 2001 From: Nermal Date: Tue, 27 Aug 2024 14:47:03 +0530 Subject: [PATCH 7/8] feat: beautify readme (#166) --- CONTRIBUTING.md | 3 ++ README.md | 105 ++++++++++++++++++++++++++++++++++------- tools/npm/README.md | 82 ++++++++++++++++++++++++++++++++ tools/npm/package.json | 4 +- 4 files changed, 177 insertions(+), 17 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 tools/npm/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..1f16e573 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,3 @@ +## Contributing Guide + +work in progress \ No newline at end of file diff --git a/README.md b/README.md index a0301508..6f0961e9 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,116 @@ -# Zerops zCLI +![Zerops](https://github.com/zeropsio/recipe-shared-assets/blob/main/covers/svg/cover-zcli.svg) -Zerops zCLI is a command line utility for working with [zerops.io](https://zerops.io). It's used -for **CI/CD** development and CLI lovers. +

+ Zerops zCLI +
+
+

+ +

+
+ A Command Line Utility / Command Line Interface used for interacting with Zerops platform. +
+

+ +

+Made with ❤️ for CI/CD development and CLI lovers. +
+

+ +
+ +
+ +[![CI](https://github.com/zeropsio/zcli/actions/workflows/main.yml/badge.svg)](https://github.com/zeropsio/zcli/actions/workflows/ci.yml) +[![NPM Downloads](https://img.shields.io/npm/d18m/%40zerops%2Fzcli)](https://www.npmjs.com/package/@zerops/zcli) +[![npm version](https://badge.fury.io/js/@zerops%2Fzcli.svg)](https://badge.fury.io/js/@zerops%2Fzcli) +[![Discord](https://img.shields.io/discord/735781031147208777)](https://discord.gg/xxzmJSDKPT) +[![npm bundle size](https://img.shields.io/bundlephobia/min/%40zerops%2Fzcli)](https://www.npmjs.com/package/@zerops/zcli) + +
+ +
+ +

+Read the docs → +
+

## Supported platforms -* Windows -* Linux -* MacOS (arm64, amd64) +- Windows +- Linux +- MacOS (arm64, amd64) +- NixOS ## Requirements -* [wireguard](https://www.wireguard.com) +- [Wireguard](https://www.wireguard.com/install/) - utilized by `zcli vpn` command. ## Install zCLI +### Package managers + +#### Npm + +```sh +npm i -g @zerops/zcli +``` + ### Windows -Execute following command in PowerShell + +Execute following command in PowerShell: + ```powershell irm https://zerops.io/zcli/install.ps1 | iex ``` ### Linux/MacOS -Execute following command in Terminal + +Execute following command in Terminal: + ```shell curl -L https://zerops.io/zcli/install.sh | sh ``` -### Package managers +### NixOS -#### Npm +- Clone this repository +- `cd zcli` into the root of the cloned repository and run `nix develop`. +- Run `nix build` to build the binary / execuetable of zCli. +- zCLI's binary / execuetable will be present in `./result/bin/zcli`. + +Currently, the zCLI is distributed for Linux (x86 & x64 architecture), macOS (x64 & M1 architecture) and Windows (x64 architecture). + +> [!TIP] +> To download the zCLI directly, use the [latest release](https://github.com/zeropsio/zcli/releases/latest/) on GitHub. + +## Quick Start + +- Create a new personal access token from [settings/token-management](http://app.zerops.io/settings/token-management). + +- Login to zCLI using the personal access token using the following command: + +```Shell +zcli login ``` -npm i -g @zerops/zcli + +- Push your project using the following command: + +```Shell +zcli push ``` -Currently, the zCLI is distributed for Linux (x86 & x64 architecture), macOS (x64 & M1 architecture) and Windows (x64 architecture). -To download the zCLI directly, use the [latest release](https://github.com/zeropsio/zcli/releases/latest/) on GitHub. +## Additional Documentation + +For more information go through https://docs.zerops.io/references/cli. + +## Want to Contribute? + +Contributions to zCLI are welcome and highly appreciated. However, We would like you to go through [CONTRIBUTING.md](https://github.com/zeropsio/zcli/blob/main/CONTRIBUTING.md). + +## Community -## Additional documentation +To chat with other community members, you can join the [Zerops Discord Server](https://discord.gg/xxzmJSDKPT). -https://docs.zerops.io/references/cli diff --git a/tools/npm/README.md b/tools/npm/README.md new file mode 100644 index 00000000..4a37155b --- /dev/null +++ b/tools/npm/README.md @@ -0,0 +1,82 @@ +![Zerops](https://github.com/zeropsio/recipe-shared-assets/blob/main/covers/svg/cover-zcli.svg) + +

+ Zerops zCLI +
+
+

+ +

+
+ A Command Line Utility / Command Line Interface used for interacting with Zerops platform. +
+

+ +

+Made with ❤️ for CI/CD development and CLI lovers. +
+

+ +
+ +
+ +[![CI](https://github.com/zeropsio/zcli/actions/workflows/main.yml/badge.svg)](https://github.com/zeropsio/zcli/actions/workflows/ci.yml) +[![NPM Downloads](https://img.shields.io/npm/d18m/%40zerops%2Fzcli)](https://www.npmjs.com/package/@zerops/zcli) +[![npm version](https://badge.fury.io/js/@zerops%2Fzcli.svg)](https://badge.fury.io/js/@zerops%2Fzcli) +[![Discord](https://img.shields.io/discord/735781031147208777)](https://discord.gg/xxzmJSDKPT) +[![npm bundle size](https://img.shields.io/bundlephobia/min/%40zerops%2Fzcli)](https://www.npmjs.com/package/@zerops/zcli) + +
+ +
+ +

+Read the docs → +
+

+ +## Install + +```sh +npm i -g @zerops/zcli +``` + +Check out more installation ways at [zeropsio/zcli](https://github.com/zeropsio/zcli). + +[!TIP] +> To download the zCLI directly, use the [latest release](https://github.com/zeropsio/zcli/releases/latest/) on GitHub. + +## Requirements + +- [Wireguard](https://www.wireguard.com/install/) - utilized by `zcli vpn` command. + +## Quick Start + +- Create a new personal access token from [settings/token-management](http://app.zerops.io/settings/token-management). + +- Login to zCLI using the personal access token using the following command: + +```Shell +zcli login +``` + +- Push your project using the following command: + +```Shell +zcli push +``` + +## Support + +Having trouble? Get help in the official [Zerops Discord Server](https://discord.gg/xxzmJSDKPT). + + +## Additional Documentation + +For more information go through [zCLI Documentation](https://docs.zerops.io/references/cli). + +## Want to Contribute? + +Contributions to zCLI are welcome and highly appreciated. However, We would like you to go through [CONTRIBUTING.md](https://github.com/zeropsio/zcli/blob/main/CONTRIBUTING.md). + diff --git a/tools/npm/package.json b/tools/npm/package.json index 10863295..2150a170 100644 --- a/tools/npm/package.json +++ b/tools/npm/package.json @@ -1,6 +1,7 @@ { "name": "@zerops/zcli", "version": "v0.0.0-zerops", + "description": "The command-line interface used for interacting with Zerops Platform.", "main": "./utils/binary.js", "license": "MIT", "private": false, @@ -18,7 +19,8 @@ }, "files": [ "/utils", - "package.json" + "package.json", + "README.md" ], "scripts": { "postinstall": "node ./utils/install.js", From a75c8ade5864ad19d3eba832ec358ddca82f169b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1?= Date: Tue, 27 Aug 2024 11:22:48 +0200 Subject: [PATCH 8/8] Update README.md --- README.md | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6f0961e9..a25dc6c0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ [![NPM Downloads](https://img.shields.io/npm/d18m/%40zerops%2Fzcli)](https://www.npmjs.com/package/@zerops/zcli) [![npm version](https://badge.fury.io/js/@zerops%2Fzcli.svg)](https://badge.fury.io/js/@zerops%2Fzcli) [![Discord](https://img.shields.io/discord/735781031147208777)](https://discord.gg/xxzmJSDKPT) -[![npm bundle size](https://img.shields.io/bundlephobia/min/%40zerops%2Fzcli)](https://www.npmjs.com/package/@zerops/zcli) @@ -36,17 +35,21 @@
-## Supported platforms +### Supported platforms - Windows - Linux - MacOS (arm64, amd64) - NixOS -## Requirements +### Optional requirements - [Wireguard](https://www.wireguard.com/install/) - utilized by `zcli vpn` command. + +
+ + ## Install zCLI ### Package managers @@ -82,12 +85,23 @@ curl -L https://zerops.io/zcli/install.sh | sh Currently, the zCLI is distributed for Linux (x86 & x64 architecture), macOS (x64 & M1 architecture) and Windows (x64 architecture). + + +
+ +
+ + > [!TIP] -> To download the zCLI directly, use the [latest release](https://github.com/zeropsio/zcli/releases/latest/) on GitHub. +> To download the zCLI directly, locate the binary for your OS in the [latest release](https://github.com/zeropsio/zcli/releases/latest/) on GitHub. + + +
+ ## Quick Start -- Create a new personal access token from [settings/token-management](http://app.zerops.io/settings/token-management). +- Create a new personal access token at [settings/token-management](http://app.zerops.io/settings/token-management) in Zerops GUI. - Login to zCLI using the personal access token using the following command: @@ -95,21 +109,32 @@ Currently, the zCLI is distributed for Linux (x86 & x64 architecture), macOS (x6 zcli login ``` -- Push your project using the following command: +- Run zcli to list commands and the current status ```Shell -zcli push +zcli ``` +
+ + + ## Additional Documentation For more information go through https://docs.zerops.io/references/cli. + +
+ + ## Want to Contribute? Contributions to zCLI are welcome and highly appreciated. However, We would like you to go through [CONTRIBUTING.md](https://github.com/zeropsio/zcli/blob/main/CONTRIBUTING.md). + +
+ ## Community To chat with other community members, you can join the [Zerops Discord Server](https://discord.gg/xxzmJSDKPT).