diff --git a/README.md b/README.md index 6642350..9ce453c 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,57 @@ After symlinking, configure hooks from `preferences/hooks-setup.md` — the auto --- +### Slash Commands on an Ubuntu Server (Manual Copy) + +Use this when you want a slash command on a server without cloning the repo. Manually copied files **do not auto-update** — repeat the copy after changing a command. + +Where the file goes decides where the command works: + +| Location | Scope | +|---|---| +| `~/.claude/commands/` | Every project for that user on the server | +| `/.claude/commands/` | Only that project | + +The filename becomes the command name — `update-deps.md` → `/update-deps`. + +**Option 1 — `scp` from your Windows machine** + +1. On the server, create the folder (one time): + ```bash + mkdir -p ~/.claude/commands + ``` +2. From PowerShell on your Windows machine, copy the file over: + ```powershell + scp C:\AI\slash-commands\update-deps.md @:~/.claude/commands/ + ``` + To copy every slash command at once: + ```powershell + scp C:\AI\slash-commands\*.md @:~/.claude/commands/ + ``` + +**Option 2 — `nano` directly on the server** + +1. SSH into the server and create the folder (one time): + ```bash + mkdir -p ~/.claude/commands + ``` +2. Open a new file named after the command: + ```bash + nano ~/.claude/commands/update-deps.md + ``` +3. Open the file in Gitea (`https://git.chns.tech/CHNS/AI/src/branch/main/slash-commands/`), copy the full contents (including the `---` front matter at the top), and paste into nano — right-click or `Ctrl+Shift+V` in most terminals +4. Save and exit: `Ctrl+O`, `Enter`, then `Ctrl+X` + +**Verify** + +```bash +ls ~/.claude/commands/ +``` + +Start a new Claude Code session on the server and type `/` — the command should appear in the list. + +--- + ### Cursor Cursor reads a `.cursorrules` file in the project root.