@trimjs/trim-cli
v0.1.1
Published
TRIM NAS CLI and Agent Skill
Readme
@trimjs/trim-cli
The command-line client and Agent Skill for TRIM NAS. It supports macOS, Linux, and Windows on x64 and arm64.
Quick Start
Node.js 18 or later and npx are required:
npx -y @trimjs/trim-cli@latest install
trim-cli --helpThe install command performs two actions:
- installs the same version of the
trim-clicommand globally through npm; - installs the matching Agent Skill in
~/.agents/skills/trim-cli.
Codex and other compatible agents can discover SKILL.md from that directory.
Restart an already running agent if the newly installed Skill does not appear.
Other Installation Modes
# Install only the Skill without installing the global trim-cli command
npx -y @trimjs/trim-cli@latest install --skill-only
# Install the Skill in .agents/skills/trim-cli under the current project
npx -y @trimjs/trim-cli@latest install --project
# Install only the global trim-cli command without copying the Skill
npx -y @trimjs/trim-cli@latest install --skip-skillYou can also run the CLI without installing it permanently:
npx -y @trimjs/trim-cli@latest --help
npx -y @trimjs/trim-cli@latest --versionThe npm package contains native binaries for every supported platform. The launcher selects the correct binary for the current operating system and CPU architecture. Unsupported platforms are rejected before the CLI starts.
Sign In to TRIM NAS
Installation does not sign in automatically, enter account credentials, or open an authorization page. Start the interactive OAuth PKCE flow before first use:
trim-cli --profile home --host <nas-host> --port <port> loginThe production authorization flow is:
- The CLI displays an authorization URL.
- The user signs in and approves access in a browser.
- The user pastes the one-time code back into the CLI prompt.
Use --no-open when the CLI cannot open a browser automatically:
trim-cli --profile home --host <nas-host> --port <port> login --no-openRemote devices using unencrypted HTTP must be explicitly allowed:
trim-cli --profile home --host <nas-host> --port 5666 \
--scheme http --allow-insecure-http login --no-openAfter signing in, commands can be run as follows:
trim-cli --profile home system info
trim-cli --profile home file ls /vol1
trim-cli --profile home photos folders
trim-cli --profile home docker container ls --allWrite operations still require an explicit --yes. Do not include an
authorization code, access token, or refresh token in command arguments, logs,
or error reports.
Update and Uninstall
Run the installation command again to update to the latest version:
npx -y @trimjs/trim-cli@latest installRemove only the global command with:
npm uninstall --global @trimjs/trim-cliThis does not remove an installed Skill. To remove it, delete only
~/.agents/skills/trim-cli. A project-scoped installation is located at
.agents/skills/trim-cli inside that project.
Network and Private Registries
Package installation requires access to an npm registry. To use an internal registry, provide it through npm configuration:
npm_config_registry=https://<npm-registry>/ npx -y @trimjs/trim-cli@latest installAn HTTP 404 from the registry means the requested version is unavailable or the current npm account does not have permission to read it.
Verify the Version
trim-cli --version
npx -y @trimjs/trim-cli@latest --versionBoth commands should report the same version. Command behavior and detailed API
documentation are installed with the Skill under
~/.agents/skills/trim-cli/reference/.
