claudenv 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +243 -178
- package/bin/cli.js +265 -4
- package/package.json +1 -1
- package/scaffold/.claude/memories/README.md +44 -0
- package/scaffold/global/.claude/commands/autonomy.md +90 -0
- package/scaffold/global/.claude/commands/canon.md +33 -0
- package/scaffold/global/.claude/commands/decisions.md +29 -0
- package/scaffold/global/.claude/commands/deeper.md +55 -0
- package/scaffold/global/.claude/commands/just-code.md +26 -0
- package/scaffold/global/.claude/commands/why.md +33 -0
- package/scaffold/global/.claude/skills/vibe-decisions/SKILL.md +127 -0
- package/scaffold/global/.claude/skills/vibe-decisions/deep-dive-template.md +41 -0
- package/scaffold/global-claudenv/config.yaml +16 -0
- package/scaffold/global-claudenv/memories/INDEX.md +25 -0
- package/scaffold/global-claudenv/memories/canon/index.yaml +21 -0
- package/scaffold/global-claudenv/memories/user/preferences.md.example +16 -0
- package/src/autonomy.js +7 -1
- package/src/canon.js +214 -0
- package/src/decisions.js +161 -0
- package/src/doctor.js +175 -0
- package/src/hooks/decisions-logger.js +183 -0
- package/src/hooks/dispatcher.js +91 -0
- package/src/hooks/regen-index.js +198 -0
- package/src/hooks-gen.js +60 -5
- package/src/installer.js +56 -14
- package/src/loop.js +148 -42
- package/src/memory-context.js +63 -0
- package/src/memory-paths.js +86 -0
- package/src/memory.js +111 -0
- package/src/profiles.js +4 -0
- package/src/report.js +160 -0
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# claudenv
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/claudenv)
|
|
4
|
+
|
|
5
|
+
Set up [Claude Code](https://docs.anthropic.com/en/docs/claude-code) in any project with one command. claudenv analyzes your codebase and generates everything Claude needs to work effectively — documentation, rules, hooks, MCP servers, slash commands, **plus cross-session memory and vibe-decisions logging (1.3.0).**
|
|
6
|
+
|
|
7
|
+
> **New in 1.3.0** — split memory layout (`~/.claudenv/memories/` global + `.claude/memories/` project), `vibe-decisions` skill (auto-log in loop, pause-and-ask interactive), new CLI: `memory`, `decisions`, `canon`, `doctor`. Companion Python package `claudenv-memory` on PyPI (alpha). See [CHANGELOG.md](./CHANGELOG.md).
|
|
4
8
|
|
|
5
9
|
## Quick Start
|
|
6
10
|
|
|
@@ -8,244 +12,308 @@ One command to set up [Claude Code](https://docs.anthropic.com/en/docs/claude-co
|
|
|
8
12
|
npm i -g claudenv && claudenv
|
|
9
13
|
```
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Open Claude Code in any project and type `/claudenv`. That's it.
|
|
16
|
+
|
|
17
|
+
## What happens when you run `/claudenv`
|
|
18
|
+
|
|
19
|
+
Claude reads your code, asks a few questions, and generates:
|
|
20
|
+
|
|
21
|
+
- **CLAUDE.md** — project overview, architecture, key commands
|
|
22
|
+
- **Rules** — coding style, testing patterns, workflow guidelines (`.claude/rules/`)
|
|
23
|
+
- **MCP servers** — auto-detected from your stack, configured in `.mcp.json`
|
|
24
|
+
- **Slash commands** — `/init-docs`, `/update-docs`, `/validate-docs`, `/setup-mcp`, `/improve`, **`/deeper`**, **`/why`**, **`/decisions`**, **`/canon`**, **`/just-code`** (1.3.0)
|
|
25
|
+
- **Hooks** — validation on tool use, audit logging, decisions-logger (PostToolUse Write), regen-index (SessionEnd) — `.claude/settings.json`
|
|
26
|
+
|
|
27
|
+
Everything is committed to your repo. Team members get the same Claude experience.
|
|
12
28
|
|
|
13
|
-
##
|
|
29
|
+
## Autonomous Loop
|
|
14
30
|
|
|
15
|
-
|
|
31
|
+
The killer feature. `claudenv loop` runs Claude in headless mode, iterating over your project — planning improvements, implementing them one by one, committing each step.
|
|
16
32
|
|
|
17
33
|
```bash
|
|
18
|
-
|
|
34
|
+
claudenv loop --goal "add test coverage" --trust -n 5
|
|
19
35
|
```
|
|
20
36
|
|
|
21
|
-
|
|
37
|
+
**What it does:**
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
1. Creates a git safety tag (rollback anytime with `--rollback`)
|
|
40
|
+
2. Claude generates an improvement plan (`.claude/improvement-plan.md`)
|
|
41
|
+
3. Each iteration picks the next item, implements it, runs tests, commits
|
|
42
|
+
4. Stops when the plan is done, iterations run out, or it detects it's stuck
|
|
24
43
|
|
|
25
|
-
|
|
26
|
-
1. Read your manifest files, configs, and source code
|
|
27
|
-
2. Detect your tech stack, frameworks, and tooling
|
|
28
|
-
3. Ask you about the project (description, deployment, conventions)
|
|
29
|
-
4. Generate all documentation files
|
|
30
|
-
5. Search the [MCP Registry](https://registry.modelcontextprotocol.io) and configure MCP servers
|
|
31
|
-
6. Install slash commands for ongoing maintenance
|
|
44
|
+
### Common recipes
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
```bash
|
|
47
|
+
# Interactive mode — pauses between iterations so you can review
|
|
48
|
+
claudenv loop
|
|
34
49
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
| `/init-docs` | Regenerate documentation from scratch |
|
|
38
|
-
| `/update-docs` | Scan for changes and propose updates |
|
|
39
|
-
| `/validate-docs` | Check that documentation is complete and correct |
|
|
40
|
-
| `/setup-mcp` | Recommend and configure MCP servers |
|
|
41
|
-
| `/improve` | Analyze and make one improvement |
|
|
50
|
+
# Fully autonomous — no pauses, no permission prompts
|
|
51
|
+
claudenv loop --trust
|
|
42
52
|
|
|
43
|
-
|
|
53
|
+
# Goal-driven with Opus for max capability
|
|
54
|
+
claudenv loop --goal "refactor auth to JWT" --trust --model opus -n 3
|
|
44
55
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
└── .claude/
|
|
51
|
-
├── rules/
|
|
52
|
-
│ ├── code-style.md # Coding conventions (scoped by file paths)
|
|
53
|
-
│ ├── testing.md # Test patterns and commands
|
|
54
|
-
│ └── workflow.md # Claude Code best practices
|
|
55
|
-
├── settings.json # Validation hooks
|
|
56
|
-
├── commands/
|
|
57
|
-
│ ├── init-docs.md # /init-docs
|
|
58
|
-
│ ├── update-docs.md # /update-docs
|
|
59
|
-
│ ├── validate-docs.md # /validate-docs
|
|
60
|
-
│ ├── setup-mcp.md # /setup-mcp
|
|
61
|
-
│ └── improve.md # /improve
|
|
62
|
-
├── skills/
|
|
63
|
-
│ └── doc-generator/ # Auto-triggers when docs need updating
|
|
64
|
-
└── agents/
|
|
65
|
-
└── doc-analyzer.md # Read-only analysis subagent
|
|
56
|
+
# Budget-conscious CI run
|
|
57
|
+
claudenv loop --profile ci --goal "fix lint errors" -n 10
|
|
58
|
+
|
|
59
|
+
# Undo everything from the last loop
|
|
60
|
+
claudenv loop --rollback
|
|
66
61
|
```
|
|
67
62
|
|
|
68
|
-
###
|
|
63
|
+
### Rate limit recovery
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|------|---------|
|
|
72
|
-
| `CLAUDE.md` | Compact project overview with `@import` references to rule files |
|
|
73
|
-
| `_state.md` | Persists context between sessions — current focus, decisions, known issues |
|
|
74
|
-
| `.claude/rules/workflow.md` | Best practices: plan mode, `/compact`, subagents, git discipline |
|
|
75
|
-
| `.claude/rules/code-style.md` | Language and framework-specific coding conventions |
|
|
76
|
-
| `.claude/rules/testing.md` | Test framework patterns and commands |
|
|
77
|
-
| `.mcp.json` | MCP server configuration with `${ENV_VAR}` placeholders |
|
|
65
|
+
If Claude hits API rate limits mid-loop, claudenv saves your progress automatically:
|
|
78
66
|
|
|
79
|
-
|
|
67
|
+
```bash
|
|
68
|
+
# Rate limited? Just resume where you left off
|
|
69
|
+
claudenv loop --resume
|
|
80
70
|
|
|
81
|
-
|
|
71
|
+
# Override model on resume (e.g., switch to cheaper model)
|
|
72
|
+
claudenv loop --resume --model sonnet
|
|
73
|
+
```
|
|
82
74
|
|
|
83
|
-
|
|
75
|
+
### Live progress tracking
|
|
84
76
|
|
|
85
|
-
|
|
86
|
-
2. Searches the [official MCP Registry](https://registry.modelcontextprotocol.io) for matching servers
|
|
87
|
-
3. Verifies trust via npm download counts (filters out servers with <100 monthly downloads)
|
|
88
|
-
4. Presents recommendations grouped as **Essential** / **Recommended** / **Optional**
|
|
89
|
-
5. Generates `.mcp.json` with selected servers
|
|
77
|
+
Monitor what Claude is doing in real time:
|
|
90
78
|
|
|
91
|
-
|
|
79
|
+
```bash
|
|
80
|
+
# In another terminal — tail -f style
|
|
81
|
+
claudenv report --follow
|
|
92
82
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"args": ["-y", "@upstash/context7-mcp@latest"],
|
|
99
|
-
"env": {}
|
|
100
|
-
},
|
|
101
|
-
"postgres": {
|
|
102
|
-
"command": "npx",
|
|
103
|
-
"args": ["-y", "@modelcontextprotocol/server-postgres@latest", "${POSTGRES_CONNECTION_STRING}"],
|
|
104
|
-
"env": {}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
83
|
+
# Summary of the last loop run
|
|
84
|
+
claudenv report
|
|
85
|
+
|
|
86
|
+
# Last 5 events only
|
|
87
|
+
claudenv report --last 5
|
|
108
88
|
```
|
|
109
89
|
|
|
110
|
-
|
|
90
|
+
Events are stored in `.claude/work-report.jsonl` — machine-readable JSONL format.
|
|
91
|
+
|
|
92
|
+
### All loop flags
|
|
93
|
+
|
|
94
|
+
| Flag | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `--goal <text>` | What to work on (any goal — Claude interprets it) |
|
|
97
|
+
| `--trust` | Full trust mode — no pauses, skip permission prompts |
|
|
98
|
+
| `-n, --iterations <n>` | Max iterations (default: unlimited) |
|
|
99
|
+
| `--model <model>` | Model: `opus`, `sonnet`, `haiku` |
|
|
100
|
+
| `--profile <name>` | Autonomy profile (sets model, trust, budget) |
|
|
101
|
+
| `--budget <usd>` | Budget cap per iteration in USD |
|
|
102
|
+
| `--max-turns <n>` | Max agentic turns per iteration (default: 30) |
|
|
103
|
+
| `--resume` | Continue from last rate-limited loop |
|
|
104
|
+
| `--rollback` | Undo all changes from the most recent loop |
|
|
105
|
+
| `--worktree` | Run each iteration in an isolated git worktree |
|
|
106
|
+
| `--allow-dirty` | Allow running with uncommitted changes |
|
|
107
|
+
| `--no-pause` | Don't pause between iterations |
|
|
108
|
+
| `--unsafe` | Remove default tool restrictions (allows rm -rf) |
|
|
109
|
+
| `-d, --dir <path>` | Target project directory |
|
|
110
|
+
|
|
111
|
+
## Autonomy Profiles
|
|
112
|
+
|
|
113
|
+
Control how much freedom Claude gets. Profiles configure permissions, hooks, model defaults, and safety guardrails.
|
|
111
114
|
|
|
112
115
|
```bash
|
|
113
|
-
|
|
116
|
+
claudenv autonomy # Interactive selection
|
|
117
|
+
claudenv autonomy --profile moderate # Apply directly
|
|
118
|
+
claudenv autonomy --profile ci --dry-run # Preview without writing
|
|
114
119
|
```
|
|
115
120
|
|
|
116
|
-
|
|
121
|
+
### Profile comparison
|
|
117
122
|
|
|
118
|
-
|
|
123
|
+
| Profile | Model | Permissions | Credentials | Use case |
|
|
124
|
+
|---------|-------|-------------|-------------|----------|
|
|
125
|
+
| **safe** | sonnet | Allow-list only (read + limited bash) | Blocked | Exploring unfamiliar codebases |
|
|
126
|
+
| **moderate** | sonnet | Allow + deny lists (full dev tools) | Blocked | Day-to-day development |
|
|
127
|
+
| **full** | opus | Unrestricted (`--dangerously-skip-permissions`) | Warn-only | Maximum capability runs |
|
|
128
|
+
| **ci** | haiku | Unrestricted + 50 turn / $5 budget limits | Warn-only | CI/CD pipelines |
|
|
119
129
|
|
|
120
|
-
|
|
130
|
+
All profiles hard-block `rm -rf`, force push to main/master, and `sudo` — regardless of permission settings.
|
|
121
131
|
|
|
122
|
-
|
|
132
|
+
### What gets generated
|
|
123
133
|
|
|
124
|
-
|
|
134
|
+
```
|
|
135
|
+
.claude/
|
|
136
|
+
├── settings.json # Permissions, hooks config
|
|
137
|
+
├── hooks/
|
|
138
|
+
│ ├── pre-tool-use.sh # Blocks dangerous operations (reads stdin JSON from Claude Code)
|
|
139
|
+
│ └── audit-log.sh # Logs every tool call to audit-log.jsonl
|
|
140
|
+
└── aliases.sh # Shell aliases: claude-safe, claude-yolo, claude-ci, claude-local
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
CI profile also generates `.github/workflows/claude-ci.yml`.
|
|
125
144
|
|
|
126
|
-
|
|
127
|
-
2. **Execution** (iterations 1-N) — each iteration picks the top unfinished item from the plan, implements it, runs tests, and commits
|
|
128
|
-
3. **Convergence** — the loop stops when the plan is complete, max iterations are reached, or the loop detects it's stuck
|
|
145
|
+
### Using profiles with the loop
|
|
129
146
|
|
|
130
|
-
|
|
147
|
+
Profiles set sensible defaults for model, trust, and budget:
|
|
131
148
|
|
|
132
149
|
```bash
|
|
133
|
-
claudenv loop
|
|
134
|
-
claudenv loop --
|
|
135
|
-
claudenv loop --
|
|
136
|
-
claudenv loop --goal "add test coverage" # Focused improvement
|
|
137
|
-
claudenv loop --trust --model opus -n 3 # Use Opus, 3 iterations
|
|
138
|
-
claudenv loop --budget 1.00 -n 10 # Budget cap per iteration
|
|
139
|
-
claudenv loop --rollback # Undo all loop changes
|
|
140
|
-
```
|
|
150
|
+
claudenv loop --profile ci --goal "fix lint errors" # haiku, $5 budget, 50 turns
|
|
151
|
+
claudenv loop --profile full --goal "major refactor" # opus, unrestricted
|
|
152
|
+
claudenv loop --profile moderate --goal "add types" # sonnet, deny-list guarded
|
|
141
153
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
| `--trust` | Full trust mode — no pauses, skip permission prompts |
|
|
146
|
-
| `--goal <text>` | Focus area for improvements |
|
|
147
|
-
| `--profile <name>` | Autonomy profile: safe, moderate, full, ci |
|
|
148
|
-
| `--no-pause` | Don't pause between iterations |
|
|
149
|
-
| `--max-turns <n>` | Max agentic turns per iteration (default: 30) |
|
|
150
|
-
| `--model <model>` | Model to use (default: sonnet) |
|
|
151
|
-
| `--budget <usd>` | Budget cap per iteration in USD |
|
|
152
|
-
| `-d, --dir <path>` | Target project directory |
|
|
153
|
-
| `--allow-dirty` | Allow running with uncommitted changes |
|
|
154
|
-
| `--rollback` | Undo all changes from the most recent loop |
|
|
155
|
-
| `--unsafe` | Remove default tool restrictions |
|
|
154
|
+
# CLI flags always override profile defaults
|
|
155
|
+
claudenv loop --profile ci --model sonnet # ci profile but with sonnet
|
|
156
|
+
```
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
## Memory & vibe-decisions (1.3.0)
|
|
158
159
|
|
|
159
|
-
|
|
160
|
+
Persistent memory across sessions + brief overview before non-trivial technical choices. Auto-log inside `claudenv loop` (no pauses — `autonomy=law`), pause-and-ask in interactive Claude Code chats.
|
|
160
161
|
|
|
161
|
-
|
|
162
|
+
### Layout (split)
|
|
162
163
|
|
|
163
|
-
|
|
164
|
+
```
|
|
165
|
+
~/.claudenv/memories/ # global, cross-project
|
|
166
|
+
├── INDEX.md # briefing — auto-regenerated
|
|
167
|
+
├── decisions/ # universal tech decisions
|
|
168
|
+
├── canon/index.yaml # personal canon of references
|
|
169
|
+
└── user/preferences.md # cross-project preferences
|
|
170
|
+
|
|
171
|
+
<project>/.claude/memories/ # project-scoped, committed
|
|
172
|
+
├── project.md # stack, conventions, internal urls
|
|
173
|
+
└── decisions/ # project-only decisions
|
|
174
|
+
```
|
|
164
175
|
|
|
165
|
-
|
|
176
|
+
### Commands
|
|
166
177
|
|
|
167
178
|
```bash
|
|
168
|
-
|
|
169
|
-
claudenv
|
|
170
|
-
claudenv
|
|
171
|
-
claudenv
|
|
172
|
-
claudenv
|
|
173
|
-
|
|
179
|
+
# Memory
|
|
180
|
+
claudenv memory init # initialise ~/.claudenv/memories/
|
|
181
|
+
claudenv memory index # regenerate INDEX.md
|
|
182
|
+
claudenv memory show <path> # print a memory file
|
|
183
|
+
claudenv memory edit <path> # open in $EDITOR
|
|
184
|
+
|
|
185
|
+
# Decisions
|
|
186
|
+
claudenv decisions list [--scope all|global|project] [--limit N]
|
|
187
|
+
claudenv decisions show <id-or-slug>
|
|
188
|
+
claudenv decisions search <query>
|
|
189
|
+
claudenv decisions archive <id>
|
|
190
|
+
|
|
191
|
+
# Canon
|
|
192
|
+
claudenv canon add <topic> <url> --why "<reason>" [--title <t>] [--author <a>]
|
|
193
|
+
claudenv canon list [<topic>]
|
|
194
|
+
claudenv canon search <query>
|
|
195
|
+
claudenv canon prune --months 6 # find stale entries
|
|
196
|
+
|
|
197
|
+
# Health
|
|
198
|
+
claudenv doctor # OK/WARN/FAIL check
|
|
174
199
|
```
|
|
175
200
|
|
|
176
|
-
###
|
|
201
|
+
### Slash-commands (in Claude Code session)
|
|
202
|
+
|
|
203
|
+
| Command | Purpose |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `/deeper` | Develop the most recent decision into a full deep dive (concept → variants → trade-offs → canon) |
|
|
206
|
+
| `/why <X>` | Explain technology X without logging a decision |
|
|
207
|
+
| `/decisions` | List/search logged decisions via the CLI |
|
|
208
|
+
| `/canon` | Browse the personal canon |
|
|
209
|
+
| `/just-code` | Suppress vibe-decisions overview for the next response only |
|
|
177
210
|
|
|
178
|
-
|
|
179
|
-
|---------|-------------|-------------|-------------|
|
|
180
|
-
| `safe` | Read-only + limited bash | Allow-list only | Blocked |
|
|
181
|
-
| `moderate` | Full dev with deny-list | Allow + deny lists | Blocked |
|
|
182
|
-
| `full` | Unrestricted + audit logging | `--dangerously-skip-permissions` | Warn-only |
|
|
183
|
-
| `ci` | Headless CI/CD (50 turns, $5 budget) | `--dangerously-skip-permissions` | Warn-only |
|
|
211
|
+
### How auto-log works in `claudenv loop`
|
|
184
212
|
|
|
185
|
-
|
|
213
|
+
`claudenv loop` appends a system-prompt fragment that switches the `vibe-decisions` skill into **auto-log mode** — it picks the approach, writes the decision file (`/memories/decisions/<date>-<slug>.md`), and continues coding without pausing. Outside loop (interactive Claude Code) the skill defaults to **pause-and-ask** mode.
|
|
186
214
|
|
|
187
|
-
|
|
215
|
+
After each iteration, `claudenv loop` regenerates `INDEX.md` so the next iteration's briefing reflects what was just decided.
|
|
188
216
|
|
|
217
|
+
### Python companion: `claudenv-memory`
|
|
218
|
+
|
|
219
|
+
Building your own agent on Claude Agent SDK and want the same memory layout?
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
pip install claudenv-memory
|
|
189
223
|
```
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
from claudenv_memory import LocalFileMemoryBackend
|
|
227
|
+
from claude_agent_sdk import ClaudeAgentOptions
|
|
228
|
+
|
|
229
|
+
backend = LocalFileMemoryBackend() # ~/.claudenv/memories + ./.claude/memories
|
|
230
|
+
options = ClaudeAgentOptions(
|
|
231
|
+
model="claude-opus-4-7",
|
|
232
|
+
extra_headers={"anthropic-beta": "context-management-2025-06-27"},
|
|
233
|
+
tools=[backend.as_tool()],
|
|
234
|
+
)
|
|
196
235
|
```
|
|
197
236
|
|
|
198
|
-
|
|
237
|
+
Status: 0.1.x alpha — first production consumer is claudenv 2.0. See `python/README.md`.
|
|
199
238
|
|
|
200
|
-
|
|
239
|
+
## MCP Server Setup
|
|
201
240
|
|
|
202
|
-
|
|
241
|
+
`/claudenv` auto-detects your tech stack and recommends MCP servers from the [official registry](https://registry.modelcontextprotocol.io). You can also run `/setup-mcp` independently.
|
|
203
242
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
243
|
+
Servers are configured in `.mcp.json` with `${ENV_VAR}` placeholders — safe to commit:
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"mcpServers": {
|
|
248
|
+
"context7": {
|
|
249
|
+
"command": "npx",
|
|
250
|
+
"args": ["-y", "@upstash/context7-mcp@latest"]
|
|
251
|
+
},
|
|
252
|
+
"postgres": {
|
|
253
|
+
"command": "npx",
|
|
254
|
+
"args": ["-y", "@modelcontextprotocol/server-postgres@latest", "${POSTGRES_CONNECTION_STRING}"]
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
207
258
|
```
|
|
208
259
|
|
|
209
|
-
|
|
210
|
-
|------|-------------|
|
|
211
|
-
| `-p, --profile <name>` | Profile: safe, moderate, full, ci |
|
|
212
|
-
| `-d, --dir <path>` | Project directory (default: `.`) |
|
|
213
|
-
| `--overwrite` | Overwrite existing files |
|
|
214
|
-
| `-y, --yes` | Skip prompts |
|
|
215
|
-
| `--dry-run` | Preview without writing |
|
|
260
|
+
Set secrets with `claude config set env.POSTGRES_CONNECTION_STRING "postgresql://..."`.
|
|
216
261
|
|
|
217
|
-
##
|
|
262
|
+
## File Structure
|
|
218
263
|
|
|
219
|
-
|
|
264
|
+
After full setup (`/claudenv` + `claudenv autonomy`):
|
|
220
265
|
|
|
221
|
-
|
|
222
|
-
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
266
|
+
```
|
|
267
|
+
your-project/
|
|
268
|
+
├── CLAUDE.md # Project overview for Claude
|
|
269
|
+
├── _state.md # Session memory (persists between conversations)
|
|
270
|
+
├── .mcp.json # MCP server configuration
|
|
271
|
+
└── .claude/
|
|
272
|
+
├── settings.json # Permissions + hooks
|
|
273
|
+
├── rules/
|
|
274
|
+
│ ├── code-style.md # Coding conventions
|
|
275
|
+
│ ├── testing.md # Test patterns
|
|
276
|
+
│ └── workflow.md # Claude workflow best practices
|
|
277
|
+
├── hooks/
|
|
278
|
+
│ ├── pre-tool-use.sh # Safety guardrails
|
|
279
|
+
│ └── audit-log.sh # Audit logging
|
|
280
|
+
├── commands/ # Slash commands
|
|
281
|
+
│ ├── init-docs.md
|
|
282
|
+
│ ├── update-docs.md
|
|
283
|
+
│ ├── validate-docs.md
|
|
284
|
+
│ ├── setup-mcp.md
|
|
285
|
+
│ └── improve.md
|
|
286
|
+
├── aliases.sh # Shell aliases
|
|
287
|
+
├── work-report.jsonl # Loop progress events
|
|
288
|
+
├── loop-log.json # Loop state (for resume/rollback)
|
|
289
|
+
├── improvement-plan.md # Current loop plan
|
|
290
|
+
└── audit-log.jsonl # Tool call audit trail
|
|
291
|
+
```
|
|
227
292
|
|
|
228
293
|
## CLI Reference
|
|
229
294
|
|
|
230
295
|
```
|
|
231
|
-
claudenv
|
|
232
|
-
claudenv install
|
|
233
|
-
claudenv
|
|
234
|
-
|
|
235
|
-
claudenv
|
|
236
|
-
claudenv
|
|
237
|
-
claudenv
|
|
238
|
-
claudenv
|
|
239
|
-
|
|
240
|
-
claudenv
|
|
241
|
-
claudenv
|
|
242
|
-
claudenv
|
|
243
|
-
claudenv
|
|
244
|
-
|
|
245
|
-
claudenv
|
|
296
|
+
claudenv Install /claudenv into ~/.claude/
|
|
297
|
+
claudenv install [-f] Same as above (-f to overwrite)
|
|
298
|
+
claudenv uninstall Remove from ~/.claude/
|
|
299
|
+
|
|
300
|
+
claudenv loop [options] Autonomous improvement loop
|
|
301
|
+
claudenv loop --resume Resume rate-limited loop
|
|
302
|
+
claudenv loop --rollback Undo all loop changes
|
|
303
|
+
claudenv report [--follow] [--last n] View loop progress
|
|
304
|
+
|
|
305
|
+
claudenv autonomy [-p <profile>] Configure autonomy profiles
|
|
306
|
+
claudenv init [dir] [-y] Legacy: static analysis (no AI)
|
|
307
|
+
claudenv generate [-d <dir>] Templates only, no scaffold
|
|
308
|
+
claudenv validate [-d <dir>] Check documentation completeness
|
|
309
|
+
|
|
310
|
+
claudenv memory init|index|show|edit Manage ~/.claudenv/memories/ (1.3.0+)
|
|
311
|
+
claudenv decisions list|show|search Logged vibe-decisions (1.3.0+)
|
|
312
|
+
claudenv canon add|list|search|prune Personal canon (1.3.0+)
|
|
313
|
+
claudenv doctor Health check (1.3.0+)
|
|
246
314
|
```
|
|
247
315
|
|
|
248
|
-
##
|
|
316
|
+
## Run Without Installing
|
|
249
317
|
|
|
250
318
|
```bash
|
|
251
319
|
npx claudenv # npm
|
|
@@ -253,12 +321,9 @@ pnpm dlx claudenv # pnpm
|
|
|
253
321
|
bunx claudenv # bun
|
|
254
322
|
```
|
|
255
323
|
|
|
256
|
-
##
|
|
324
|
+
## Tech Stack Detection
|
|
257
325
|
|
|
258
|
-
|
|
259
|
-
claudenv uninstall # Remove from ~/.claude/
|
|
260
|
-
npm uninstall -g claudenv
|
|
261
|
-
```
|
|
326
|
+
Auto-detected for context: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Java, Kotlin, C# / Next.js, Vite, Nuxt, SvelteKit, Astro, Django, FastAPI, Flask, Rails, Laravel, Spring Boot / npm, yarn, pnpm, bun, poetry, uv, cargo / Vitest, Jest, Playwright, pytest, RSpec / GitHub Actions, GitLab CI / ESLint, Biome, Prettier, Ruff, Clippy.
|
|
262
327
|
|
|
263
328
|
## Requirements
|
|
264
329
|
|