Skip to content

[FEATURE] Implement cx new project template scaffolding #708

@mikejmorgan-ai

Description

@mikejmorgan-ai

Summary

The cx new command currently has a stub implementation that prints "not yet implemented". This needs full implementation to scaffold project templates.

Current State

// new.rs - stub only
println!("cx new: Project templates not yet implemented");

Required Templates

Template Files Created
python pyproject.toml, venv, src/init.py
rust Cargo.toml, src/main.rs
node package.json, index.js
react package.json, src/App.tsx, vite config
nextjs package.json, app/, next.config.js
fastapi pyproject.toml, app/main.py, requirements.txt
go go.mod, main.go
docker Dockerfile, docker-compose.yml

Implementation Details

  • Templates stored in ~/.cx/templates/ or bundled in binary
  • cx new <template> <name> creates <name>/ directory
  • cx new --list shows available templates
  • Smart defaults based on current directory context

Acceptance Criteria

  • All 8 templates implemented
  • Each creates valid, runnable project
  • Unit tests for template generation
  • Integration with cx ask "create X project" pattern matching
  • BSL 1.1 header in source files

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions