Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add cli README.md #921

Merged
merged 4 commits into from
Mar 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## Project Introduction

laf-cli is a command-line tool designed to help developers quickly create, deploy, and manage applications on laf.

## Quick Start

To install laf-cli, use npm:
```bash
npm install -g laf-cli
```

Once installation is complete, verify the installation using:
```bash
laf -v
```

To log in, use the login command with your personal access token (PAT), which can be obtained from User Settings -> Personal Access Tokens:
```bash
laf login <pat>
```

View the list of applications and initialize an application:
```bash
laf app list
laf app init <appId>
```

For more commands and usage:
```bash
laf -h
```

## Development

To begin development, follow the steps below:

1. Navigate to the cli directory in the terminal:
```bash
cd cli
```

2. Install the required dependencies:
```bash
npm install
```

3. Run the watch command:
```bash
npm run watch
```

4. Open a new terminal and run link command:
```bash
npm link
```

5. Finally, verify that everything is working as expected:
```bash
laf -v
```

## File Tree

```
├── src
| ├── action
| | ├── application
| | ├── auth
| | ├── dependency
| | ├── function
| | ├── policy
| | ├── storage
| | └── website
| ├── api
| | └── v1
| ├── command
| | ├── application
| | ├── auth
| | ├── dependency
| | ├── function
| | ├── policy
| | ├── storage
| | └── website
| ├── common
| ├── config
| └── util
└── template
```