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/README.md b/README.md
index 6f0961e9..049db24c 100644
--- a/README.md
+++ b/README.md
@@ -21,11 +21,10 @@
-[![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)
+[![CI](https://img.shields.io/github/actions/workflow/status/zeropsio/zcli/main.yml?labelColor=EDEFF3&color=8F9DA8)](https://github.com/zeropsio/zcli/actions/workflows/ci.yml)
+[![NPM Downloads](https://img.shields.io/npm/d18m/%40zerops%2Fzcli?labelColor=EDEFF3&color=8F9DA8)](https://www.npmjs.com/package/@zerops/zcli)
+[![npm version](https://img.shields.io/badge/dynamic/json?color=8F9DA8&labelColor=EDEFF3&label=@zerops/zcli&query=version&url=https%3A%2F%2Fbadge.fury.io%2Fjs%2F@zerops%252Fzcli.json)](https://badge.fury.io/js/@zerops%2Fzcli)
+[![Discord](https://img.shields.io/discord/735781031147208777?labelColor=EDEFF3&color=8F9DA8)](https://discord.gg/xxzmJSDKPT)
@@ -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,22 +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).
-
diff --git a/default.nix b/default.nix
new file mode 100644
index 00000000..c3ffde5f
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,25 @@
+{ pkgs, self}:
+
+ pkgs.buildGoModule {
+ pname = "zcli";
+ version = "0..1";
+
+ src = self; #zcli;
+
+ nativeBuildInputs = with pkgs; [ go ];
+ vendorHash = null;
+
+ 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..b9302e67
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,58 @@
+{
+ "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,
+ "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "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"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 00000000..b7ef2ce3
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,26 @@
+{
+ description = "Zerops CLI utility";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ flake-parts.url = "github:hercules-ci/flake-parts";
+ };
+
+ outputs = { self, nixpkgs, ... }@inputs:
+ 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; [ go ];
+ shellHook = ''
+ go mod vendor
+ git add vendor/.
+ echo -e '\033[0;33mprepared vendor files\033[0m'
+ '';
+ };
+ };
+ };
+}
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 (
diff --git a/tools/npm/README.md b/tools/npm/README.md
index 7936161a..6b2aa6df 100644
--- a/tools/npm/README.md
+++ b/tools/npm/README.md
@@ -25,8 +25,7 @@
[![NPM Downloads](https://img.shields.io/npm/d18m/%40zerops%2Fzcli?labelColor=EDEFF3&color=8F9DA8)](https://www.npmjs.com/package/@zerops/zcli)
[![npm version](https://img.shields.io/badge/dynamic/json?color=8F9DA8&labelColor=EDEFF3&label=@zerops/zcli&query=version&url=https%3A%2F%2Fbadge.fury.io%2Fjs%2F@zerops%252Fzcli.json)](https://badge.fury.io/js/@zerops%2Fzcli)
[![Discord](https://img.shields.io/discord/735781031147208777?labelColor=EDEFF3&color=8F9DA8)](https://discord.gg/xxzmJSDKPT)
-[![npm bundle size](https://img.shields.io/bundlephobia/min/%40zerops%2Fzcli?labelColor=EDEFF3&color=8F9DA8)](https://www.npmjs.com/package/@zerops/zcli)
-
+
@@ -79,4 +78,3 @@ For more information go through [zCLI Documentation](https://docs.zerops.io/refe
## 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).
-