@rogs/cli
v0.1.3
Published
Personal cross-platform CLI for running rogs commands
Readme
rogs
Personal CLI so one command works across your machines.
Install
npm install -g @rogs/cliRequires Node.js 18 or newer.
Usage
rogs --help
rogs --version
rogs list
rogs update
rogs 9router --help
rogs 9router pull
rogs 9router pull --version 3
rogs 9router pull --target ./db.json
rogs 9router push
rogs 9router push --target ./db.json
rogs 9router push --file-name router-config.jsonOutput Style
The CLI uses a consistent terminal output format:
> ...for progress and informational messagesOK ...for successful completionERROR ...for failures with a short next step when helpful
rogs 9router pull downloads the latest 9router config over HTTPS.
Default pull behavior:
- scans candidate locations for an existing
db.json - updates every existing
db.jsonit finds - if none exists yet, creates one in the preferred default location
Candidate locations:
- macOS:
~/.9router/db.json,~/Library/Application Support/9router/db.json - Linux:
~/.9router/db.json,${XDG_CONFIG_HOME:-~/.config}/9router/db.json - Windows:
~/.9router/db.json,%APPDATA%\\9router\\db.json
Set CEO_ROGS_9ROUTER_API_KEY before running it.
rogs 9router push reads the local JSON file, validates it, and uploads it to POST /api/9router.
Default push behavior:
- scans the same candidate locations for existing
db.json - uploads only when all found files have the same JSON content
- if multiple files differ, stops and asks you to sync them first or use
--target
Upload options:
--target PATHto choose a different local JSON file--file-name NAMEto override the uploaded file name sent to the API
Publish
npm login
npm publish --access publicBecause the package name is scoped, the install command can stay stable while the CLI command remains just rogs.
Test
npm testIf your shell environment blocks node --test, you can run the test file directly:
node ./test/cross-platform.test.jsUpdate
rogs updateThis updates the global CLI and shows both the current version and the installed version after the update completes.
Example output:
> Current version: 0.1.2
> Updating rogs...
OK rogs updated successfully.
Current version: 0.1.2
Updated version: latestVersion
rogs --versionExample output:
rogs 0.1.2