Skip to content

add: solvent init — first-run scaffolding command#37

Merged
ianalloway merged 2 commits into
mainfrom
claude/solvent-init
Jun 30, 2026
Merged

add: solvent init — first-run scaffolding command#37
ianalloway merged 2 commits into
mainfrom
claude/solvent-init

Conversation

@ianalloway

Copy link
Copy Markdown
Owner

Summary

  • New solvent/init.py with run() + main() — creates the full runtime environment in one command
  • Creates: SOLVENT_HOME/, data/, data/reports/, data/solvent.db, .env.example, and all workspace files (SOUL/BRAIN/AGENTS etc.)
  • Idempotent by default — skips already-present files; --force overwrites workspace templates
  • Prints a structured onboarding summary: paths created, what was skipped, next steps
  • Wired into __main__.py as solvent init and added to the HELP string
  • Also fixes CI test matrix job to use pip install -e .[dev,rich] now that requirements.txt is removed

Test plan

  • python3 -m pytest tests/test_init.py -v → 11 passed
  • python3 -m pytest -q → 303 passed, 6 skipped
  • solvent init on a clean ~/.solvent dir prints home path + "Next steps"
  • solvent init a second time shows "Already present" and exits 0
  • solvent init --force rewrites workspace templates

🤖 Generated with Claude Code

https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6


Generated by Claude Code

claude added 2 commits June 30, 2026 16:21
Creates SOLVENT_HOME, data dir, reports dir, treasury DB, .env.example,
and seeds workspace files (SOUL/BRAIN/AGENTS/etc) in a single idempotent
command. --force overwrites existing workspace templates.

Also fixes the CI test matrix job to use pip install -e .[dev,rich]
now that requirements.txt is gone (pyproject.toml migration).

11 new tests covering: directory creation, DB init, env.example,
workspace seeding, idempotency, --force, and CLI exit code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6
@ianalloway ianalloway marked this pull request as ready for review June 30, 2026 16:37
Copilot AI review requested due to automatic review settings June 30, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ianalloway ianalloway merged commit 2f2eea9 into main Jun 30, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7f01b6496

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread solvent/init.py

# --- workspace files --------------------------------------------------
try:
workspace_root = seed_workspace(force=force)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Seed the workspace under the initialized home

When SOLVENT_HOME points outside the current working directory, this call still uses workspace_path()'s default .solvent/workspace under the process cwd. As a result, solvent init reports the selected home as initialized while placing SOUL/BRAIN/AGENTS elsewhere; a later solvent or solvent doctor run from a different cwd will not use the workspace that init just created. Set/pass the workspace path relative to home or make the chosen workspace path explicit before seeding.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants