Skip to content

Commit

Permalink
doc: added documentation for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye committed Apr 28, 2024
1 parent 91fac39 commit bcc968e
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
63 changes: 63 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SAC (Student Activity Calendar) CLI

[![CLI](https://github.com/GenerateNU/sac/actions/workflows/cli.yml/badge.svg)](https://github.com/GenerateNU/sac/actions/workflows/cli.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/GenerateNU/sac/cli)](https://goreportcard.com/report/github.com/GenerateNU/sac/cli)
[![License](https://img.shields.io/github/license/GenerateNU/sac)](https://github.com/GenerateNU/sac/blob/main/LICENSE)



## Introduction
The SAC CLI is a tool designed to help manage and automate tasks for the GenerateNU Student Activity Calendar platform. It provides a comprehensive suite of commands for formatting, testing, linting, running, and managing databases and other configurations essential for the SAC platform.

## Table of Contents

1. [Installation](#installation)
2. [Usage](#usage)
3. [Available Commands](#available-commands)
4. [Command Aliases](#command-aliases)
5. [Dependencies](#dependencies)
6. [License](#license)

## Installation

To install the SAC CLI, clone the repository and run the following script from the root of the application:

```bash
./install_cli.sh
```

## Usage

To use the SAC CLI, you can run it with various flags or commands:

```
sac [flags]
sac [command]
```

## Available Commands

- **completion**: Generate the autocompletion script for the specified shell.
- **database**: Database management commands.
- **format**: Formatting commands.
- **help**: Help about any command.
- **lint**: Linting commands.
- **run**: Run commands for backend and frontend.
- **setup**: Installs and sets up the project. (WIP)
- **swagger**: Run swagger initialization for backend openapi spec.
- **test**: Testing commands.

For more detailed information about a command, use:

```bash
sac [command] --help
```

## Command Aliases

Several commands in the SAC CLI are equipped with short aliases to make them quicker and easier to use. For example, a command like `sac format frontend dashboard` which is pretty lengthy can be shortened to `sac f fe d`.

## Dependencies

- `golangci-lint`: A linter aggregator for Go, ensuring code quality.
- `gofumpt`: A stricter formatter for Go code, ensuring consistency.
2 changes: 1 addition & 1 deletion frontend/dashboard/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image';
import Image from "next/image";

export default function Home() {
return (
Expand Down
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rqlite/gorqlite v0.0.0-20230708021416-2acd02b70b79/go.mod h1:xF/KoXmrRyahPfo5L7Szb5cAAUl53dMWBh9cMruGEZg=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
Expand Down

0 comments on commit bcc968e

Please sign in to comment.