added information on getting slash commands onto an ubuntu server
This commit is contained in:
1 parent
e81584bac1
commit
72dc76b67b
1 file changed
+51
@@ -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 |
|
||||
| `<project>/.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 <user>@<server>:~/.claude/commands/
|
||||
```
|
||||
To copy every slash command at once:
|
||||
```powershell
|
||||
scp C:\AI\slash-commands\*.md <user>@<server>:~/.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.
|
||||
|
||||
Reference in new issue
Block a user