Skip to content

Commit

Permalink
Docs updated to include NPM distribution (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
satran004 authored Jan 13, 2025
1 parent 7059230 commit 18746cc
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 38 deletions.
4 changes: 3 additions & 1 deletion docs/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"index": "Introduction",
"yaci_cli_distribution": "Yaci CLI (Non Docker Dist)",
"docker": "Docker Distribution",
"yaci_cli_distribution": "Zip (Non-Docker) Distribution",
"yaci_cli_npm_distr": "NPM Distribution",
"how_to_use": "How to use",
"about": {
"title": "About",
Expand Down
27 changes: 27 additions & 0 deletions docs/pages/docker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Callout } from 'nextra/components'

## Yaci DevKit Installation

## Pre-requisites:
- Docker

## Installation

To install latest stable version of Yaci DevKit, run:

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://devkit.yaci.xyz/install.sh | bash
```

To install a specific version of Yaci DevKit, run:

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://devkit.yaci.xyz/install.sh | bash -s -- <version>
```

**Note:** Replace `<version>` with the desired version number without the `v` prefix.

## Zip Installation

Download the latest zip from [release section](https://github.com/bloxbean/yaci-devkit/releases) and unzip it.
<br/>
35 changes: 5 additions & 30 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,19 @@ with Blockfrost API endpoints, all easily deployable with Docker Compose for eff

## Distribution Types

1. **Yaci DevKit:** A Docker Compose-based distribution that includes all required components. This is the **recommended**
distribution for most users. Follow the installation instructions in the next section to install Yaci DevKit.
1. **Yaci DevKit (Docker) :** A Docker Compose-based distribution that includes all required components. This is the **recommended**
distribution for most users. Follow the installation instructions in [Yaci DevKit Docker page](/docker) to install Yaci DevKit.

2. **Yaci CLI (Non-Docker):** A ZIP distribution that includes only Yaci CLI. This distribution is useful for users who
2. **Yaci CLI Zip (Non-Docker):** A ZIP distribution that includes only Yaci CLI. This distribution is useful for users who
prefer to use Yaci CLI without Docker. With this distribution, you can download and manage required components like Cardano Node,
Ogmios, Kupo, and Yaci Store using Yaci CLI. For installation instructions, refer to the [Yaci CLI Installation](/yaci_cli_distribution) section.

This version improves readability and consistency in terminology.
3. **NPM Distribution**: You can also use Yaci Devkit and Yaci Viewer NPM distribution. For more information, check [NPM distribution](/yaci_cli_npm_distr) page.

## Yaci DevKit Installation

## Pre-requisites:
- Docker

## Installation

To install latest stable version of Yaci DevKit, run:

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://devkit.yaci.xyz/install.sh | bash
```

To install a specific version of Yaci DevKit, run:

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://devkit.yaci.xyz/install.sh | bash -s -- <version>
```

**Note:** Replace `<version>` with the desired version number without the `v` prefix.

## Zip Installation

Download the latest zip from [release section](https://github.com/bloxbean/yaci-devkit/releases) and unzip it.
<br/>

<Callout type={"error"}>
**Important:**

<Callout>
In Yaci DevKit **v0.9.1-beta** and later, the Yaci CLI's native executable is the default. If you encounter issues starting DevKit,
you can switch back to the Java version by setting the **`yaci_cli_mode`** environment variable to **`java`** in the `config/env` file within
the Yaci DevKit installation directory."
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/tutorials/meshjs/adminstrative-functions.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Callout } from 'nextra/components'

# Useful adminstrative functions

<Callout type={'info'}>
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/yaci_cli_distribution.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Callout } from 'nextra/components'

## Introduction
## Yaci Cli Zip Distribution

For users who prefer not to use Docker, there's a ZIP distribution that contains only Yaci CLI. This allows you to download
and manage necessary components like Cardano Node, Ogmios, Kupo, and Yaci Store directly through the command line.
Expand Down Expand Up @@ -32,7 +32,7 @@ Yaci CLI is currently supported on the following platforms:
- Unzip the downloaded file.
- You will find the `yaci-cli` binary in the unzipped folder, and the configuration files in the `config` folder.

### Mac OS
### Mac OS

On Mac OS, downloaded executables which are not signed by a registered entity are by default _quarantined_ and the kernel will refuse to execute them.
Assuming the archive has been downloaded and uncompressed to the a directory named `path/to/yaci-cli-distribution`, run the following command:
Expand Down
114 changes: 114 additions & 0 deletions docs/pages/yaci_cli_npm_distr.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import { Callout } from 'nextra/components'

## Yaci DevKit NPM Distribution (0.10.0-preview5 and later)

For users who prefer npm, you can install Yaci DevKit using the `npm install` command. When installing from npm,
you need to install both the `yaci-devkit` and `yaci-viewer` packages separately.

## Supported Platforms

Like the non-Docker ZIP distribution, the npm distribution is currently supported on the following platforms:

1. **Linux x86**: Tested on Ubuntu 20.04 and Ubuntu 22.04
2. **macOS 14 (Arm64) or later**


## Installation

### Yaci DevKit Installation

```
npm i -g @bloxbean/yaci-devkit
```

### Yaci Viewer Installation

```
npm install -g @bloxbean/yaci-viewer
```

<Callout type="warning">
The following commands are used for the NPM distribution instead of the standard `devkit` or `yaci-cli` commands:

- **`yaci-devkit`**: Starts the Yaci CLI and other components.
- **`yaci-viewer`**: Starts the Yaci Viewer.

</Callout>

## Yaci DevKit - Commands

There is a new command, `up`, which handles both the download process and devnet creation.

### **Commands**

1. **Download and Start Cardano Node**

```bash
yaci-devkit up
```
- Downloads the Cardano node (if not already downloaded) and starts a new devnet.
- You can pass other node-creation-specific arguments (same as the `create-node` command), such as --block-time or --port.

2. **Interactive Mode**

If you want to interact with the running processes using `yaci-cli`, pass the `--interactive` option to the `up` command.

```bash
yaci-devkit up --interactive
```
- Downloads the node (if not already downloaded), starts a new devnet, and launches the `yaci-cli` prompt.

3. **Yaci Store Mode (Blockfrost-Compatible API Endpoints)**

```bash
yaci-devkit up --enable-yaci-store
```
- Downloads and starts the Cardano node, Yaci Store, and Ogmios (used for script cost evaluation).
- Add `--interactive` to enter the `yaci-cli` prompt.

4. **Kupomios Mode (Ogmios + Kupo)**

```bash
yaci-devkit up --enable-kupomios
```
- Downloads and starts the Cardano node, Ogmios, and Kupo.

For a full list of Yaci CLI commands, check the Yaci DevKit [documentation](/commands).

## Yaci Viewer Commands

Once the Yaci DevKit DevNet with yaci-store support is running, you can run Yaci Viewer using `yaci-viewer` command.

```bash
yaci-viewer
```

By default, Yaci Viewer connects to a Yaci-Store backend running on `localhost` at port `8080`.


### Configuration Options

If you need to connect to a Yaci-Store backend running on a different host or port, you can configure Yaci Viewer in one of the following ways:

#### Option 1: Using a `.env` File

Create a `.env` file in the same directory where you are starting Yaci Viewer, and specify the following environment variables:

- `PUBLIC_INDEXER_BASE_URL`: The base URL for the indexer API. Default: `http://localhost:8080/api/v1`.
- `PUBLIC_INDEXER_WS_URL`: The WebSocket URL for live updates. Default: `ws://localhost:8080/ws/liveblocks`.

#### Option 2: Using Command-Line Arguments

You can also specify the indexer base URL and WebSocket URL directly via command-line arguments:

```bash
yaci-viewer --indexerBaseUrl http://new-url.com/api/v1 --indexerWsUrl ws://new-url.com/ws/liveblocks
```

### Notes

- Ensure that the YaciDevKit or Yaci-Store backend is running and accessible before starting Yaci Viewer.




5 changes: 0 additions & 5 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
"@types/mdx" "^2.0.0"
"@types/react" ">=16"

"@napi-rs/[email protected]":
version "0.1.16"
resolved "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.16.tgz"
integrity sha512-XfgsYqxhUE022MJobeiX563TJqyQyX4FmYCnqrtJwAfivESVeAJiH6bQIum8dDEYMHXCsG7nL8Ok0Dp8k2m42g==

"@napi-rs/simple-git@^0.1.9":
version "0.1.16"
resolved "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.16.tgz"
Expand Down

0 comments on commit 18746cc

Please sign in to comment.