Skip to content

Yet Another CLI builder - Build delightful command line interfaces in seconds. Written in Nim language πŸ‘‘

License

Notifications You must be signed in to change notification settings

openpeeps/kapsis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8f0dacb Β· Jan 27, 2025
Oct 30, 2024
Jun 29, 2023
Jan 27, 2025
Jun 29, 2023
May 10, 2022
Jan 17, 2015
Oct 30, 2024
Dec 31, 2024

Repository files navigation

kapsis framework
Kapsis β€” Build delightful & intuitive command line interfaces with Nim language πŸ‘‘

nimble install kapsis

API reference

Github Actions Github Actions

😍 Key Features

  • Typed arguments and validation (path, string, int, bool, float, seconds and more)
  • Prompters input, dropdown, secret, checkbox, radio
  • Commands and Sub commands
  • Label separators
  • Index Auto alignment
  • Doc comments

Example

  import commands/cli

  commands:
    -- "Source-to-Source"
    src string(-s), path(`timl`), bool(--pretty):
      ## Transpile `timl` code to a specific target source
    
    ast path(`timl`), filename(`output`):
      ## Generate binary AST from a `timl` file

Command handles

Kapsis autolinks CLI commands to their command handles. For example, a command called src autolinks to a command handle srcCommand

import kapsis/[app, cli]

proc srcCommand*(v: Values) =
  displayInfo("Hello")

proc astCommand*(v: Values) =
  discard

-h, --help, -v and --version are reserved flags.

Database

todo

Plugins

todo let others add more commands to your kapsis app via shared libraries.

TODO

  • Fancy Gradientful preloaders
  • Fullscreen Session & Keyboard Events
  • Auto-generate Bash/Zsh completion scripts
  • Pluggable Commands via Shared Libraries
  • Built-in database using either JSON or SQLite

❀ Contributions & Support

🎩 License

MIT license. Made by Humans from OpenPeeps.
Copyright Β© 2024 OpenPeeps & Contributors β€” All rights reserved.