<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tianmai2019</title>
    <description>The latest articles on DEV Community by tianmai2019 (@tianmai2019).</description>
    <link>https://dev.to/tianmai2019</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4040197%2F5027da46-0a2b-4e54-93fe-c52a6b76f06f.png</url>
      <title>DEV Community: tianmai2019</title>
      <link>https://dev.to/tianmai2019</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tianmai2019"/>
    <language>en</language>
    <item>
      <title>Week 1: From Idea to Runnable CLI Framework</title>
      <dc:creator>tianmai2019</dc:creator>
      <pubDate>Tue, 21 Jul 2026 14:16:32 +0000</pubDate>
      <link>https://dev.to/tianmai2019/week-1-from-idea-to-runnable-cli-framework-1cni</link>
      <guid>https://dev.to/tianmai2019/week-1-from-idea-to-runnable-cli-framework-1cni</guid>
      <description>&lt;h1&gt;
  
  
  Week 1: From Idea to Runnable CLI Framework
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Why I'm Building This Tool
&lt;/h2&gt;

&lt;p&gt;If you've worked on frontend internationalization (i18n) before, you've probably encountered these problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hardcoded Chinese text scattered throughout the project, not knowing where to start&lt;/li&gt;
&lt;li&gt;Developers forgetting to put text in i18n config when building new features&lt;/li&gt;
&lt;li&gt;Manual checks during code review being inefficient&lt;/li&gt;
&lt;li&gt;Wanting to internationalize but not knowing the overall workload&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I decided to build a tool called &lt;code&gt;i18n-pilot&lt;/code&gt; to address these issues.&lt;/p&gt;

&lt;p&gt;Its first-stage goal isn't automatic translation – it's helping teams discover their i18n debt first.&lt;/p&gt;

&lt;h2&gt;
  
  
  This Week's Goal
&lt;/h2&gt;

&lt;p&gt;The goal for the first week was simple: turn the idea into a state where development can continue.&lt;/p&gt;

&lt;p&gt;I didn't pursue feature completeness or rush into writing core scanning logic.&lt;/p&gt;

&lt;p&gt;Instead, I focused on solving several foundational issues first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project naming and positioning&lt;/li&gt;
&lt;li&gt;Tech stack and project structure&lt;/li&gt;
&lt;li&gt;CLI entry framework&lt;/li&gt;
&lt;li&gt;Basic documentation&lt;/li&gt;
&lt;li&gt;npm publishing workflow validation&lt;/li&gt;
&lt;li&gt;Future development rhythm&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Built This Week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Project Naming
&lt;/h3&gt;

&lt;p&gt;The project name ended up being &lt;code&gt;i18n-pilot&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The idea behind this name is: like a co-pilot, helping developers handle issues during the internationalization process.&lt;/p&gt;

&lt;p&gt;Not taking over completely for developers, and not automatically translating everything from the beginning – but first providing prompts, checks, and assistance in the development workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Tech Stack Selection
&lt;/h3&gt;

&lt;p&gt;For the first version, I chose the most suitable combination for CLI tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;Commander (CLI framework)&lt;/li&gt;
&lt;li&gt;Vitest (testing)&lt;/li&gt;
&lt;li&gt;ESLint (code linting)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No heavy frameworks were introduced, and I didn't start with a web UI.&lt;/p&gt;

&lt;p&gt;The most important thing at this stage is to quickly validate the scanning capability, and the CLI is the most direct entry point for developer tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. CLI Framework Setup
&lt;/h3&gt;

&lt;p&gt;I built the basic CLI skeleton with Commander.&lt;/p&gt;

&lt;p&gt;Although the functionality is still simple, there's already an entry point that can be extended.&lt;/p&gt;

&lt;p&gt;Future capabilities can be gradually added around commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;i18n-pilot scan ./src
i18n-pilot scan ./src &lt;span class="nt"&gt;--format&lt;/span&gt; stylish
i18n-pilot scan ./src &lt;span class="nt"&gt;--rule&lt;/span&gt; jsx-text&lt;span class="o"&gt;=&lt;/span&gt;off
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get the entry working first, and there will be room to grow later.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Bilingual README
&lt;/h3&gt;

&lt;p&gt;I intentionally wrote both English and Chinese versions of the README.&lt;/p&gt;

&lt;p&gt;The reason is that from day one, this project wants to balance domestic content recording and international open source distribution.&lt;/p&gt;

&lt;p&gt;Chinese content is more suitable for recording real processes and easier to communicate with domestic developers.&lt;/p&gt;

&lt;p&gt;The English README is the foundation for future entry into GitHub, npm, Product Hunt, dev.to, and other channels.&lt;/p&gt;

&lt;p&gt;If you want to build tools for global developers, English materials aren't something to add at the end – they need to be prepared from day one.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. npm Publishing Workflow Validation
&lt;/h3&gt;

&lt;p&gt;I also did an npm publish dry-run in the first week.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm publish --dry-run&lt;/code&gt; passed, but I encountered E403 when trying to publish for real.&lt;/p&gt;

&lt;p&gt;The reason is likely that the npm account requires 2FA OTP, or I need to create a granular access token that allows publishing.&lt;/p&gt;

&lt;p&gt;This issue isn't completely solved yet, but it's good to expose it early.&lt;/p&gt;

&lt;p&gt;If I waited until all features were done only to find the publishing pipeline stuck, the cost would be higher.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Content Recording Preparation
&lt;/h3&gt;

&lt;p&gt;This time, I don't want content to be something packaged at the end – I want it to grow with the product.&lt;/p&gt;

&lt;p&gt;So the first week also prepared the first batch of recording materials, including why I'm building this, how the project started from 0, how to advance in side project time, etc.&lt;/p&gt;

&lt;p&gt;Content isn't packaging – it's a retrospective.&lt;/p&gt;

&lt;p&gt;It forces me to clarify why I did each step, how I did it, and what to do next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validation Results
&lt;/h2&gt;

&lt;p&gt;At the end of the first week, the project already has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A clear name and positioning&lt;/li&gt;
&lt;li&gt;A runnable TypeScript CLI framework&lt;/li&gt;
&lt;li&gt;Draft English and Chinese README&lt;/li&gt;
&lt;li&gt;Logo draft&lt;/li&gt;
&lt;li&gt;Pre-npm-publish validation&lt;/li&gt;
&lt;li&gt;First batch of content materials&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These things aren't complicated individually.&lt;/p&gt;

&lt;p&gt;But together, they turn &lt;code&gt;i18n-pilot&lt;/code&gt; from an idea into a project that can really move forward.&lt;/p&gt;

&lt;p&gt;This is especially important for side projects.&lt;/p&gt;

&lt;p&gt;Because side project time is fragmented, if there isn't a clear shell and rhythm, it's easy to not know where to continue every time you open the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Week's Plan
&lt;/h2&gt;

&lt;p&gt;The focus of Week 2 will be on scanning capability.&lt;/p&gt;

&lt;p&gt;Plans include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learn and integrate &lt;code&gt;ts-morph&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Support React / JSX / TSX file parsing&lt;/li&gt;
&lt;li&gt;Extract Chinese strings and JSX text&lt;/li&gt;
&lt;li&gt;Support directory scanning and exclude &lt;code&gt;node_modules&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Output scan statistics&lt;/li&gt;
&lt;li&gt;Prepare for future rule system&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The acceptance criterion is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;i18n-pilot scan ./src
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Being able to actually scan Chinese text in the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thoughts This Week
&lt;/h2&gt;

&lt;p&gt;The biggest收获 this week is confirming a rhythm:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't wait for the product to be complete – first make the project visible, runnable, and continuable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When working on projects before, I easily fell into a trap: not having the idea completely clear yet, rushing to write core features; features not stable yet, wanting to add more things.&lt;/p&gt;

&lt;p&gt;The result was often a lot of code written, but the project not feeling like a truly publishable product.&lt;/p&gt;

&lt;p&gt;This time I deliberately did the opposite.&lt;/p&gt;

&lt;p&gt;First build the project shell, then gradually fill in the content.&lt;/p&gt;

&lt;p&gt;This process also made me more certain: when building developer tools in the AI era, you don't necessarily have to build a big AI Agent from the beginning.&lt;/p&gt;

&lt;p&gt;A more realistic path might be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First find a pain point in a specific development workflow&lt;/li&gt;
&lt;li&gt;Solve part of the problem with deterministic rules&lt;/li&gt;
&lt;li&gt;Get reporting and configuration right&lt;/li&gt;
&lt;li&gt;Then put AI in the right place to assist&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same applies to &lt;code&gt;i18n-pilot&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It shouldn't promise "automatic completion of all internationalization" from the beginning.&lt;/p&gt;

&lt;p&gt;A more reasonable first step is: first help teams see clearly where their i18n debt is.&lt;/p&gt;

&lt;p&gt;Knowing where the problems are is what enables subsequent fixes, translations, PR generation, and continuous checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tags
&lt;/h2&gt;

&lt;h1&gt;
  
  
  webdev #javascript #typescript #opensource #i18n #cli #buildinpublic
&lt;/h1&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>i18n</category>
    </item>
  </channel>
</rss>
