Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

I'm building a CLI using Oclif v4 with TypeScript and tsup for bundling. I want my main command to run by default, without requiring the user to type it as a subcommand. Currently, my oclif ...
Vin's user avatar
  • 85
0 votes
1 answer
69 views

I have a few commands with oclif whose tests fail with vitest but pass with jest. I believe something is off with the mocking. This is the structure: src/ commands/ foo-cmd.ts tests/ ...
gkri's user avatar
  • 2,041
0 votes
0 answers
229 views

I generated a new CLI with oclif, and everything was functional with the "hello, world" example provided. However, when I went to edit the initial "hello world" example I am no ...
Muttonchop's user avatar
1 vote
0 answers
474 views

I'm building a CLI with Node.js and want to add less/more like pagination. I can just stdout the output and pipe it to less like this but I'm not able to add the text highlight just like git log in ...
Anurag Bhagsain's user avatar
1 vote
0 answers
352 views

I'm writing a CLI using oclif. I want to use it like mycli [flags]. But I could't found a method to create a silgle command CLI. I have read oclif's docs, https://oclif.io/docs/flags; There's ...
dennis gao's user avatar
1 vote
1 answer
208 views

This title says it all: How do I programatically read the version of a currently running oclif command-line app (from within the app)?
neu242's user avatar
  • 16.8k
0 votes
1 answer
428 views

I'm writing a CLI using Heroku's CLI framework oclif. It works great, but I have a flag that is applicable to only list type commands. How to add the same flag to multiple commands but not to all in ...
lakshmiravali rimmalapudi's user avatar
0 votes
1 answer
566 views

I have a node / typescript application that leverages yarn workspaces. We are also using oclif for our cli. I want to set up an architecutre where my main cli can leverge cli-plugins from the domains ...
Jonathan's user avatar
  • 16.4k
1 vote
0 answers
134 views

I have an existing cli with OCLIF. I'd like to embed the cli in an angular web application. Is this possible? How might I start this? I started looking at xterm.js. Can these two technologies be ...
Ken's user avatar
  • 1,539
3 votes
0 answers
164 views

I have a CMD project based on oclif framework written on TypeScript. I'm wondering - is it possible to compile .ts into .js for production use? I tried to compile files into ./lib folder, then run a ...
Kirill Zhirnov's user avatar
2 votes
0 answers
162 views

Let's say I have export class MyCommand { async run() { this.someCommand(); ... } someCommand() { } } I want to write a test for the run command but mock out the someCommand. How ...
Kousha's user avatar
  • 36.7k
2 votes
0 answers
588 views

I am trying to test my entire cli dialogs using oclif and @oclif/test. Prompts are made with inquirer. Everything work fine, except the use of the .stdin( mock. Feature extract looks like this: ... ...
Slim's user avatar
  • 1,276
1 vote
1 answer
784 views

How can I test the following code build using Typescript in Oclif? This CLI consumes a rest api build with node.js and express.js. I am testing my api with mocha/chai which I have become familiar with....
user avatar
0 votes
0 answers
187 views

I have created a Rest API with node js and express js. The Rest api is consumed by a cli I have created using oclif and typescript. I want to create a command that takes a csv file sends the data as ...
user avatar
4 votes
1 answer
531 views

Does Oclif support making a call to an API and getting the values returned in order to be used for autocomplete? I have the following use case: Multiple users are stored in a database When the user ...
anegru's user avatar
  • 1,133
3 votes
0 answers
844 views

I'm playing with a small app that fetch data from Jira, generates metrics and serves it to a React front-end (https://github.com/fgerthoffert/jira-agile-velocity). It currently contains: a CLI, built ...
FrancoiG's user avatar
  • 101
1 vote
0 answers
949 views

I am trying to release a cli built with oclif as a tarball. In the local env, I need to write npm link to link the code with the command. But in prod, I do not want the user to open a terminal and ...
Albert Louzon's user avatar
2 votes
1 answer
1k views

I am creating a cli app using oclif. The user executes a command, and the cli asks him if wants to continue (yes/no answer). I trying to test the command that uses the cli-ux prompt. I want to ...
Rodrigo Suarez's user avatar
1 vote
1 answer
270 views

My requirement is quite simple. I want to execute help command when a user executes a specific command without enough arguments. async run() { if (!args.name) { this.log(please provide a ...
Nipuna Prashan's user avatar
11 votes
2 answers
23k views

I have a Node.js project written in Typescript which is expected to run as a CLI, and am having trouble to import a module located out of the node_modules directory using an absolute path (relative ...
edu_'s user avatar
  • 920