Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
NextJS CLI script - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
3y ago
•
3 replies
Scotty O
NextJS CLI script
How do I go about running a script as a
"CLI
" script in my NextJS project
? I
've tried
https://dev.to/philippe/create-a-cli-script-in-your-nextjs-project-2pg2
but it looks like I can
't
"import
" using that
(module does not export
.
.
.
)
DEV Community
Create a CLI script in your NextJS project
You put everything you need in your NextJS project
: pages
, code
, tests
, stories
.
.
. Some of these
.
.
.
Solution
Create a
.ts
.ts
file anywhere in your
src
src
dir and use
https://github.com/egoist/tsno
to run it
GitHub
GitHub - egoist/tsno: `node` with typescript support, importing fro...
node
node
with typescript support
, importing from URL
, etc
.
- GitHub
- egoist
/tsno
:
node
node
with typescript support
, importing from URL
, etc
.
Jump to solution
Theo's Typesafe Cult
Join
26,564
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Good way to run single file script with NextJS
TTC
Theo's Typesafe Cult / questions
4y ago
Nextjs
TTC
Theo's Typesafe Cult / questions
3y ago
Next/Script
TTC
Theo's Typesafe Cult / questions
4y ago