3 Commits

4 changed files with 117 additions and 2 deletions
+6
View File
@@ -4,9 +4,15 @@ on:
push:
branches:
- '**'
paths:
- '**/*.ts'
- '**/*.json'
pull_request:
branches:
- main
paths:
- '**/*.ts'
- '**/*.json'
jobs:
build:
+58 -1
View File
@@ -45,4 +45,61 @@ this will check the health, and if not setup, it will prompt you to set up the C
- `shsf file list`: List files in a storage. (use `shsf file list -h` first)
## Instructions
Use these commands for when you need to interact with shsf from the command line. Its faster than using the ui for almost all ops.
Use these commands for when you need to interact with shsf from the command line. Its faster than using the ui for almost all ops.
## Ui Links
Get the ui url with:
```bash
shsf uiurl
```
## Available UI Routes
Below are the main routes you can use in the SHSF web UI. These are not clickable links, but you can navigate to them in your browser.
**General**
- `/`: Home Page
**Documentation**
- `/docs`: Documentation
**Account**
- `/account`: Account Settings
- `/login`: Login
- `/register`: Register
**Functions**
- `/functions`: Shows your functions, grouped by their respective namespaces (requires auth).
- `/functions/:id`: View details for a specific function (requires auth).
**Other**
- `/admin`: Admin dashboard (admin only, requires authentication)
- `/storage`: Storage management (requires auth)
- `/cron-jobs`: Cron job management (requires auth)
- `/access-tokens`: Access token management (requires auth)
- `/guest-users`: Guest user management (requires auth)
- `/guest-access`: Guest access portal
### Example
After creating a function and receiving an ID (for example, 81), you can share the following URL with your human so they can view the function in the UI:
```
[UI_URL]/functions/[ID]
```
## Update
Update with your package manager of choice. Preferably pnpm:
```bash
pnpm add -g shsf-cli
```
Note that new features are often released and a user might tell you to do things that are only in the latest version. So its a good idea to always keep it updated.
It is also good practice to update this skill every now and then, as it might get new features that are not documented here yet.
Download the latest version with:
```
curl https://raw.githubusercontent.com/Space-Banane/shsf-cli/refs/heads/main/OpenclawSkill.md > /tmp/OpenclawSkill.md
```
and then replace the old one with the new one using `mv`.
## Missing a feature?
Features might be not documented yet, as this skill document rarely updates.
Use the shsf -h command to see options and features.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "shsf-cli",
"version": "2.0.3",
"version": "2.0.4",
"description": "",
"type": "module",
"files": [
+52
View File
@@ -0,0 +1,52 @@
import chalk from "chalk";
import { getApiClient } from "../api.js";
export const uiUrlDefinition = {
name: "uiurl",
description: "Get the URL for the SHSF UI.",
action: async () => {
await getUiURL();
},
};
async function getUiURL(): Promise<void> {
const client = await getApiClient();
try {
const response = await client.get<{ status: string; uiUrl: string }>("/api/global/uiUrl");
if (response.status === 200 && response.data.status === "OK") {
console.log(
`${chalk.green("✓")} SHSF UI URL: ${chalk.bgGreen.black(` ${response.data.uiUrl} `)}`
);
} else {
console.log(
`${chalk.yellow("!")} SHSF Status: ${chalk.bgYellow.black(" UNEXPECTED RESPONSE ")}`,
);
console.log(`Status Code: ${chalk.blue(response.status)}`);
console.log(`Response Data: ${JSON.stringify(response.data)}`);
}
} catch (error: any) {
if (error.response) {
console.error(
`${chalk.red("✗")} SHSF Status: ${chalk.bgRed.black(" UNHEALTHY ")}`,
);
console.error(`Status Code: ${chalk.red(error.response.status)}`);
console.error(
`Message: ${chalk.yellow(error.response.data.message || "Unknown error from server")}`,
);
} else if (error.request) {
console.error(
`${chalk.red("✗")} SHSF Status: ${chalk.bgRed.black(" DISCONNECTED ")}`,
);
console.error(
`Error: ${chalk.yellow("Could not connect to the SHSF instance. Check your connection or SHSF_INSTANCE URL.")}`,
);
} else {
console.error(
`${chalk.red("✗")} SHSF Status: ${chalk.bgRed.black(" LOCAL ERROR ")}`,
);
console.error(`Error: ${chalk.yellow(error.message)}`);
}
}
}