Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

User requested CLI commands for creating new projects and managing internationalization. The existing CLI only had code generation and dev server commands.

Commands Added

Project Initialization

  • objectql init - Scaffolds projects from templates (basic, express-api, enterprise)
  • Options: --skip-install, --skip-git, custom directories
  • Converts workspace dependencies to standalone package versions

Metadata Generation

  • objectql new <type> <name> - Generates metadata files for 12 types (object, view, form, action, hook, etc.)
  • Auto-generates TypeScript stubs for actions/hooks
  • Enforces naming conventions and provides smart defaults

Internationalization

  • objectql i18n extract - Extracts translatable strings from metadata to JSON
  • objectql i18n init <lang> - Initializes new language directories
  • objectql i18n validate <lang> - Reports missing translations with key paths

Database Migrations

  • objectql migrate create <name> - Creates timestamped migration files with up/down templates
  • objectql migrate - Runs pending migrations, tracks in _migrations table
  • objectql migrate status - Shows pending vs completed migrations

Usage

# Create new project
objectql init -t express-api -n my-api

# Generate metadata
objectql new object users
objectql new action approve_user  # Creates .yml + .ts

# i18n workflow
objectql i18n extract --lang en
objectql i18n init zh-CN
objectql i18n validate zh-CN

Implementation

New files:

  • commands/init.ts - Template copying, dependency conversion
  • commands/new.ts - YAML/TS generation from templates
  • commands/i18n.ts - Translation extraction via glob + yaml parsing
  • commands/migrate.ts - Migration runner with ts-node support

Documentation:

  • Updated README with all commands
  • Added USAGE_EXAMPLES.md with workflows
  • Added IMPLEMENTATION_SUMMARY.md with technical details
Original prompt

帮我规划一下还需要哪些Cli命令,比如创建新项目和国际化


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 12, 2026 07:21
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CLI commands for project creation and internationalization Add CLI commands for project scaffolding and internationalization Jan 12, 2026
Copilot AI requested a review from hotlong January 12, 2026 07:35
@hotlong hotlong marked this pull request as ready for review January 12, 2026 08:05
@hotlong hotlong merged commit 294a1b1 into main Jan 12, 2026
2 checks passed
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.

2 participants