Commit Graph

36 Commits

Author SHA1 Message Date
db68610c34 feat: tsx 2025-06-23 16:49:18 +08:00
842f23b762 feat: tsx 2025-06-19 11:30:30 +08:00
Vishal Jain
63817a52e8 Remove commit_diff_summary.txt from tracking
Stop tracking commit_diff_summary.txt and add it to .gitignore
to prevent future commits
2025-06-18 15:06:56 +01:00
Vishal Jain
fb8650f686 Remove context persistance section 2025-06-18 15:02:12 +01:00
Vishal Jain
ddf35828e2 Simplify and clarify project documentation
Streamline documentation to focus on core functionality and conda
integration. Changes include:
- Clarify default design and conda environment usage
- Remove redundant workflow benefits section
- Simplify features list to focus on key capabilities
- Remove directory structure (available in repo)
- Add explicit push requirement in CLAUDE.md
- Update task completion requirements

This makes the documentation more focused and easier to understand while
emphasizing the project's integration with conda environments.
2025-06-18 14:58:59 +01:00
Vishal Jain
b97a5c17ba Update README with CLAUDE.md and task_log.md documentation
Added CLAUDE.md configuration section explaining the autonomous task
executor template and its usage with plan.md. Also documented the
task_log.md feature which captures execution details and insights.

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 13:51:22 +00:00
Vishal Jain
3c95d84eaa Remove Anthtropic API key from read example
Do not need this anymore since we use pre configured creds.
2025-06-18 14:21:32 +01:00
Vishal Jain
9baf9f5c4b Use build args for git user config
Change git configuration to use Docker build args instead of .env file,
simplifying setup and improving security. This change:
- Removes git config from .env and startup.sh
- Adds GIT_USER_NAME and GIT_USER_EMAIL build args
- Updates documentation for new git config approach
- Improves task logging requirements in CLAUDE.md

The build arg approach provides better isolation and ensures git config is
properly set during image build rather than container runtime.
2025-06-18 14:19:18 +01:00
Vishal Jain
5377ac9b64 Remove task files and update gitignore
Remove temporary task-related files (plan.md, task_log.md) and update
.gitignore to prevent them from being tracked in the future. These files
are implementation-specific and should not be part of the repository as
they contain task execution details that are only relevant during the
development process.
2025-06-18 14:00:49 +01:00
Vishal Jain
9d1f8d0661 Add git user configuration support
Add required git user configuration to enable commits from within the container.
This change ensures proper attribution of git commits made inside the container by:

- Adding GIT_USER_NAME and GIT_USER_EMAIL to .env.example
- Configuring git user globally during Docker build
- Adding documentation for git configuration requirements
- Updating README with clearer setup instructions and requirements

The configuration is now required as part of the initial setup to prevent
issues with unattributed commits when using git inside the container.
2025-06-18 13:54:58 +01:00
Claude
7b50165881 Expand README with setup guide and DevContainer comparison
Add comprehensive prerequisites section with detailed authentication steps.
Include comparison table showing differences from Anthropic's DevContainer.
Enhance documentation structure with better formatting and examples.
Add attribution section crediting dependencies and inspirations.

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 12:07:36 +00:00
Vishal Jain
ab21920ad2 Hide sensitive Twilio credentials from startup output
Replace detailed credential display with simple status message
to prevent account SID, phone numbers from being shown in logs.
2025-06-18 12:55:00 +01:00
Vishal Jain
b7735057b3 Remove orphaned setup-env.sh script
This script was not referenced anywhere in the codebase and used
an outdated approach for credential management. Current workflow
bakes credentials into Docker image from .env file in project root.
2025-06-18 12:32:36 +01:00
Vishal Jain
1b056bdcd3 Make Twilio SMS notifications optional in CLAUDE.md
Update autonomous task executor template to gracefully handle cases
where Twilio is not configured. SMS notifications now only attempt
if ALL required environment variables are present:
- TWILIO_ACCOUNT_SID
- TWILIO_AUTH_TOKEN
- TWILIO_FROM_NUMBER
- TWILIO_TO_NUMBER

Task execution continues normally without SMS if any variable is missing.
2025-06-18 12:27:27 +01:00
Vishal Jain
bbce5b2928 Fix CLAUDE.md copy during Docker build
Copy CLAUDE.md directly to final location instead of using /tmp
intermediate step. This ensures the COPY fails loudly if there's
an issue and simplifies the build process.
2025-06-18 12:23:40 +01:00
Vishal Jain
93d58eca27 Remove redundant settings.local.json template
The MCP configuration is already handled by the Dockerfile using
claude mcp add-json command. The template file was unnecessary and
could cause confusion.
2025-06-18 11:48:23 +01:00
Vishal Jain
b4ebb459ea Add CLAUDE.md template for autonomous task execution
This template provides instructions for Claude when running in the Docker
container, including task execution workflow, coding standards, and
Twilio notification requirements.
2025-06-18 02:03:26 +01:00
Vishal Jain
4b314324b2 Fix CLAUDE.md template copy order
Copy CLAUDE.md after auth files to prevent it from being overwritten.
Ensures the project instructions are always available in Claude sessions.
2025-06-18 01:47:17 +01:00
Vishal Jain
2fc876b0a1 Copy CLAUDE.md template to container's ~/.claude directory
Ensures Claude Code sessions automatically read the project instructions
including conda usage, SMS notifications, and context persistence guidelines.
2025-06-18 01:43:21 +01:00
Vishal Jain
066233b03c Add modular system package installation support
Implemented SYSTEM_PACKAGES environment variable for flexible system library installation:

Key Features:
- Users specify packages in .env: SYSTEM_PACKAGES="libopenslide0 libgdal-dev"
- Packages installed during Docker build (secure, no runtime mounting)
- Automatic rebuild detection when packages change
- Documentation with common scientific computing packages

Technical Implementation:
- ARG SYSTEM_PACKAGES in Dockerfile with conditional apt-get install
- Build argument passed from claude-docker.sh script
- Clean package management with cache cleanup

Benefits:
- Secure: No system directory mounting required
- Flexible: Users choose exactly what they need
- Documented: Common packages listed in README
- Clean: Packages baked into image, not mounted at runtime

Tested successfully with OpenSlide: conda run -n prism python -c "import openslide"
2025-06-18 01:21:25 +01:00
Vishal Jain
70040a7444 Fix Docker build command variable expansion
Fixed shell variable expansion issue in docker build command.
System packages now install correctly during build process.
2025-06-18 01:20:29 +01:00
Vishal Jain
67f2692aad Add conda package directories support
Added CONDA_PKGS_DIRS environment variable setting to ensure conda
looks in the correct package cache directories inside the container.
This matches the pattern used for CONDA_ENVS_DIRS.
2025-06-18 01:05:33 +01:00
Vishal Jain
1d1d6bcbaf Improve conda environment directory detection
Changed pattern to *env* to match both envs and conda_envs directories.
This ensures all environment directories are added to CONDA_ENVS_DIRS.
2025-06-18 01:01:35 +01:00
Vishal Jain
51edcfc2bb Fix conda_envs directory detection
Changed pattern from */envs* to *envs* to match conda_envs directories.
Now both .conda/envs and conda_envs directories are added to CONDA_ENVS_DIRS.
2025-06-18 01:00:56 +01:00
Vishal Jain
a53d28bf2f Add comprehensive conda integration for academic environments
Enhanced conda support to handle custom environment and package directories:

Key Changes:
- Mount conda installation at original path (not /opt/miniconda3)
- Add CONDA_EXTRA_DIRS for mounting additional search paths
- Mount all conda-configured directories to preserve existing setup
- Update CLAUDE.md to use ${CONDA_EXE} environment variable

Technical Details:
- Preserves original conda paths so existing configuration works
- Handles multiple envs_dirs and pkgs_dirs automatically
- Provides feedback about which directories are mounted
- Falls back gracefully for missing directories

Example usage: CONDA_EXTRA_DIRS="/vol/path/.conda/envs /vol/path/conda_envs /vol/path/.conda/pkgs"
Result: All conda environments and packages accessible in container.
2025-06-18 00:21:01 +01:00
Vishal Jain
7cd765b756 Implement zero-friction authentication persistence with MCP user scope
Major breakthrough solving the authentication chicken-and-egg problem:

Key Changes:
- Copy ~/.claude.json and ~/.claude/ during Docker build for baked-in auth
- Add -s user flag to claude mcp add-json for persistent MCP servers
- Simplify rebuild logic to prevent unnecessary rebuilds
- Update documentation with rebuild instructions

Technical Details:
- Authentication files placed before USER switch in Dockerfile
- MCP configuration now persists across all sessions
- Rebuild only occurs when image doesn't exist
- Clean separation of build vs runtime concerns

Result: Users authenticate once on host, then zero login prompts forever.
SMS notifications ready immediately on container start.
2025-06-17 22:27:11 +01:00
Vishal Jain
d9bf0f4b53 Switch to simplified Twilio MCP integration using @yiyang.1i/sms-mcp-server
- Replace API Key/Secret auth with Account SID/Auth Token
- Configure MCP during Docker build instead of runtime
- Remove mcp-config.json and config directory
- Simplify startup script by removing MCP configuration logic
- Update documentation and test scripts for new auth method

The MCP server is now configured directly in the Dockerfile using
'claude mcp add-json' command, making the setup more reliable and
eliminating runtime configuration complexity.
2025-06-17 21:48:00 +01:00
Vishal Jain
6cb57c9dc6 Fix Twilio MCP integration with baked-in credentials
- Add proper type and env sections to mcp-config.json
- Remove dynamic MCP add command, use pre-configured MCP
- Bake .env credentials into Docker image at build time
- Remove runtime .env volume mount - true one-time setup
- Auto-rebuild image when .env file changes
- Export Twilio env vars for MCP server subprocess
- Remove conflicting .mcp.json file
2025-06-13 09:53:43 +01:00
Vishal Jain
8f637508f4 Update scratchpad with completed authentication persistence 2025-06-12 14:11:02 +01:00
Vishal Jain
5b3db44eaa Document authentication persistence feature in README
- Add authentication persistence to features section
- Update configuration section with claude-home directory
- Clarify what files go where in the setup
2025-06-12 14:10:18 +01:00
Vishal Jain
dcc936dc10 Implement authentication persistence for Claude Docker
- Add persistent volume mount for Claude home directory (~/.claude)
- Create non-root user in Docker container for better security
- Mount host ~/.claude-docker/claude-home to container ~/.claude
- Update install script to create claude-home directory
- Check for existing credentials on startup
- Authentication tokens now persist across container restarts
2025-06-12 14:09:10 +01:00
Vishal Jain
c99bc9c561 Update scratchpad: Claude Docker now working
- Container launches successfully after fixes
- Next priorities: auth persistence, firewall, command history
- Need to study Anthropic dev container implementation
2025-06-12 11:16:37 +01:00
Vishal Jain
7c14a75afc Fix Docker startup issues
- Change executable from claude-code to claude in startup.sh
- Fix .env parsing to handle comments using set -a/source
- Add explicit PATH for npm global binaries in Dockerfile
- Update scratchpad.md with fix documentation
2025-06-12 11:10:32 +01:00
Vishal Jain
0ec49a426a Update project documentation for Phase 1 completion
- Update scratchpad with completed MVP status and Phase 2 roadmap
- Rewrite README with comprehensive setup instructions and feature overview
- Document next steps: firewall security and shell history persistence
2025-06-11 10:43:22 +01:00
Vishal Jain
e5994418b8 Add MCP settings template 2025-06-11 10:29:48 +01:00
Vishal Jain
23524659e8 Initial commit: Claude Docker setup
- Dockerfile with Claude Code and Twilio MCP integration
- Wrapper script for easy invocation from anywhere
- Auto-setup of .claude directory in projects
- SMS notifications via Twilio when tasks complete
- Installation script for zshrc alias
- Full autonomous permissions with --dangerously-skip-permissions
- Context persistence via scratchpad.md
2025-06-11 10:29:15 +01:00