# Toystack CLI

![Toystack CLI](https://framerusercontent.com/images/6KcXakCf8FI9LB2mJXNjcHIreDA.png)

A powerful and intuitive command-line interface for seamlessly interacting with the Toystack platform — your modern cloud deployment solution.

[Visit Toystack.ai](https://toystack.ai) to learn more.

---

## 📥 Installation

Install the Toystack CLI globally via npm:

```bash
npm install -g toystack
```

---

## ⚙️ Usage

Run the following command to view available options:

```bash
toystack
```

or

```bash
npx toystack
```

This will list all the available commands, including **login**, **deploy**, **ls**, and **logout**.

---

## 🚀 Commands

### `toystack deploy` – Deploy Without Login

For **React** and **Astro.js** projects, you can deploy without logging in. This will deploy the project to the Toystack platform.

```bash
toystack deploy
```

or

```bash
npx toystack deploy
```

### `toystack login` – Login to Toystack

Authenticate using your Toystack account. This will provide a link for logging in. Once logged in, you can use other commands.

```bash
toystack login
```

or

```bash
npx toystack login
```

### `toystack ls` – List Repositories

Lists all the repositories that you have access to on the Toystack platform.

```bash
toystack ls
```

or

```bash
npx toystack ls
```

### `toystack deploy <repository-name> <branch-name>` – Deploy Project

Deploy any repository that is active on the Toystack platform.

- `repository-name` is the name of the repository you want to deploy (case sensitive).
- `branch-name` is the branch you want to deploy (case sensitive).

If not provided, it defaults to the repository and branch of the current directory.

```bash
toystack deploy <repository-name> <branch-name>
```

or

```bash
npx toystack deploy <repository-name> <branch-name>
```

### `toystack logout` – Log Out

Log out from your Toystack account.

```bash
toystack logout
```

or

```bash
npx toystack logout
```

---

## 🛠️ Additional Information

- Ensure that you are in a directory with an active Git repository when using deployment commands.
- For help with any command, use `toystack <command> --help`.

---

Happy deploying with Toystack! 🚀
