Skip to content

Add compact full-help and compact output mode#27

Closed
Prajwalprakash3722 wants to merge 2 commits intomasterfrom
compact-outputs
Closed

Add compact full-help and compact output mode#27
Prajwalprakash3722 wants to merge 2 commits intomasterfrom
compact-outputs

Conversation

@Prajwalprakash3722
Copy link
Copy Markdown
Contributor

Added compact full-help and compact output mode, with a verbose fallback.
Below are the before-and-after savings (c refers to characters).
This should definitely help LLMs save tokens and preserve context more effectively.

My tiny contribution to global warming reduction 🤣

 ┌────────────────────┬─────────┬─────────┬─────────┐
 │      Category      │ Normal  │ Compact │ Savings │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ --full-help        │ 35,392c │ 3,070c  │ 91.3%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ apps list          │ 619c    │ 262c    │ 57.7%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ apps summary       │ 368c    │ 163c    │ 55.7%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ cluster summary    │ 335c    │ 230c    │ 31.3%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ executor list      │ 468c    │ 182c    │ 61.1%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ appinstances list  │ 352c    │ 168c    │ 52.3%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ localservices list │ 560c    │ 219c    │ 60.9%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ tasks list         │ 178c    │ 64c     │ 64.0%   │
 ├────────────────────┼─────────┼─────────┼─────────┤
 │ Total              │ 38,272c │ 4,358c  │ 88.6%   │
 └────────────────────┴─────────┴─────────┴─────────┘

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2026

✅ Offline Tests — Python 3.12

222 passed, 1 skipped, 116 deselected in 47.90s

Commit: 6135f88 | View full log

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2026

✅ Offline Tests — Python 3.11

222 passed, 1 skipped, 116 deselected in 39.14s

Commit: 6135f88 | View full log

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2026

✅ Offline Tests — Python 3.10

222 passed, 1 skipped, 116 deselected in 41.05s

Commit: 6135f88 | View full log

@santanusinha
Copy link
Copy Markdown
Contributor

If this works as expected, why is a verbose mode needed? This is anyways meant for llm use

@santanusinha
Copy link
Copy Markdown
Contributor

Post the actual old and new outputs first. If it looks okay we can completely get rid of the compact/verbose malarkey

@Prajwalprakash3722
Copy link
Copy Markdown
Contributor Author

Old Output

========================================================================
usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT]
             [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME]
             [--password PASSWORD] [--debug] [--full-help]
             [--print-completion {bash,zsh,tcsh}]
             {describe,lsinstances,localservices,tasks,config,apps,executor,cluster,appinstances} ...

positional arguments:
  {describe,lsinstances,localservices,tasks,config,apps,executor,cluster,appinstances}
                        Available plugins
    describe            Show detailed information about a resource
    lsinstances         Drove local service instance related commands
    localservices       Drove local service related commands
    tasks               Drove task related commands
    config              Manage drove cluster configurations
    apps                Drove application related commands
    executor            Drove cluster executor related commands
    cluster             Drove cluster related commands
    appinstances        Drove application instance related commands

options:
  -h, --help            show this help message and exit
  --file, -f FILE       Configuration file for drove client
  --cluster, -c CLUSTER
                        Cluster name as specified in config file
  --endpoint, -e ENDPOINT
                        Drove endpoint. (For example: https://drove.test.com)
  --auth-header, -t AUTH_HEADER
                        Authorization header value for the provided drove
                        endpoint
  --insecure, -i        Do not verify SSL cert for server
  --username, -u USERNAME
                        Drove cluster username
  --password, -p PASSWORD
                        Drove cluster password
  --debug, -d           Print details of errors
  --full-help           Show help for every command and sub-command
  --print-completion {bash,zsh,tcsh}
                        Print shell completion script for the given shell

========================================================================
usage: drove appinstances [-h] {list,info,logs,tail,download,replace,kill} ...

positional arguments:
  {list,info,logs,tail,download,replace,kill}
                        Available commands for application management
    list                List all application instances
    info                Print details for an application instance
    logs                Print list of logs for application instance
    tail                Tail log for application instance
    download            Download log for application instance
    replace             Replace specific app instances with fresh instances
    kill                Kill specific app instances

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove appinstances download [-h] [--out OUT]
                                   app-id instance-id applogfile

positional arguments:
  app-id         Application ID
  instance-id    Application Instance ID
  applogfile     Log filename to download

options:
  -h, --help     show this help message and exit
  --out, -o OUT  Filename to download to. Default is the same filename as
                 provided.

========================================================================
usage: drove appinstances info [-h] app-id instance-id

positional arguments:
  app-id       Application ID
  instance-id  Application Instance ID

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove appinstances kill [-h] [--parallelism PARALLELISM]
                               [--timeout TIMEOUT] [--wait]
                               app-id instance-id [instance-id ...]

positional arguments:
  app-id                Application ID
  instance-id           Application Instance IDs

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are killed

========================================================================
usage: drove appinstances list [-h] [--old] [--sort {0,1,2,3,4,5,6}]
                               [--reverse]
                               app-id

positional arguments:
  app-id                Application ID

options:
  -h, --help            show this help message and exit
  --old, -o             Show old instances
  --sort, -s {0,1,2,3,4,5,6}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove appinstances logs [-h] app-id instance-id

positional arguments:
  app-id       Application ID
  instance-id  Application Instance ID

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove appinstances replace [-h] [--parallelism PARALLELISM]
                                  [--timeout TIMEOUT] [--wait]
                                  app-id instance-id [instance-id ...]

positional arguments:
  app-id                Application ID
  instance-id           Application Instance IDs

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are replaced

========================================================================
usage: drove appinstances tail [-h] [--log LOG] app-id instance-id

positional arguments:
  app-id         Application ID
  instance-id    Application Instance ID

options:
  -h, --help     show this help message and exit
  --log, -l LOG  Log filename to tail. Default is to tail output.log

========================================================================
usage: drove apps [-h]
                  {list,summary,spec,create,destroy,deploy,scale,suspend,restart,cancelop} ...

positional arguments:
  {list,summary,spec,create,destroy,deploy,scale,suspend,restart,cancelop}
                        Available commands for application management
    list                List all applications
    summary             Show a summary for an application
    spec                Print the raw json spec for an application
    create              Create application on cluster
    destroy             Destroy an app with zero instances
    deploy              Deploy new app instances.
    scale               Scale app to required instances. Will increase or
                        decrease instances on the cluster to match this number
    suspend             Suspend the app
    restart             Restart am existing app instances.
    cancelop            Cancel current operation

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove apps cancelop [-h] app-id

positional arguments:
  app-id      Application ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove apps create [-h] spec-file

positional arguments:
  spec-file   JSON spec file for the application

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove apps deploy [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT]
                         [--wait]
                         app-id instances

positional arguments:
  app-id                Application ID
  instances             Number of new instances to be created

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure instance count is reached

========================================================================
usage: drove apps destroy [-h] app-id

positional arguments:
  app-id      Application ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove apps list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]

options:
  -h, --help            show this help message and exit
  --sort, -s {0,1,2,3,4,5,6,7,8}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove apps restart [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT]
                          [--wait]
                          app-id

positional arguments:
  app-id                Application ID

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are replaced

========================================================================
usage: drove apps scale [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT]
                        [--wait]
                        app-id instances

positional arguments:
  app-id                Application ID
  instances             Number of instances. Setting this to 0 will suspend
                        the app

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure instance count is reached

========================================================================
usage: drove apps spec [-h] app-id

positional arguments:
  app-id      Application ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove apps summary [-h] app-id

positional arguments:
  app-id      Application ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove apps suspend [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT]
                          [--wait]
                          app-id

positional arguments:
  app-id                Application ID

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are suspended

========================================================================
usage: drove cluster [-h]
                     {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off} ...

positional arguments:
  {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off}
                        Available commands for cluster management
    ping                Ping the cluster
    summary             Show cluster summary
    leader              Show leader for cluster
    endpoints           Show all exposed endpoints
    events              Events on the cluster
    maintenance-on      Set cluster to maintenance mode
    maintenance-off     Removed maintenance mode on cluster

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove cluster endpoints [-h] [--vhost VHOST]

options:
  -h, --help         show this help message and exit
  --vhost, -v VHOST  Show details only for the specific vhost

========================================================================
usage: drove cluster events [-h] [--follow] [--type TYPE] [--count COUNT]
                            [--textfmt TEXTFMT]

options:
  -h, --help            show this help message and exit
  --follow, -f          Follow events (Press CTRL-C to kill)
  --type, -t TYPE       Output events of only the matching type
  --count, -c COUNT     Fetch <count> events at a time.
  --textfmt, -s TEXTFMT
                        Use the format string to print message

========================================================================
usage: drove cluster leader [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove cluster maintenance-off [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove cluster maintenance-on [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove cluster ping [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove cluster summary [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove config [-h]
                    {get-clusters,current-cluster,use-cluster,view,init,add-cluster,delete-cluster} ...

positional arguments:
  {get-clusters,current-cluster,use-cluster,view,init,add-cluster,delete-cluster}
                        Available config commands
    get-clusters        List all configured clusters
    current-cluster     Show current default cluster
    use-cluster         Set default cluster
    view                Display the full configuration file
    init                Initialize a new ~/.drove config file
    add-cluster         Add a new cluster to config
    delete-cluster      Remove a cluster from config

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove config add-cluster [-h] --endpoint ENDPOINT [--username USERNAME]
                                [--password PASSWORD]
                                [--auth-header AUTH_HEADER] [--insecure]
                                cluster-name

positional arguments:
  cluster-name          Name for this cluster

options:
  -h, --help            show this help message and exit
  --endpoint, -e ENDPOINT
                        Drove endpoint URL
  --username, -u USERNAME
                        Username for basic auth
  --password, -p PASSWORD
                        Password for basic auth
  --auth-header, -t AUTH_HEADER
                        Authorization header value
  --insecure, -i        Skip SSL verification

========================================================================
usage: drove config current-cluster [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove config delete-cluster [-h] cluster-name

positional arguments:
  cluster-name  Cluster name to remove

options:
  -h, --help    show this help message and exit

========================================================================
usage: drove config get-clusters [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove config init [-h] --endpoint ENDPOINT [--name NAME]
                         [--username USERNAME] [--password PASSWORD]
                         [--auth-header AUTH_HEADER] [--insecure]

options:
  -h, --help            show this help message and exit
  --endpoint, -e ENDPOINT
                        Drove endpoint URL
  --name, -n NAME       Cluster name
  --username, -u USERNAME
                        Username for basic auth
  --password, -p PASSWORD
                        Password for basic auth
  --auth-header, -t AUTH_HEADER
                        Authorization header value
  --insecure, -i        Skip SSL verification

========================================================================
usage: drove config use-cluster [-h] cluster-name

positional arguments:
  cluster-name  Cluster name to use as default

options:
  -h, --help    show this help message and exit

========================================================================
usage: drove config view [-h] [--raw]

options:
  -h, --help  show this help message and exit
  --raw, -r   Show raw config file content

========================================================================
usage: drove describe [-h]
                      {executor,app,cluster,instance,task,localservice,lsinstance} ...

positional arguments:
  {executor,app,cluster,instance,task,localservice,lsinstance}
                        Available describe commands
    executor            Show detailed executor information
    app                 Show detailed application information
    cluster             Show detailed cluster information
    instance            Show detailed application instance information
    task                Show detailed task information
    localservice        Show detailed local service information
    lsinstance          Show detailed local service instance information

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove describe app [-h] [--json] app-id

positional arguments:
  app-id      Application ID

options:
  -h, --help  show this help message and exit
  --json, -j  Output as JSON

========================================================================
usage: drove describe cluster [-h] [--json]

options:
  -h, --help  show this help message and exit
  --json, -j  Output as JSON

========================================================================
usage: drove describe executor [-h] [--json] executor-id

positional arguments:
  executor-id  Executor ID

options:
  -h, --help   show this help message and exit
  --json, -j   Output as JSON

========================================================================
usage: drove describe instance [-h] [--json] app-id instance-id

positional arguments:
  app-id       Application ID
  instance-id  Instance ID

options:
  -h, --help   show this help message and exit
  --json, -j   Output as JSON

========================================================================
usage: drove describe localservice [-h] [--json] service-id

positional arguments:
  service-id  Local Service ID

options:
  -h, --help  show this help message and exit
  --json, -j  Output as JSON

========================================================================
usage: drove describe lsinstance [-h] [--json] service-id instance-id

positional arguments:
  service-id   Local Service ID
  instance-id  Instance ID

options:
  -h, --help   show this help message and exit
  --json, -j   Output as JSON

========================================================================
usage: drove describe task [-h] [--json] source-app task-id

positional arguments:
  source-app  Source Application Name
  task-id     Task ID

options:
  -h, --help  show this help message and exit
  --json, -j  Output as JSON

========================================================================
usage: drove executor [-h]
                      {list,info,appinstances,tasks,lsinstances,blacklist,unblacklist} ...

positional arguments:
  {list,info,appinstances,tasks,lsinstances,blacklist,unblacklist}
                        Available commands for cluster executor management
    list                List all executors
    info                Show details about executor
    appinstances        Show app instances running on this executor
    tasks               Show tasks running on this executor
    lsinstances         Show local service instances running on this executor
    blacklist           Blacklist executors
    unblacklist         Un-blacklist executors

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove executor appinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse]
                                   executor-id

positional arguments:
  executor-id           Executor id for which info is to be shown

options:
  -h, --help            show this help message and exit
  --sort, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove executor blacklist [-h] executor-id [executor-id ...]

positional arguments:
  executor-id  Executor IDs

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove executor info [-h] executor-id

positional arguments:
  executor-id  Executor id for which info is to be shown

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove executor list [-h]

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove executor lsinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse]
                                  executor-id

positional arguments:
  executor-id           Executor id for which info is to be shown

options:
  -h, --help            show this help message and exit
  --sort, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove executor tasks [-h] [--sort {0,1,2,3,4,5}] [--reverse]
                            executor-id

positional arguments:
  executor-id           Executor id for which info is to be shown

options:
  -h, --help            show this help message and exit
  --sort, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove executor unblacklist [-h] executor-id [executor-id ...]

positional arguments:
  executor-id  Executor IDs

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove localservices [-h]
                           {list,summary,spec,create,destroy,activate,conftest,deactivate,update,restart,cancelop} ...

positional arguments:
  {list,summary,spec,create,destroy,activate,conftest,deactivate,update,restart,cancelop}
                        Available commands for local services management
    list                List all local services
    summary             Show summary for a local service
    spec                Print the raw json spec for an local services
    create              Create a local service on cluster
    destroy             Destroy an inactive local service
    activate            Activate a local service
    conftest            Spin up one instance of service on any machine to
                        ensure it is running
    deactivate          Deactivate a local service
    update              Update instances count per host for a local service
    restart             Restart a local service.
    cancelop            Cancel current operation

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove localservices activate [-h] service-id

positional arguments:
  service-id  Local service ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices cancelop [-h] service-id

positional arguments:
  service-id  Local service ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices conftest [-h] service-id

positional arguments:
  service-id  Local service ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices create [-h] [--instances instances] spec-file

positional arguments:
  spec-file             JSON spec file for the local service

options:
  -h, --help            show this help message and exit
  --instances, -i instances
                        Number instances to run per executor. Default: 1

========================================================================
usage: drove localservices deactivate [-h] service-id

positional arguments:
  service-id  Local service ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices destroy [-h] service-id

positional arguments:
  service-id  Local service ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]

options:
  -h, --help            show this help message and exit
  --sort, -s {0,1,2,3,4,5,6,7,8}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove localservices restart [-h] [--stop] [--parallelism PARALLELISM]
                                   [--timeout TIMEOUT] [--wait]
                                   service-id

positional arguments:
  service-id            Local service ID

options:
  -h, --help            show this help message and exit
  --stop, -s            Stop current instance before spinning up new ones
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are replaced

========================================================================
usage: drove localservices spec [-h] service-id

positional arguments:
  service-id  local services ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices summary [-h] service-id

positional arguments:
  service-id  local services ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove localservices update [-h] service-id count

positional arguments:
  service-id  Local service ID
  count       Instance count per executor node

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove lsinstances [-h] {list,info,logs,tail,download,replace,kill} ...

positional arguments:
  {list,info,logs,tail,download,replace,kill}
                        Available commands for local service management
    list                List all local service instances
    info                Print details for an local service instance
    logs                Print list of logs for local service instance
    tail                Tail log for local service instance
    download            Download log for local service instance
    replace             Replace specific local service instances with fresh
                        instances
    kill                Kill specific local service instances

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove lsinstances download [-h] [--out OUT]
                                  service-id instance-id servicelogfile

positional arguments:
  service-id      Local Service ID
  instance-id     Local Service Instance ID
  servicelogfile  Log filename to download

options:
  -h, --help      show this help message and exit
  --out, -o OUT   Filename to download to. Default is the same filename as
                  provided.

========================================================================
usage: drove lsinstances info [-h] service-id instance-id

positional arguments:
  service-id   Local Service ID
  instance-id  Local Service Instance ID

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove lsinstances kill [-h] [--parallelism PARALLELISM]
                              [--timeout TIMEOUT] [--wait]
                              service-id instance-id [instance-id ...]

positional arguments:
  service-id            Local Service ID
  instance-id           Local Service Instance IDs

options:
  -h, --help            show this help message and exit
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are killed

========================================================================
usage: drove lsinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse]
                              service-id

positional arguments:
  service-id            Local Service ID

options:
  -h, --help            show this help message and exit
  --old, -o             Show old instances
  --sort, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove lsinstances logs [-h] service-id instance-id

positional arguments:
  service-id   Local Service ID
  instance-id  Local Service Instance ID

options:
  -h, --help   show this help message and exit

========================================================================
usage: drove lsinstances replace [-h] [--stop] [--parallelism PARALLELISM]
                                 [--timeout TIMEOUT] [--wait]
                                 service-id instance-id [instance-id ...]

positional arguments:
  service-id            Local Service ID
  instance-id           Local Service Instance IDs

options:
  -h, --help            show this help message and exit
  --stop, -s            Stop the instance before spinning up a new one
  --parallelism, -p PARALLELISM
                        Number of parallel threads to be used to execute
                        operation
  --timeout, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are replaced

========================================================================
usage: drove lsinstances tail [-h] [--log LOG] service-id instance-id

positional arguments:
  service-id     Local Service ID
  instance-id    Local Service Instance ID

options:
  -h, --help     show this help message and exit
  --log, -l LOG  Log filename to tail. Default is to tail output.log

========================================================================
usage: drove tasks [-h] {create,kill,list,show,logs,tail,download} ...

positional arguments:
  {create,kill,list,show,logs,tail,download}
                        Available commands for task management
    create              Spawn a new task on cluster
    kill                Kill a running task
    list                List all active tasks
    show                Shows details about a task
    logs                Print list of logs for task
    tail                Tail log for task
    download            Download log for task

options:
  -h, --help            show this help message and exit

========================================================================
usage: drove tasks create [-h] spec-file

positional arguments:
  spec-file   JSON spec file for the application

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove tasks download [-h] [--out OUT] source-app task-id tasklogfile

positional arguments:
  source-app     Name of the Drove application that started the task
  task-id        Task ID
  tasklogfile    Log filename to download

options:
  -h, --help     show this help message and exit
  --out, -o OUT  Filename to download to. Default is the same filename as
                 provided.

========================================================================
usage: drove tasks kill [-h] source-app-name task-id

positional arguments:
  source-app-name  Source app name as specified in spec
  task-id          ID of the task as specified in the spec

options:
  -h, --help       show this help message and exit

========================================================================
usage: drove tasks list [-h] [--app APP] [--sort {0,1,2,3,4,5,6,7,8}]
                        [--reverse]

options:
  -h, --help            show this help message and exit
  --app, -a APP         Show tasks only for the given source app
  --sort, -s {0,1,2,3,4,5,6,7,8}
                        Sort output by column
  --reverse, -r         Sort in reverse order

========================================================================
usage: drove tasks logs [-h] source-app task-id

positional arguments:
  source-app  Name of the Drove application that started the task
  task-id     Task ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove tasks show [-h] source-app task-id

positional arguments:
  source-app  Name of the Drove application that started the task
  task-id     Task ID

options:
  -h, --help  show this help message and exit

========================================================================
usage: drove tasks tail [-h] [--file FILE] source-app task-id

positional arguments:
  source-app       Name of the Drove application that started the task
  task-id          Task ID

options:
  -h, --help       show this help message and exit
  --file, -f FILE  Log filename to tail. Default is to tail output.log

Old Output token cost
Screenshot 2026-04-12 at 2 04 07 PM

Compact mode output

drove [-f FILE] [-c CLUSTER] [-e ENDPOINT] [-t AUTH_HEADER] [-i] [-u USERNAME] [-p PASSWORD] [-d]

appinstances download <app-id> <instance-id> <applogfile> [-o OUT]
appinstances info <app-id> <instance-id>
appinstances kill <app-id> <instance-id...> [-p PARALLELISM] [-t TIMEOUT] [-w]
appinstances list <app-id> [-o] [-s SORT] [-r]
appinstances logs <app-id> <instance-id>
appinstances replace <app-id> <instance-id...> [-p PARALLELISM] [-t TIMEOUT] [-w]
appinstances tail <app-id> <instance-id> [-l LOG]

apps cancelop <app-id>
apps create <spec-file>
apps deploy <app-id> <instances> [-p PARALLELISM] [-t TIMEOUT] [-w]
apps destroy <app-id>
apps list [-s SORT] [-r]
apps restart <app-id> [-p PARALLELISM] [-t TIMEOUT] [-w]
apps scale <app-id> <instances> [-p PARALLELISM] [-t TIMEOUT] [-w]
apps spec <app-id>
apps summary <app-id>
apps suspend <app-id> [-p PARALLELISM] [-t TIMEOUT] [-w]

cluster endpoints [-v VHOST]
cluster events [-f] [-t TYPE] [-c COUNT] [-s TEXTFMT]
cluster leader
cluster maintenance-off
cluster maintenance-on
cluster ping
cluster summary

config add-cluster <cluster-name> -e ENDPOINT [-u USERNAME] [-p PASSWORD] [-t AUTH_HEADER] [-i]
config current-cluster
config delete-cluster <cluster-name>
config get-clusters
config init -e ENDPOINT [-n NAME] [-u USERNAME] [-p PASSWORD] [-t AUTH_HEADER] [-i]
config use-cluster <cluster-name>
config view [-r]

describe app <app-id> [-j]
describe cluster [-j]
describe executor <executor-id> [-j]
describe instance <app-id> <instance-id> [-j]
describe localservice <service-id> [-j]
describe lsinstance <service-id> <instance-id> [-j]
describe task <source-app> <task-id> [-j]

executor appinstances <executor-id> [-s SORT] [-r]
executor blacklist <executor-id...>
executor info <executor-id>
executor list
executor lsinstances <executor-id> [-s SORT] [-r]
executor tasks <executor-id> [-s SORT] [-r]
executor unblacklist <executor-id...>

localservices activate <service-id>
localservices cancelop <service-id>
localservices conftest <service-id>
localservices create <spec-file> [-i instances]
localservices deactivate <service-id>
localservices destroy <service-id>
localservices list [-s SORT] [-r]
localservices restart <service-id> [-s] [-p PARALLELISM] [-t TIMEOUT] [-w]
localservices spec <service-id>
localservices summary <service-id>
localservices update <service-id> <count>

lsinstances download <service-id> <instance-id> <servicelogfile> [-o OUT]
lsinstances info <service-id> <instance-id>
lsinstances kill <service-id> <instance-id...> [-p PARALLELISM] [-t TIMEOUT] [-w]
lsinstances list <service-id> [-o] [-s SORT] [-r]
lsinstances logs <service-id> <instance-id>
lsinstances replace <service-id> <instance-id...> [-s] [-p PARALLELISM] [-t TIMEOUT] [-w]
lsinstances tail <service-id> <instance-id> [-l LOG]

tasks create <spec-file>
tasks download <source-app> <task-id> <tasklogfile> [-o OUT]
tasks kill <source-app-name> <task-id>
tasks list [-a APP] [-s SORT] [-r]
tasks logs <source-app> <task-id>
tasks show <source-app> <task-id>
tasks tail <source-app> <task-id> [-f FILE]

Compact mode output token cost

Screenshot 2026-04-12 at 2 04 54 PM

Tokens calculated from https://platform.openai.com/tokenizer

@Prajwalprakash3722
Copy link
Copy Markdown
Contributor Author

If this works as expected, why is a verbose mode needed? This is anyways meant for llm use

That's what I also thought, but kept it as a fallback, I am aligned to remove it altogether

@Prajwalprakash3722
Copy link
Copy Markdown
Contributor Author

apps list — Normal vs Compact

Normal (619c)

  Id              Name          State      Total CPU    Total Memory(MB)    Required Instances    Healthy Instances  Created               Updated
  --------------  ------------  -------  -----------  ------------------  --------------------  -------------------  --------------------  --------------------
  TEST_APP-1      TEST_APP      RUNNING            1                 128                     1                    1  15/11/2023, 03:43:20  15/11/2023, 03:43:21
  TEST_APP_DEV-1  TEST_APP_DEV  RUNNING            1                 128                     1                    1  15/11/2023, 03:43:20  15/11/2023, 03:43:21

Compact (262c)

  Id    Name    State   Total CPU       Total Memory(MB)        Required Instances      Healthy Instances       Created Updated
TEST_APP-1    TEST_APP        RUNNING 1       128     1       1       15/11/2023, 03:43:20    15/11/2023, 03:43:21
TEST_APP_DEV-1        TEST_APP_DEV    RUNNING 1       128     1       1       15/11/2023, 03:43:20    15/11/2023, 03:43:21

@santanusinha
Copy link
Copy Markdown
Contributor

apps list compact mode is not looking good .. i'm guessing it will be similar for other commands .. i'd rather us have added a json mode output or something for commands ... separately

@Prajwalprakash3722
Copy link
Copy Markdown
Contributor Author

closing this PR as of now, will work on refining outputs further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants