{"id":12088,"date":"2026-08-16T16:00:15","date_gmt":"2026-08-16T07:00:15","guid":{"rendered":"https:\/\/kusanagi.tokyo\/column?p=12088"},"modified":"2026-08-16T16:00:15","modified_gmt":"2026-08-16T07:00:15","slug":"using-kusanagi-as-an-ai-development-environment-from-my-pc-and-smartphone","status":"publish","type":"post","link":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_12088","title":{"rendered":"Using KUSANAGI as an AI Development Environment from My PC and Smartphone"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello. I\u2019m Chieko Aihara, Product Manager on the KUSANAGI development team.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Recently, I have been using AI agents more often to write programs, research data, and draft articles.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, preparing a development environment on each PC can be surprisingly time-consuming. Libraries and settings may differ from one PC to another, making it difficult to resume the same work immediately.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another challenge was carrying over my conversations with AI. Code and documents can be shared through Git, but simply moving the files does not preserve what I discussed with the AI or why a particular decision was made. I created Markdown handoff files and passed them to the next session, but they could not carry over the entire conversation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It was also inconvenient to stay close to my PC while a long-running task was in progress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To reduce these inconveniences, I gradually refined my workflow using handoff files, <code>tmux<\/code>, and <code>codex resume<\/code>. Through that trial and error, I arrived at a setup in which a Linux server running KUSANAGI serves as the base for AI-assisted development, with the ChatGPT desktop app on my PC connecting to it over SSH. I also tried continuing the work from my smartphone and finding practical ways to review Markdown and HTML files created on the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">KUSANAGI makes it easy to prepare a web environment, while the underlying Linux server can run a wide range of development tools. By combining the two, the environment used to run websites can also serve as a base for AI-assisted development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Moving_the_Development_Environment_to_the_KUSANAGI_Server\"><\/span>Moving the Development Environment to the KUSANAGI Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this setup, the source code, Python virtual environments, and Git working state all reside on the KUSANAGI server. The PC acts as the interface, while file operations and commands are executed on the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I separated the storage locations by purpose as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/kusanagi\/\n\u251c\u2500\u2500 sandbox\/work\/YYYY-MM-DD_HHMM\/  One-off research, experiments, and drafts\n\u251c\u2500\u2500 projects\/&lt;project&gt;\/            Development projects under ongoing management\n\u2514\u2500\u2500 &lt;profile&gt;\/DocumentRoot\/        Files served or executed on the web<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I use <code>sandbox\/work<\/code> for small investigations and experiments, <code>projects<\/code> for code that I will continue to maintain, and the DocumentRoot of a KUSANAGI profile for anything that needs to be viewed from the web. This article itself was written in a timestamped directory under <code>sandbox\/work<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Storing something under <code>\/home\/kusanagi<\/code> does not make it safe by itself. I keep repositories under development outside the DocumentRoot, configure Linux permissions and the AI agent\u2019s writable scope, and keep secrets out of the repository. In other words, I combine several boundaries rather than relying on a single measure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I feel that keeping only the files that truly need to be web-accessible in the DocumentRoot is especially important when developing on a public server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"From_Handoff_Files_to_tmux_and_resume\"><\/span>From Handoff Files to tmux and resume<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When working with AI, the conversation that led to the finished files can be just as important as the files themselves.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At first, I summarized the work completed, decisions made, and next steps in a Markdown handoff file. This approach is still valuable because it works even when switching AI tools. At the same time, it requires me to summarize the key points each time, and it is difficult to preserve the finer details of a conversation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I then started using <code>tmux<\/code>, which keeps a terminal session running on the server even if the SSH connection drops, as well as <code>codex resume<\/code>, which reopens a previous conversation. These tools made it easier to reconnect to the same KUSANAGI server and return to work in progress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There were still a few steps involved when switching PCs: connect to the terminal, find the appropriate session, and resume it. I also needed another way to review changes or respond to questions from the AI on my smartphone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Handoff files preserve the important points that should remain available across tools. <code>tmux<\/code> and <code>codex resume<\/code> make it possible to resume work on the server. Both are useful, but connecting through the desktop app lets me handle conversations, changes, and command output in one place, much as I would when working on a project stored directly on my PC.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Connecting_over_SSH_from_the_Desktop_App\"><\/span>Connecting over SSH from the Desktop App<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The ChatGPT desktop app can connect to a project on an SSH host. From my PC, I can review the chat and file changes while reading and writing files and running commands on the KUSANAGI server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After adding the destination to the SSH configuration on the PC, I can select the server and working directory from the app.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Host dev-server\n  HostName server.example.com\n  User kusanagi\n  IdentityFile ~\/.ssh\/id_ed25519<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once I tried it, the division of roles felt more natural than I expected: the PC provides the interface, and the KUSANAGI server provides the actual working environment. I found it particularly convenient to open a chat in the app and continue where I left off, rather than restart the CLI and select the conversation again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because the development environment resides on the server, the source code and dependencies remain unchanged when I switch PCs. As long as I can connect over SSH, I can resume work in the same environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also discovered another major difference. With a CLI, showing the AI the state of a screen or an error message requires me to describe it in text or tell the AI where an image file is stored. In the desktop app, I can simply copy and paste a screenshot into the chat.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Being able to show the screen and say, \u201cThis is the part that looks wrong,\u201d saves explanation and reduces misunderstandings. For development involving websites and administration screens, this was a much bigger benefit than I had expected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Sharing_Settings_Between_Codex_and_Claude_Code\"><\/span>Sharing Settings Between Codex and Claude Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to Codex CLI, this KUSANAGI server has Claude Code installed and available through the <code>claude<\/code> command. I can choose an AI tool based on the task, but inconsistent instructions and operating rules between tools can also lead to inconsistent decisions within the same project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To address this, I manage the shared configuration in a Git repository named <code>~\/dotfiles<\/code>. Dotfiles are configuration files used by shells and development tools. In this environment, the global instructions read by Codex and Claude Code are symbolic links to files in the dotfiles repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~\/.codex\/AGENTS.md   \u2192 ~\/dotfiles\/agents\/AGENTS.md\n~\/.claude\/CLAUDE.md \u2192 ~\/dotfiles\/claude\/CLAUDE.md<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>CLAUDE.md<\/code> file for Claude Code also imports the same <code>AGENTS.md<\/code> used by Codex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the tools share rules about keeping Git repositories outside the DocumentRoot on a public server, checking for remote updates at the beginning of a work session, and deciding where handoff files should be stored.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Managing these dotfiles with Git allows me to reuse the same policies on another PC or server. I do not need to explain everything again each time I switch AI tools. Conversations are continued through sessions and handoff files, while the common rules for working are kept consistent through dotfiles.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I keep authentication data, AI session history, SSH keys, and API keys out of the dotfiles repository. Only rules and reusable technical knowledge are shared.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Reviewing_Markdown_Directly_in_the_App\"><\/span>Reviewing Markdown Directly in the App<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One feature I found especially useful was Markdown rendering.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When I opened a Markdown file created by Codex on the KUSANAGI server in the ChatGPT desktop app, headings, lists, and other elements appeared in a formatted, readable form. I did not have to reconnect to the server with another editor or download the file to my PC just to review the draft.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article is also written in Markdown. I ask Codex to revise it, read the result in the same app, and then provide additional instructions for anything I want to change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This workflow is useful for more than source code. Research notes, specifications, handoff documents, and article drafts can all remain on the server while still being easy to read from the PC. I feel this approach could extend well beyond development work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Continuing_from_a_Smartphone_After_Leaving_the_PC\"><\/span>Continuing from a Smartphone After Leaving the PC<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After setting up ChatGPT Remote, I can connect from the ChatGPT app on my smartphone to the work running on my PC.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ChatGPT app on a smartphone\n        \u2193 Remote\nChatGPT desktop app on a PC\n        \u2193 SSH\nKUSANAGI server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">From the smartphone, I can send additional instructions, answer questions from Codex, and approve commands. I can also review changes and test results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I no longer have to remain in front of the PC until a long-running task finishes. Being able to provide a necessary decision while away from my desk is a significant advantage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The smartphone connects to the PC through Remote, and the PC then connects to the KUSANAGI server over SSH. This means the PC must remain powered on and online, with the ChatGPT desktop app running.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Can_HTML_Be_Opened_Directly\"><\/span>Can HTML Be Opened Directly?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After seeing Markdown rendered in the app, I wondered whether HTML could be viewed in the same way. I created a small sample site with CSS and JavaScript and tried it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I could inspect the HTML source code, but it did not render as a web page. The \u201cOpen with\u201d action also did not work in this SSH-connected environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The app can format Markdown as a document. HTML, on the other hand, needs to load CSS and run JavaScript, so it requires a URL that a browser can access. Even though both are text files, they need different ways of being reviewed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Confirming this difference through an actual test was another useful discovery.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_a_KUSANAGI_Profile_for_Web-Based_Review\"><\/span>Using a KUSANAGI Profile for Web-Based Review<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When I want to review HTML or WordPress in a browser, I can use a KUSANAGI profile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In KUSANAGI, a profile is a site managed by FQDN on the virtual machine. Running <code>kusanagi provision<\/code> creates the web server configuration, DocumentRoot, and other required settings. It can provision WordPress as well as a LAMP or LEMP environment without WordPress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I can use a WordPress profile when reviewing a WordPress theme or plugin, and a LAMP or LEMP profile when reviewing a web application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After asking AI to write code, being able to continue through testing it in an actual web environment on the same KUSANAGI server is a meaningful advantage of this setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Repositories under development and design documents remain in <code>projects<\/code>, while only the files that need to be viewed from the web are placed on the profile side.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Reviewing_Temporary_HTML_Through_an_SSH_Tunnel\"><\/span>Reviewing Temporary HTML Through an SSH Tunnel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For generated reports, screen mockups, and other HTML files that only need to be viewed temporarily, there is also a way to review them without creating a KUSANAGI profile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In an actual project, I started Python\u2019s simple HTTP server on the KUSANAGI server. To prevent direct access from the internet, it listens only on <code>127.0.0.1<\/code>, which represents the server itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A simple HTTP server may sound as though it requires some preparation, but I only need to tell the AI which directory I want to display. It can quickly assemble and run the required command, and I can also ask it to stop the server when I am finished. This made temporary HTML review feel almost effortless.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># On the KUSANAGI server\ncd \/home\/kusanagi\/projects\/&lt;project&gt;\/output\npython -m http.server 8000 --bind 127.0.0.1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On the PC, I use SSH port forwarding:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># On the PC\nssh -L 8000:127.0.0.1:8000 dev-server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I then open <code>http:\/\/localhost:8000\/<\/code> in the PC\u2019s browser. Port 8000 remains closed to the internet, while the SSH connection lets me view the page locally on my own PC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The distinction is straightforward: use a KUSANAGI profile for ongoing web review, a simple HTTP server and SSH tunnel for temporary HTML, and Markdown for documents and written materials.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_Python_in_the_Same_Environment\"><\/span>Using Python in the Same Environment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this KUSANAGI environment, I create a virtual environment for each project based on Python 3.12. I use Python for tasks such as web research and report generation, then ask Codex to maintain and improve the code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This use of Python comes from treating KUSANAGI as a Linux server. I can use Python and other tools as needed, then turn to a KUSANAGI profile when something needs to be reviewed on the web. I believe the value lies in being able to handle both in the same environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Making_KUSANAGI_the_Base_for_AI-Assisted_Development\"><\/span>Making KUSANAGI the Base for AI-Assisted Development<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Since adopting this setup, I feel that my development process has become faster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The development environment is centralized on the KUSANAGI server and can be operated from the PC. Conversations with AI can continue in the app. When something needs to be shown visually, I can paste a screenshot directly into the chat. Codex and Claude Code can follow the same rules through dotfiles. Markdown documents are easy to review within the app. After leaving the PC, I can continue from my smartphone. When web-based review is needed, I can use a KUSANAGI profile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each difference may seem small on its own, but together they reduce the time spent rebuilding environments, re-explaining the context of a conversation, and describing a screen in words. I believe these accumulated improvements are what make the overall development process faster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By viewing KUSANAGI not only as a platform for running a CMS but also as a Linux environment for AI-assisted development, its range of uses can expand even further.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I would like to continue experimenting with what KUSANAGI and AI can accomplish together and share what I learn.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"References\"><\/span>References<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/kusanagi.tokyo\/document\/kusanagi-profile\/\">KUSANAGI Profiles<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/kusanagi.tokyo\/document\/commands\/provision\/\">KUSANAGI provision Command<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/kusanagi.tokyo\/document\/kusanagi-quickstart\/\">KUSANAGI Quick Start<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.chatgpt.com\/docs\/remote-connections\">OpenAI Docs: Remote Connections<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.chatgpt.com\/docs\/developer-commands?surface=cli\">OpenAI Docs: Developer Commands (<code>codex resume<\/code>)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.chatgpt.com\/docs\/browser\">OpenAI Docs: Browser<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Hello. I\u2019m Chieko Aihara, Product Manager on the KUSANAGI development team. Recently, I have been using AI agents more often to write programs, research data, and draft articles. However, preparing a development environment on each PC can be surprisingly time-consuming. Libraries and settings may differ from one PC to another, making it difficult to resume the same work immediately. Another challenge was carrying over my conversations with AI. Code and ... <a title=\"Using KUSANAGI as an AI Development Environment from My PC and Smartphone\" class=\"read-more\" href=\"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_12088\" aria-label=\"Read more about Using KUSANAGI as an AI Development Environment from My PC and Smartphone\">Read more<\/a><\/p>\n","protected":false},"author":34,"featured_media":12094,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[128,92],"tags":[120],"series":[90],"journey":[125],"product":[121],"class_list":["post-12088","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-kusanagi-en","tag-technical-guides","series-kusanagi-pm-blog-en","journey-deep","product-kusanagi","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33","no-featured-image-padding"],"_links":{"self":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts\/12088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/comments?post=12088"}],"version-history":[{"count":3,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts\/12088\/revisions"}],"predecessor-version":[{"id":12095,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts\/12088\/revisions\/12095"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/media\/12094"}],"wp:attachment":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/media?parent=12088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/categories?post=12088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/tags?post=12088"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/series?post=12088"},{"taxonomy":"journey","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/journey?post=12088"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/product?post=12088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}