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.

Filter by
Sorted by
Tagged with
-1 votes
1 answer

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 ...
Glutexo's user avatar
  • 147
2 votes
2 answers

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 ...
Yirmi's user avatar
  • 131
2 votes
2 answers

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 ...
LeanMan's user avatar
  • 179
-2 votes
1 answer

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 ...
a.ilchinger's user avatar
-3 votes
1 answer

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 ...
herboren's user avatar
2 votes
1 answer

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&...
stephenfin's user avatar
1 vote
2 answers

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 ...
user3056783's user avatar
0 votes
1 answer

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 ...
callum's user avatar
  • 10.4k
1 vote
1 answer

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 ...
danielr1996's user avatar
1 vote
2 answers

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 ...
Tim's user avatar
  • 5,425
-2 votes
1 answer

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 ...
qwr's user avatar
  • 333
0 votes
1 answer

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 ...
Nick Martin's user avatar
-2 votes
1 answer

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: ...
User8461's user avatar
  • 113
2 votes
1 answer

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 ...
kqr's user avatar
  • 369
2 votes
1 answer

Server-client CLI messaging design

I'm prototyping some single machine, single user software with a client-server model; the first client for which will be a CLI, but I expect a (local) webapp/GUI to come later. For the CLI, I'd like ...
OJFord's user avatar
  • 249
4 votes
2 answers

Grouping non-boolean command-line options

This is just a quick question about standard CLI-parsing design. Say we have: foo -abc for most CLI-parsers, a single - dash (as opposed to a double dash --) means you can group single letter ...
user avatar
2 votes
2 answers

How should I manage user session in CLI application?

I'm developing a CLI based application. It has a "login" command to perform authentication: $ myapp login $ Type username: hector $ Type password: ***** $ Login success! Internally, myapp login ...
Héctor's user avatar
  • 727
1 vote
2 answers

Choosing the right paradigm when building a GUI for an application

I'm building a GUI for a CL program and I have the following question Is it better to Have the GUI invoke the program behind the scenes using a shell with some options eg: If I were I were writing a ...
Srini's user avatar
  • 127
5 votes
2 answers

Multi-level validation in C#

I have a Console project reads inputs from CSV file and tries to save them to database. For that, I created a class Person that maps a CSV row. The CSV file has two columns Name and Age. Person ...
Mhd's user avatar
  • 195
0 votes
0 answers

Character to show cut off file paths

I have a cli application, that has the option of displaying file paths in addition to typical output. Some file paths can be quite long so I want to cut the path off once it is longer than a certain ...
XAMPPRocky's user avatar
0 votes
1 answer

How does one "secure" a python CLI-based application? [duplicate]

I have to provide a Python CLI-based program to one of my clients. I will give him both the compiled version (using py2exe or something simillar) of the application and the source code. The ...
Grajdeanu Alex's user avatar
2 votes
1 answer

Is there a cross-platform way to open a TCP connection, send a HTTP post request and keep the connection open?

I'm searching for a way to open a TCP connection, send a HTTP post request and keep the connection open. It would be great if I can achieve this without administrator/root rights, from a command-line ...
Bob Ortiz's user avatar
  • 131
214 votes
5 answers

What are good habits for designing command line arguments?

While developing the application I started to wonder - How should I design command line arguments? A lot of programs are using formula like this -argument value or /argument value. Solution which ...
Filip Hazubski's user avatar
2 votes
0 answers

Where to output from large CLI app [closed]

I've built a reasonably sized CLI app with everything split across different classes and namespaces in a logical way. However many components need to render output from within themselves. Which seems ...
Rick's user avatar
  • 216
3 votes
2 answers

OOP CLI menu structure organization?

This problem has kept me from pursuing a project I'm working on because it influences the entire structure of the application. This question has been briefly touched on here, but I feel that it wasn't ...
Jared's user avatar
  • 483
1 vote
1 answer

Rich console UI

There are bunch of console programs and especially games using full redraw (not sure ho this correctly named) of console window. For example, look at output of linux top program -> http://upload....
Alex's user avatar
  • 119
14 votes
2 answers

Is it crazy to develop a TUI today? [duplicate]

I'm starting to develop a new program. It's basically a database interface, run a few queries, show the data in a nice way and be able to easy input new data (like this website). Thinking about which ...
iveqy's user avatar
  • 468
0 votes
2 answers

Why to have an application with GUI on linux when command line is available?

If the question appears to be off topic then please migrate to some other suitable domain on stackexchange. Q.why to have GUI along with CLI, when you already have command line interface? I'm ...
bikram990's user avatar
  • 133
38 votes
7 answers

Is the development of CLI apps considered "backward"? [closed]

I am a DBA fledgling with a lot of experience in programming. I have developed several CLI, non interactive apps that solve some daily repetitive tasks or eliminate the human error from more complex ...
Tulains Córdova's user avatar
0 votes
1 answer

Best way to build a hierarchy CLI menu?

I want to build a command line interface with menus and sub-menus and eventually the leafs of the tree should be operations like.. bank management -> account management -> add acount (insert account ...
aclowkay's user avatar
  • 131
3 votes
2 answers

SVN command line client: checkout refused when LDAP password changed “svn: OPTIONS of” (repo) “authorization failed” (but works in TortoiseSVN)

When using the command line/terminal svn client, a colleague is getting "svn: OPTIONS of " [repo] "...authorization failed" error message when they attempt to checkout the repo to be their local ...
therobyouknow's user avatar
7 votes
1 answer

How can a computer render a CLI/console along with a GUI?

I'm confused when looking into graphics - specifically with operating systems. I mean, how can a computer render a CLI/console along with a GUI? GUI's are completely different from text. And how can ...
Nathaniel Bennett's user avatar
11 votes
4 answers

Practical size limits of a Hashtable and Dictionary in C#

What are the practical limits for the number of items a C# 4 Dictionary or Hashtable can contain and the total number of bytes these structures can reasonable contain? I'll be working with large ...
JoeGeeky's user avatar
  • 811
17 votes
9 answers

How does a CLI-oriented programmer's workflow differ from a GUI-oriented one?

I've heard a lot about the advantages of doing less programming work in GUI apps and using more command-line tools (especially with regard to getting things done more efficiently). However, since I ...
user541686's user avatar
  • 8,102
1 vote
5 answers

How to structure reading of commands given at a(n interactive) CLI prompt?

Let's say I have a program called theprogram (the marketing team was on strike when the product was to be named). I start that program by typing, perhaps not surprisingly, the program name as a ...
Anto's user avatar
  • 11.2k