Rename studio ai command to studio code - #3002
Conversation
Registers `code` as the primary command name with `ai` kept as an alias for backward compatibility, so a single entry point works for both. Fixes STU-1526
gcsecsey
left a comment
There was a problem hiding this comment.
Thanks @sejas for tackling this! 🙌
These changes look good to me, and I confirm that both the code and ai commands are working as described. 👍
The ai command is listed as an alias:
Both commands start the code CLI as expected:
code |
ai |
|---|---|
![]() |
![]() |
And both list the previous sessions the same way too:
| async ( aiYargs ) => { | ||
| const { registerCommand: registerAiCommand } = await import( 'cli/commands/ai' ); | ||
| registerAiCommand( aiYargs ); | ||
| aiYargs.command( 'sessions', __( 'Manage AI sessions' ), async ( sessionsYargs ) => { |
There was a problem hiding this comment.
Nit: maybe we should use "Code sessions" in the messaging here too, to make it canonical with the command?
There was a problem hiding this comment.
Changed! I’m not sure whether “code” should be capitalized, so I left it lowercase. I made the changes in all the subcommands too.
studio/apps/cli/commands/ai/tests/ai.test.ts
Line 191 in 96dfd42
studio code --help
studio code sessions --help
studio code sessions list
|
@sejas is it possible to remove the It'd also be nice to display a message to the people who are still using I also want to change the command descriptions for Here's my proposal:
|
|
On it! |
…name-studio-ai-to-studio-code
📊 Performance Test ResultsComparing 5e295a9 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
@Poliuk, Done! now
I also considered adding the same notice when running |
|
It's worth mentioning I also changed the Agent identity to say "WordPress Studio Code" which is an "AI agent": studio/apps/cli/ai/system-prompt.ts Line 7 in 5e295a9 |




Related issues
Proposed Changes
Registers
codeas the primary CLI command name, withaikept as hidden alias for backward compatibility. A single binary now handles bothstudio codeandstudio ai, so there's no need for a secondary binary (as discussed in #2990 (comment)).Update system prompt and subcommands to mention "WordPress Studio Code" as the main.
Changed Assistant with Agent in help commands and system prompt.
Changed AI Sessions to code sessions.
Testing Instructions
npm run cli:buildnode apps/cli/dist/cli/main.mjs --helpand verify the primary subcommand iscodeandaiis an aliasnode apps/cli/dist/cli/main.mjs codeand verify the AI assistant starts.node apps/cli/dist/cli/main.mjs aiand verify the alias still works.node apps/cli/dist/cli/main.mjs code sessions listand... ai sessions listto verify subcommands work under both names.npm test -- apps/cli/commands/ai/tests/ai.test.tsPre-merge Checklist