cno is a standalone runtime for TypeScript and JavaScript. It provides a
Deno-style command line, browser-friendly Web APIs, and practical compatibility
with Deno and Node.js code.
Use it to run a script without a separate build step, start a small server, run tests and project tasks, or work with dependencies from npm, JSR, and remote URLs.
Note
cno is under active development. Compatibility is intentionally practical rather than complete, so code that depends on every detail of Deno or Node.js may still need changes. Bug reports and real-world examples are welcome.
Important
On October 9, 2026, Deno announced that its active development is expected to wind down over the following year. Because Deno compatibility is an important part of cno, this change also affects the assumptions behind cno's roadmap.
The project may move from broad feature development toward stable releases and bug-fix-focused maintenance. That direction is not final: feedback from people using cno will help decide what remains worth building and maintaining. If you rely on cno, please share your use cases, report compatibility gaps, or contribute fixes and documentation. PR for new features are also warmly welcomed!
- Runs TypeScript, TSX, JavaScript, JSX, ESM, and CommonJS.
- Resolves local files plus
npm:,jsr:,http:,https:,node:, anddata:imports. - Includes familiar Web APIs such as
fetch, streams, WebSocket, WebCrypto, workers, andDeno.serve. - Provides many Deno APIs and Node.js built-in modules.
- Includes commands for tests, tasks, dependency caching, a REPL, debugging,
servers, and portable
.jspackbundles. - Ships as a native executable; a Node.js or Deno installation is not required to run it.
Download the archive for your operating system and CPU from GitHub Releases, then extract the whole archive.
Keep the included ext/ directory, and lib/ when present, next to the cno
executable. Some release variants use files from those directories at runtime.
Add the extracted directory to PATH if you want to call cno from anywhere.
Check the installation and prepare the raw TypeScript compatibility sources for Node.js, Bun, and shared utilities:
cno --version
cno setupOn Windows, use cno.exe if the extracted directory is not yet on PATH.
Create hello.ts:
const name: string = Deno.args[0] ?? "world";
console.log(`Hello, ${name}!`);Run it directly:
cno hello.ts cno
# Hello, cno!run is optional when the first argument is a file path:
cno run hello.ts cno
cno hello.ts cnoEvaluate a short expression or open the interactive REPL:
cno eval 'console.log(6 * 7)'
cno replImports can use familiar Deno- and Node-style specifiers:
import { join } from "node:path";
import packageJson from "./package.json" with { type: "json" };
console.log(join(packageJson.name, "cache"));npm and JSR packages can be imported without manually creating a
node_modules directory:
import leftPad from "npm:left-pad@1.3.0";
import { Hono } from "jsr:@hono/hono@4.12.27";Prepare dependencies ahead of time and write the resolution cache with:
cno cache app.tsRunning cno cache without a file reads dependencies from deno.json and
package.json. If a tool requires a physical node_modules tree, use
--npm-mode=soft or --npm-mode=hard with the cache command.
A module whose default export contains a fetch function can be served
directly:
export default {
fetch(request: Request): Response {
return new Response(`Hello from ${new URL(request.url).pathname}`);
},
};cno serve --port=8000 server.tscno runs tests declared with Deno.test and discovers files such as
example.test.ts and example_test.ts:
import { strictEqual } from "node:assert";
Deno.test("addition", () => {
strictEqual(20 + 22, 42);
});cno test
cno test tests/
cno test --filter=additionTasks can come from deno.json, deno.jsonc, or package.json:
cno task
cno task dev| Command | Purpose |
|---|---|
cno <file> [args...] |
Run a TypeScript or JavaScript file |
cno run <file> [args...] |
Run a file explicitly |
cno serve <file> |
Serve a module's default fetch export |
cno eval <code> |
Evaluate inline code |
cno repl |
Start an interactive TypeScript REPL |
cno test [paths...] |
Run test files |
cno task [name] |
Run a project task |
cno cache [file] |
Prepare dependencies and update cts.lock |
cno exec <bin> [args...] |
Run an npm package binary, similar to pnpx |
cno pack <file> |
Package an entry and its dependencies as .jspack |
cno setup |
Install or refresh raw TypeScript sources for Node.js, Bun, and shared utilities |
Useful options include:
| Option | Purpose |
|---|---|
--reload / --precache |
Prepare the dependency graph before running |
--cached-only |
Refuse network downloads |
--frozen |
Fail when an import is missing from cts.lock |
--no-http, --no-jsr, --no-node |
Disable selected import sources |
--cache-dir=<path> |
Choose another cache directory |
--inspect, --inspect-brk |
Start the Chrome DevTools debugger; place before the command |
--memory-limit=<size> |
Set a runtime memory limit; place before the command |
Run cno --help for the complete command and option reference.
cno aims to run useful Deno, Node.js, and Web-platform code, but it is not a complete replacement for any of those runtimes. In particular:
- Some APIs and Node.js built-in modules are only partially implemented.
- npm packages that rely on native addons, an exact
node_moduleslayout, or subtle Node.js behavior may not work yet. - Optional native features can vary by release and platform.
Warning
cno does not currently provide Deno's permission sandbox. Permission flags
such as --allow-read and --deny-net are accepted for command-line
compatibility but are not enforced. Do not use them as a security boundary,
and do not run untrusted code.
See Compatibility for current support boundaries and CLI for detailed command behavior.
Most users should use a release archive. To build cno yourself, first install a C/C++ toolchain, CMake, pnpm, and the platform libraries listed in the build guide. Rust is optional and enables the faster OXC TypeScript transformer.
Clone the repository with its submodules and install the JavaScript dependencies:
git clone --recurse-submodules https://github.com/imzlh/cno-cli.git
cd cno-cli
pnpm install --frozen-lockfile
pnpm --dir cno install --frozen-lockfile
pnpm --dir cts install --frozen-lockfileBuild on Linux or macOS:
./build.shBuild on Windows from PowerShell:
.\build.ps1The assembled files are written to dist/exe/. For platform-specific setup,
manual CMake commands, and validation steps, read
Building and testing.
Issues and pull requests are welcome. When reporting a runtime problem, include
cno --version, your operating system and CPU architecture, and a small
reproduction when possible.
Development documentation is collected in the documentation index.
MIT