MokuStudio: A Code Editor That Runs on Your NetSuite File Cabinet

MokuHub7 min read
netsuitesuitescriptmokustudiofile-cabinet

Open a SuiteScript file in the NetSuite File Cabinet and click Edit. What you get is a textarea.

That is not a figure of speech. There is no syntax highlighting worth the name, no bracket matching, no go-to-definition, no search across files, no way to see the module you are calling without opening a second tab and hunting for it in the folder tree. If you have ever fixed a script this way you know the specific feeling: you are writing code in a text box, and the text box does not know it contains code.

So nobody does that. The actual workflow is download, edit locally, upload. Every SuiteScript developer has run that loop thousands of times, and every one of them has at some point uploaded to the wrong folder, or edited a file that was already stale, or lost track of which version is the one that is actually deployed.

MokuStudio is what happens when you decide the loop should not exist.

What it is

MokuStudio is a code editor that runs inside your browser, on top of the File Cabinet of the NetSuite account you are currently signed in to. It is built on Monaco, which is the editor engine behind VS Code, so the editing itself behaves the way your hands already expect.

You get the folder tree, tabs, cross-file search, diff, and inline preview for images and PDFs. It handles JavaScript, TypeScript, JSON, HTML, CSS, XML and FreeMarker. You open a file, you edit it, you save it back in place. There is no download step, no upload step, and no question about which copy is live, because there is only one copy and you are editing it.

It ships inside the MokuBot Chrome extension, and it is free. Not free-trial free. There is no subscription attached to the editor, and there is no plan you have to be on to use it.

It works through your existing NetSuite session. It reads and writes under your login, your role and your permissions, which means it can see exactly what you can see and nothing else. There is no integration record to configure and no credential stored anywhere. We wrote at length about why that architecture matters for an AI tool touching your ERP, and the same reasoning applies to an editor.

The part that was hard: knowing what your own code means

Everything above is table stakes for an editor. Here is the part that is genuinely different, and the reason MokuStudio is worth opening rather than just being nicer than a textarea.

Take a real file. It starts like every SuiteScript 2.x file starts:

define(['N/record', 'N/search', './lib/tax-helper'], function (record, search, taxHelper) {

Your IDE, locally, knows what taxHelper is because the file is sitting next to it on disk. In the browser, ./lib/tax-helper is a string. The native editor has no idea it refers to anything. Every editor that has ever been bolted onto the File Cabinet has treated it as a string, which is why they all give you highlighting and stop there.

MokuStudio resolves it. It reads the dependency list, finds each of those files in the File Cabinet, and feeds their actual contents to the type engine. Then it does the same for their dependencies, transitively.

What that buys you, concretely:

  • Autocomplete on your own helpers. Type taxHelper. and you get the functions that are really in that file, with their real parameters, because the types were inferred from your source rather than from a stub someone wrote once and never updated.
  • Ctrl+Click on a dependency string opens that file. In the File Cabinet. In a tab. This alone changes how it feels to work in a codebase you did not write.
  • Errors that are actually yours. Calling a helper with the wrong number of arguments gets flagged, because the editor has read the helper.

There is a detail here that sounds trivial and is not: ./helper and ../utils/helper can point at the same physical file from two different callers. If you treat those as two different modules you end up with two different sets of inferred types for one file, and they drift. MokuStudio collapses paths to a canonical form so one file is one module regardless of who is asking.

None of this exists anywhere else in the NetSuite ecosystem, because none of it is a feature you can add in an afternoon. It is the difference between an editor and a text box that has learned to change colour.

Concurrency, briefly

The File Cabinet has no version control, no locking, and no conflict detection. Two people editing the same file means the second save silently destroys the first, with nothing recorded anywhere.

MokuStudio records the server's version of a file when you open it and re-checks before it writes, so an edit that landed while you were working shows up as a conflict with a three-way merge rather than as a silent overwrite. Discard restores from the server, not from a local cache, because the server is the truth.

That problem deserves more room than it gets here, including how to detect it yourself with one SuiteQL query if you would rather not install anything. It is written up separately.

The editor and the agent share one buffer

This is the design decision the rest of the product hangs on, and it is worth explaining because it is easy to miss what makes it different.

MokuBot, the AI agent, and MokuStudio, the editor, do not talk to each other over a clipboard. They operate on the same virtual file system. When you have unsaved changes in a tab, the agent's file operations see those unsaved changes. It reads your dirty buffer, not the version sitting on the server.

The usual shape of AI in an editor is: the model produces a block of code in a chat panel, you read it, you copy it, you paste it, you fix the two things that did not fit. That is a conversation with a very fast colleague who cannot reach the keyboard.

Here, the agent edits the file you have open, and its edits appear in the editor while you are looking at them. You can keep typing. You can undo what it did. You can be halfway through a function, ask it to finish the error handling, and watch it write into the same unsaved buffer you are working in.

Whether that is better is a matter of taste and I am not going to pretend it is universally so. Some people want the model held at arm's length, and that is a defensible position when the code touches revenue recognition. But the copy-paste step is not a safety feature, it just feels like one, and if you have ever wanted the thing to please just apply the change it is describing, this is what that looks like.

What it does not do

An honest list, because the gaps matter more than the features when you are deciding whether to open it:

  • It is not a replacement for SDF and git. It has no version history of its own. If your scripts live in a repository and deploy through SuiteCloud, keep doing that. MokuStudio is for the work that happens outside that pipeline, which in most accounts is more work than anyone admits.
  • It does not deploy. It edits files in the File Cabinet. Creating script records, setting up deployments and configuring parameters still happen in NetSuite's own UI.
  • There is no debugger. You cannot set a breakpoint in a scheduled script from here, and NetSuite's own debugger is still the tool for that.
  • File Cabinet only. Files stored elsewhere, and script records themselves, are out of scope.
  • It needs an active NetSuite session. By design, since that is where the permissions come from. If your session expires you sign in again the way you always do.

Why it is free

The editor is free because we did not build it to sell. We built it because the AI agent needed a place to put code, and the alternative was a chat window that reads files and prints diffs, which is what everyone else is doing and is worse.

Once it existed as a real editor, charging for it separately would have meant putting a paywall between a NetSuite developer and the ability to edit a file without downloading it. That is not a business, it is a toll booth on a road we happened to pave.

The AI analysis on top of it is the paid part. The line is simple and we would rather state it plainly than bury it in a pricing table: anything deterministic is free, anything where a model is doing the judging is on a subscription. Editing, resolving imports, merging, searching, saving: free, forever, no account tier. Asking a model to review your script: paid.

You can install MokuBot from the Chrome Web Store and open MokuStudio without ever creating a paid account. If all you ever use it for is not having to download files anymore, that is a completely reasonable outcome and it costs you nothing.