Questions tagged [cli]
A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.
36
questions
0
votes
3
answers
194
views
Adding a CLI to a Windows service
I have a Windows service that I would like to extend and add a CLI to it similar to docker or Elastic Agent, so I have a question about what kind of approach I should use for the *.exe to communicate ...
-1
votes
1
answer
197
views
Why have a path argument when there is cwd
When writing a program that uses a working directory, e.g., PostgreSQL data directory or download target for wget, is there an advantage of having a CLI argument (or an environment variable) for such ...
2
votes
2
answers
205
views
Is there a canonical way to format 'usage' output for a cli script?
I have a python script that is supposed to be used as a small cli program.
This is google's recommendations on how to document cli syntax. I was wondering, are there similar recommendations, or ...
2
votes
2
answers
99
views
Dynamic loading of objects defined during development for a running system
So I have a design/architectural question. I want to develop a pattern in a programming language that is able to allow a app command-line shell to send commands to a running application to create ...
-2
votes
1
answer
136
views
Event loop for console input
I have a server application that runs in an infinite loop, only reacting to SIGINT. It is put inside a screen process. If I have to make any changes (reload configuration, add new plugins, etc) I ...
-3
votes
1
answer
173
views
How does a site API determine the difference between a user and program request in a browser?
So this is in regards to scraping yes; no language in particular. Some sites allow you to see a JSON modal if you pull it directly from a web browser. But, at any notion a program is used, immediately ...
2
votes
1
answer
105
views
Parsing complex object-like parameters via CLI arguments
Say we have an API that accepts a list of objects. Something like:
{
"family": "Does",
"contact_details": [
{
"name": "John&...
1
vote
2
answers
127
views
How to write documentation for CLI app that requires stdin?
I am writing CLI program that can accept very long strings. For this reason I decided to pipe the data into the program as I would hit limitation of the shell / OS.
How should these CLI program ...
0
votes
1
answer
950
views
How to launch a detached child process in Node, and reuse it on subsequent executions if already running?
I want to write a Node CLI that leaves a server/daemon running in the background, so subsequent calls to the CLI are much faster, as it can just print the latest info from the daemon (which is already ...
1
vote
1
answer
43
views
CLI and Lib package, where to put module loading code
My Software contains a lib package, a cli package and an arbitrary number of plugin packages.
The plugin packages do the algorithmic work.
The lib package basically just executes the plugins and ...
1
vote
2
answers
293
views
Is MVC an architectural pattern for user-interactive applications only?
Is it correct that MVC is an architectural pattern only for user-interactive applications? (That is my understanding.)
An application can interact with users via GUI or CLI.
Does MVC apply to both ...
-2
votes
1
answer
54
views
Should a CLI wrapper specify function defaults?
In my code let's say I have a function which does most of the work:
def compute(x=3, y=5):
...
And I have a CLI wrapper program using argparse. I intend end users to use the CLI program and not ...
0
votes
1
answer
278
views
Combining web app and CLI to python package
I'm writing a program in Python that has two different entry points. There's a CLI that processes some data and needs to be installed to run hourly on a server, this populates a database. There's also ...
-2
votes
1
answer
505
views
How to implement a CLI interaction with running java programm? [closed]
I would like your tipps about implemening a command line interface
to interact with a running java application.
Example:
The Java Application is a webserver and a cli-client should interact with it:
...
2
votes
1
answer
125
views
Put functionality in same executable with command-line flag, or put it in a separate executable?
Background: I am working on a service where the domain logic exists as a library, and then the actual executable is built on a web framework as a wrapper around the domain logic library. There is no ...