|
|
@@ -1,6 +1,6 @@
|
|
|
---
|
|
|
name: init-perms
|
|
|
-description: "Initialize generous Claude Code permissions in current project. Creates .claude/settings.local.json with common dev tool permissions."
|
|
|
+description: "Initialize generous Claude Code permissions in current project. Creates .claude/settings.local.json with dev-shell-tools and common dev tool permissions."
|
|
|
---
|
|
|
|
|
|
# /init-perms
|
|
|
@@ -9,15 +9,22 @@ Initialize project-local Claude Code permissions for a comfortable development e
|
|
|
|
|
|
## What This Does
|
|
|
|
|
|
-Creates `.claude/settings.local.json` in the current project with pre-approved permissions for common development tools:
|
|
|
+Creates `.claude/settings.local.json` in the current project with pre-approved permissions for modern CLI tools from [dev-shell-tools](https://github.com/0xDarkMatter/dev-shell-tools):
|
|
|
|
|
|
-- **Git**: Full git access (`git:*`)
|
|
|
-- **File ops**: `ls`, `mkdir`, `cat`, `wc`, `tree`
|
|
|
-- **Data processing**: `jq`, `yq`
|
|
|
-- **Package managers**: `npm`, `node`, `python`, `uv`, `pip`
|
|
|
-- **Task runners**: `just`
|
|
|
-- **Network**: `curl`
|
|
|
-- **Windows**: `powershell`
|
|
|
+**Core Tools:**
|
|
|
+- **Git**: Full git access, lazygit, gh (GitHub CLI)
|
|
|
+- **File ops**: ls, mkdir, cat, wc, tree, eza, bat
|
|
|
+- **Search**: rg (ripgrep), fd, fzf, ast-grep/sg
|
|
|
+- **Navigation**: zoxide/z, broot/br
|
|
|
+- **Data processing**: jq, yq, sd
|
|
|
+- **Diff tools**: delta, difft (difftastic)
|
|
|
+- **Analysis**: tokei, procs, hyperfine
|
|
|
+
|
|
|
+**Dev Tools:**
|
|
|
+- **Package managers**: npm, node, python, uv, pip
|
|
|
+- **Task runners**: just
|
|
|
+- **Network**: curl, http (httpie)
|
|
|
+- **Windows**: powershell
|
|
|
|
|
|
## Execution Flow
|
|
|
|
|
|
@@ -65,16 +72,36 @@ Write this content to `.claude/settings.local.json`:
|
|
|
"Bash(mkdir:*)",
|
|
|
"Bash(cat:*)",
|
|
|
"Bash(wc:*)",
|
|
|
+ "Bash(tree:*)",
|
|
|
+ "Bash(curl:*)",
|
|
|
+ "Bash(rg:*)",
|
|
|
+ "Bash(fd:*)",
|
|
|
+ "Bash(fzf:*)",
|
|
|
+ "Bash(z:*)",
|
|
|
+ "Bash(zoxide:*)",
|
|
|
+ "Bash(br:*)",
|
|
|
+ "Bash(broot:*)",
|
|
|
+ "Bash(ast-grep:*)",
|
|
|
+ "Bash(sg:*)",
|
|
|
+ "Bash(bat:*)",
|
|
|
+ "Bash(eza:*)",
|
|
|
+ "Bash(delta:*)",
|
|
|
+ "Bash(difft:*)",
|
|
|
"Bash(jq:*)",
|
|
|
"Bash(yq:*)",
|
|
|
+ "Bash(sd:*)",
|
|
|
+ "Bash(lazygit:*)",
|
|
|
+ "Bash(gh:*)",
|
|
|
+ "Bash(tokei:*)",
|
|
|
+ "Bash(uv:*)",
|
|
|
+ "Bash(just:*)",
|
|
|
+ "Bash(http:*)",
|
|
|
+ "Bash(procs:*)",
|
|
|
+ "Bash(hyperfine:*)",
|
|
|
"Bash(npm:*)",
|
|
|
"Bash(node:*)",
|
|
|
"Bash(python:*)",
|
|
|
- "Bash(uv:*)",
|
|
|
"Bash(pip:*)",
|
|
|
- "Bash(just:*)",
|
|
|
- "Bash(tree:*)",
|
|
|
- "Bash(curl:*)",
|
|
|
"Bash(powershell -Command:*)",
|
|
|
"Bash(powershell.exe:*)"
|
|
|
],
|
|
|
@@ -89,13 +116,18 @@ Write this content to `.claude/settings.local.json`:
|
|
|
|
|
|
Report to user:
|
|
|
```
|
|
|
-Created .claude/settings.local.json with development permissions.
|
|
|
-
|
|
|
-Allowed tools:
|
|
|
- - git, ls, mkdir, cat, wc, tree
|
|
|
- - jq, yq (data processing)
|
|
|
- - npm, node, python, uv, pip
|
|
|
- - just, curl, powershell
|
|
|
+Created .claude/settings.local.json with dev-shell-tools permissions.
|
|
|
+
|
|
|
+Allowed tools (37 total):
|
|
|
+ Core: git, ls, mkdir, cat, wc, tree, curl
|
|
|
+ Search: rg, fd, fzf, ast-grep, sg
|
|
|
+ Navigation: z, zoxide, br, broot
|
|
|
+ View: bat, eza, delta, difft
|
|
|
+ Data: jq, yq, sd
|
|
|
+ Git: lazygit, gh
|
|
|
+ Analysis: tokei, procs, hyperfine
|
|
|
+ Dev: npm, node, python, pip, uv, just, http
|
|
|
+ Windows: powershell
|
|
|
|
|
|
To customize: edit .claude/settings.local.json
|
|
|
To add to git: git add .claude/settings.local.json
|
|
|
@@ -107,7 +139,7 @@ To add to git: git add .claude/settings.local.json
|
|
|
|------|--------|
|
|
|
| `--force` | Overwrite existing without asking |
|
|
|
| `--minimal` | Only git, ls, cat, mkdir |
|
|
|
-| `--full` | Add additional tools (docker, kubectl, etc.) |
|
|
|
+| `--full` | Add cloud/container tools (docker, kubectl, terraform, aws, etc.) |
|
|
|
|
|
|
### Minimal Template (--minimal)
|
|
|
|
|
|
@@ -129,6 +161,8 @@ To add to git: git add .claude/settings.local.json
|
|
|
|
|
|
### Full Template (--full)
|
|
|
|
|
|
+Includes everything from standard template plus:
|
|
|
+
|
|
|
```json
|
|
|
{
|
|
|
"permissions": {
|
|
|
@@ -138,24 +172,46 @@ To add to git: git add .claude/settings.local.json
|
|
|
"Bash(mkdir:*)",
|
|
|
"Bash(cat:*)",
|
|
|
"Bash(wc:*)",
|
|
|
+ "Bash(tree:*)",
|
|
|
+ "Bash(curl:*)",
|
|
|
+ "Bash(wget:*)",
|
|
|
+ "Bash(rg:*)",
|
|
|
+ "Bash(fd:*)",
|
|
|
+ "Bash(fzf:*)",
|
|
|
+ "Bash(z:*)",
|
|
|
+ "Bash(zoxide:*)",
|
|
|
+ "Bash(br:*)",
|
|
|
+ "Bash(broot:*)",
|
|
|
+ "Bash(ast-grep:*)",
|
|
|
+ "Bash(sg:*)",
|
|
|
+ "Bash(bat:*)",
|
|
|
+ "Bash(eza:*)",
|
|
|
+ "Bash(delta:*)",
|
|
|
+ "Bash(difft:*)",
|
|
|
"Bash(jq:*)",
|
|
|
"Bash(yq:*)",
|
|
|
+ "Bash(sd:*)",
|
|
|
+ "Bash(lazygit:*)",
|
|
|
+ "Bash(gh:*)",
|
|
|
+ "Bash(tokei:*)",
|
|
|
+ "Bash(uv:*)",
|
|
|
+ "Bash(just:*)",
|
|
|
+ "Bash(http:*)",
|
|
|
+ "Bash(procs:*)",
|
|
|
+ "Bash(hyperfine:*)",
|
|
|
"Bash(npm:*)",
|
|
|
"Bash(node:*)",
|
|
|
"Bash(python:*)",
|
|
|
- "Bash(uv:*)",
|
|
|
"Bash(pip:*)",
|
|
|
- "Bash(just:*)",
|
|
|
- "Bash(tree:*)",
|
|
|
- "Bash(curl:*)",
|
|
|
- "Bash(wget:*)",
|
|
|
"Bash(docker:*)",
|
|
|
"Bash(docker-compose:*)",
|
|
|
"Bash(kubectl:*)",
|
|
|
+ "Bash(helm:*)",
|
|
|
"Bash(terraform:*)",
|
|
|
"Bash(aws:*)",
|
|
|
"Bash(gcloud:*)",
|
|
|
"Bash(az:*)",
|
|
|
+ "Bash(wrangler:*)",
|
|
|
"Bash(powershell -Command:*)",
|
|
|
"Bash(powershell.exe:*)"
|
|
|
],
|
|
|
@@ -172,3 +228,4 @@ To add to git: git add .claude/settings.local.json
|
|
|
- Global permissions in `~/.claude/settings.json` still apply
|
|
|
- Project permissions can only ADD to global, not remove
|
|
|
- Restart Claude Code session for changes to take effect
|
|
|
+- Tools from: https://github.com/0xDarkMatter/dev-shell-tools
|