Skip to content

docs(arc-api): add CLI page #136

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
152 changes: 152 additions & 0 deletions docs/arc-api-docs/packages/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
@sourceloop/cli /

# @sourceloop-cli

<a style="position: relative; top: 10px;" href="https://sourcefuse.github.io/arc-docs/arc-api-docs" target="_blank"><img src="https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/docs/assets/logo-dark-bg.png?raw=true" alt="ARC By SourceFuse logo" title="ARC By SourceFuse" align="right" width="150" /></a>

This is a `sourceloop` based cli that provides commands to scaffold a monorepo, add extensions, facades and microservices to it.

## Installation

```shell
npm install @sourceloop/cli
```

After installation, use either sl or arc to run any of the CLI commands.

## Commands

<!-- commands -->
- sl autocomplete
- sl cdk
- sl extension
- sl help
- sl mcp
- sl microservice
- sl scaffold
- sl update

## sl autocomplete

Display autocomplete installation instructions

```
USAGE
$ sl autocomplete

OPTIONS
-r, --refresh-cache

EXAMPLES
$ sl autocomplete
$ sl autocomplete bash
$ sl autocomplete zsh
$ sl autocomplete --refresh-cache
```

## sl cdk

Add arc-cdk to your project

```
USAGE
$ sl cdk

OPTIONS
-a, --applicationClassName
-d, --dir
-i, --iac=(lambda)
-o, --overwriteDockerfile
-p, --packageJsonName
-r, --relativePathToApp
```

## sl extension

Generate a local extension package in the packages folder.

```
USAGE
$ sl extension
```

## sl help

Show help for a specific command.

```
USAGE
$ sl help
```

## sl mcp

Run MCP server for CLI. This command is used internally.

```
USAGE
$ sl mcp

DESCRIPTION
Command that runs an MCP server for the sourceloop CLI, this is not supposed to be run directly, but rather used by
the MCP client to interact with the CLI commands.
You can use it using the following MCP server configuration:
"sourceloop": {
"command": "npx",
"args": ["@sourceloop/cli", "mcp"],
"timeout": 300
}
```

## sl microservice

Add a microservice to services or facades folder. Supports custom and base microservice setup.

```
USAGE
$ sl microservice

OPTIONS
-p, --uniquePrefix
-s, --baseService
--[no-]baseOnService
--customMigrations
--datasourceName
--datasourceType=(postgres|mysql)
--[no-]facade
--help
--includeMigrations
--sequelize

```

## sl scaffold

Scaffold a new ARC-based monorepo with initial structure.

```
USAGE
$ sl scaffold


OPTIONS
--cwd
--description
--helmPath
--help
--integrateWithBackstage
--issuePrefix
--jenkinsfile
--owner
```

## sl update

Update the dependencies of a LoopBack project.

```
USAGE
$ sl update

```
<!-- commandsstop -->
3 changes: 3 additions & 0 deletions docs/arc-api-docs/packages/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: Packages
nav:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tyagi-Sunny Sir,this adds a single navigation item labeled "CLI" that links to the file cli.md .

- CLI: cli.md