magnus-cli
v1.0.7
Published
Command line tool to pull and push source code files from a Rock RMS server
Readme
Magnus CLI
A command-line tool to pull source code files from a Rock RMS server.
Like the VSCode Magnus plugin, but for the command like.
Prerequisites
This tool uses the same connection endpoints as the VSCode Magnus plugin, so make sure its setup and working using the Magnus instructions.
Usage
Configuration
Before using the CLI, you need to configure your Rock RMS server connection:
npx magnus-cli configYou will be prompted to enter:
- Rock RMS server URL
- Username
- Password
List items from Rock RMS
List files and directories on the Rock RMS server:
❯ npx magnus-cli ls
✔ Found 6 items in root
📁 /appletvapps/ Apple TV Apps
📁 /lavaapplication/ Helix
📁 /shortcodes/ Lava Shortcodes
📁 /mobileapps/ Mobile Apps
📁 /serverfs/ Server Filesystem
📁 /websites/ WebsitesChange Endpoint/Directory
Change the directory on the Rock RMS server:
npx magnus-cli cd /lavaapplication/This command:
- Changes your current directory on the server
- Stores the path in a local
.magnusfile in your current directory - Lists the contents of the directory
The stored directory is used as the default for the list command when no path is specified.
Pull a directory from Rock RMS
Once you cd into your target directory you can pull the contents from the Rock RMS server to your local machine:
npx magnus-cli pullSpecial handling for application endpoints:
- When pulling from
/lavaapplication/application-endpoints/, the command will: - Automatically create directories for each endpoint
- Name files based on the endpoint name (converted to kebab-case)
- Include all files within each endpoint folder
Notes:
- If no output path is specified, files are saved in the current directory
- Directory structure is automatically created if it doesn't exist
- Folders outside of application endpoints are not currently supported for recursive pulling
Development
Setup
# Clone the repository
git clone https://github.com/bayside-church/magnus-cli.git
cd magnus-cli
# Install dependencies
pnpm install
# Build the project
pnpm build
# Link the CLI globally (optional)
pnpm link --globalCode
# Watch for changes and rebuild
pnpm dev
# Run linter
pnpm lintPublish
npm version patch
npm publish --access=public